Condition Coverage

blib/lib/WWW/Mechanize/Firefox.pm
Criterion Covered Total %
condition 0 253 0.0


and 3 conditions

line !l l&&!r l&&r condition
1073 0 0 0 $self->{'custom_header_observer'} and @headers
1214 0 0 0 @args <= 2 and ref $args[0] eq 'MozRepl::RemoteObject::Instance'
1405 0 0 0 ref $events and ref $events eq 'CODE'
1503 0 0 0 $scheme and $scheme =~ /^https?/
0 0 0 $scheme and $scheme =~ /^(file|data|about)\b/
2106 0 0 0 defined $self->ct && $self->ct eq 'text/html'
2338 0 0 0 $single and exists $opts{'n'}
2642 0 0 0 defined wantarray and not wantarray
2668 0 0 0 not $zero_allowed and @res == 0
2673 0 0 0 not $two_allowed and @res > 1
2833 0 0 0 @res and $options{'return_first'}
0 0 0 @res and $options{'return_first'} and grep {$_->{'resultSize'};} @res
2838 0 0 0 $options{'frames'} and not $options{'node'}
2983 0 0 0 ref $name and &blessed($name)
0 0 0 ref $name and &blessed($name) and $name->can('__click')
3529 0 0 0 ref $name and &blessed($name)
0 0 0 ref $name and &blessed($name) and $name->can('__click')
3934 0 0 0 $v = $self->is_visible($node) and !$timeout_after || time < $timeout_after
3944 0 0 0 $node and time >= $timeout_after
4008 0 0 0 not ref $spec || $spec =~ /\D/ and $spec == 1

or 2 conditions

line l !l condition
240 0 0 $args{'events'} ||= ['DOMContentLoaded', 'load', 'pageshow', 'error', 'abort', 'stop']
245 0 0 $args{'on_event'} ||= undef
246 0 0 $args{'pre_value'} ||= ['focus']
247 0 0 $args{'post_value'} ||= ['change', 'blur']
249 0 0 $args{'frames'} ||= 1
259 0 0 $args{'response'} ||= undef
260 0 0 $args{'current_form'} ||= undef
262 0 0 $args{'event_log'} ||= []
525 0 0 $env ||= {}
936 0 0 $options{'charset'} ||= 'utf-8'
937 0 0 $options{'headers'} ||= {}
938 0 0 $options{'headers'}{'Content-Type'} ||= 'application/x-www-form-urlencoded'
1276 0 0 $element->{'busy'} || 0
1578 0 0 $bypass_cache ||= 0
1727 0 0 $options{'format'} ||= 'html'
1730 0 0 delete $options{'format'} || 'html'
2341 0 0 delete $opts{'n'} || 1
2442 0 0 $opts{'n'} || ''
2685 0 0 $self->{'XpathResultTypes'} ||= {'ANY_TYPE', $self->repl->constant('XPathResult.ANY_TYPE'), 'NUMBER_TYPE', $self->repl->constant('XPathResult.NUMBER_TYPE'), 'STRING_TYPE', $self->repl->constant('XPathResult.STRING_TYPE'), 'BOOLEAN_TYPE', $self->repl->constant('XPathResult.BOOLEAN_TYPE'), 'UNORDERED_NODE_ITERATOR_TYPE', $self->repl->constant('XPathResult.UNORDERED_NODE_ITERATOR_TYPE'), 'ORDERED_NODE_ITERATOR_TYPE', $self->repl->constant('XPathResult.ORDERED_NODE_ITERATOR_TYPE'), 'UNORDERED_NODE_SNAPSHOT_TYPE', $self->repl->constant('XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE'), 'ORDERED_NODE_SNAPSHOT_TYPE', $self->repl->constant('XPathResult.ORDERED_NODE_SNAPSHOT_TYPE'), 'ANY_UNORDERED_TYPE', $self->repl->constant('XPathResult.ANY_UNORDERED_NODE_TYPE'), 'FIRST_ORDERED_NODE_TYPE', $self->repl->constant('XPathResult.FIRST_ORDERED_NODE_TYPE')}
2734 0 0 ref $query || ''
2869 0 0 ref $query || ''
2896 0 0 ref $query || ''
2993 0 0 $options{'name'} || ''
3463 0 0 'HASH' eq ref $value or ''
0 0 'ARRAY' eq ref $value or ''
3681 0 0 delete $options{'fields'} || {}
3922 0 0 delete $options{'sleep'} || 0.3
3923 0 0 delete $options{'timeout'} || 0
4087 0 0 $rect ||= {}
4088 0 0 $target_rect ||= {}

or 3 conditions

line l !l&&r !l&&!r condition
527 0 0 0 $doc ||= $self->document
558 0 0 0 $window ||= $self->tab->{'linkedBrowser'}{'contentWindow'}
869 0 0 0 $options{'basedir'} ||= dirname($0)
1052 0 0 0 $self->{'custom_header_observer'} ||= $self->_custom_header_observer
1098 0 0 0 $options{'tab'} ||= $self->tab
1099 0 0 0 $options{'window'} ||= $self->application->getMostRecentWindow
1100 0 0 0 $options{'events'} ||= $self->events
1218 0 0 0 $_->[1] ||= $self->events
1377 0 0 0 $STATE_STOP == $flags or ($flags & ($STATE_STOP | $STATE_IS_DOCUMENT)) == ($STATE_STOP | $STATE_IS_DOCUMENT)
1382 0 0 0 $self->{'response'} ||= $request
1611 0 0 0 $synchronize ||= @_ != 2
1635 0 0 0 $synchronize ||= @_ != 2
1729 0 0 0 delete $options{'document'} || $self->document
1788 0 0 0 $d ||= $self->document
2075 0 0 0 $base ||= $self->uri
2209 0 0 0 $self->response('headers', 0)->message || sprintf('Got status code %d', $self->status)
2337 0 0 0 delete $opts{'one'} || $single
2358 0 0 0 $lefthand{$lvalue} || '@' . $lvalue
2633 0 0 0 $single || $first || $maybe || $any
2636 0 0 0 $single || $first
2637 0 0 0 $single || $maybe
2641 0 0 0 exists $options{'all'} or $return_first_element
2660 0 0 0 $_->{'resultType'} == $self->{'XpathResultTypes'}{'ORDERED_NODE_SNAPSHOT_TYPE'} || $_->{'resultType'} == $self->{'XpathResultTypes'}{'UNORDERED_NODE_SNAPSHOT_TYPE'} || $_->{'resultType'} == $self->{'XpathResultTypes'}{'ORDERED_NODE_ITERATOR_TYPE'} || $_->{'resultType'} == $self->{'XpathResultTypes'}{'UNORDERED_NODE_ITERATOR_TYPE'}
2669 0 0 0 $options{'user_info'} ||= $query
2674 0 0 0 $options{'user_info'} ||= $query
2739 0 0 0 $options{'document'} ||= $options{'node'}{'ownerDocument'}
2742 0 0 0 $options{'document'} ||= $self->document
2747 0 0 0 $options{'type'} ||= $self->{'XpathResult'}{'ANY_TYPE'}
2749 0 0 0 $options{'user_info'} ||= join(' or ', map({"'${_}'";} @$query))
2823 0 0 0 $options{'node'} || $doc
2868 0 0 0 $options{'user_info'} ||= "CSS selector '${query}'"
2900 0 0 0 $options{'user_info'} ||= 'id ' . join(' or ', map({"'${_}'";} @$query)) . ' found'
3092 0 0 0 $node ||= $self->xpath($xpath, 'node', $self->current_form, 'single', 1, 'user_message', $user_message)
3371 0 0 0 delete $options{'pre'} || $self->{'pre_value'}
3372 0 0 0 delete $options{'post'} || $self->{'post_value'}
3609 0 0 0 $dom_form ||= $self->current_form
3831 0 0 0 $options{'window'} ||= $self->tab->{'linkedBrowser'}{'contentWindow'}
3934 0 0 0 !$timeout_after || time < $timeout_after
3964 0 0 0 $rename{$meth} || $meth
4004 0 0 0 $spec ||= $self->{'frames'}
4006 0 0 0 $document ||= $self->document
4008 0 0 0 ref $spec || $spec =~ /\D/
4086 0 0 0 $tab ||= $self->tab

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
3570 0 0 0 0 $set xor $is_set