Closed Bug 1093660 Opened 5 years ago Closed 5 years ago

Intermittent browser_e10s_switchbrowser.js | Found a tab after previous test timed out: http://example.org/browser/browser/base/content/test/general/dummy_page.html - expected PASS

Categories

(Firefox :: General, defect)

x86
Windows 8
defect
Not set
Points:
1

Tracking

()

RESOLVED FIXED
Firefox 39
Iteration:
39.2 - 23 Mar
Tracking Status
e10s + ---
firefox37 --- unaffected
firefox38 --- fixed
firefox39 --- fixed
firefox-esr31 --- unaffected

People

(Reporter: cbook, Assigned: ttaubert)

References

(Blocks 1 open bug, )

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 1 obsolete file)

Windows 8 64-bit b2g-inbound opt test mochitest-e10s-browser-chrome-1

https://treeherder.mozilla.org/ui/logviewer.html#?job_id=762927&repo=b2g-inbound

00:40:03 INFO - 415 INFO TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/general/browser_e10s_switchbrowser.js | Found a tab after previous test timed out: http://example.org/browser/browser/base/content/test/general/dummy_page.html - expected PASS
All of the latest logs show:

Console message: [JavaScript Error: "undefined" {file: "chrome://browser/content/tabbrowser.xml" line: 543}]
Console message: [JavaScript Error: "Error: operation not possible on dead CPOW"]

The tabbrowser tries to notify waitForDocLoadComplete()'s progress listener and that fails sometimes due to CPOW madness. We should move that load progress listener to the content script, like waitForDocLoadAndStopIt() does. And probably unify the two functions.
Took a closer look at the failure again and I think there's an easier solution. We log the loaded URI in waitForDocLoadComplete() and retrieve it through a CPOW: gBrowser.contentWindow.location. That's also the line that is reported as failing. If we just fix that I hope we can fix this failure and a few others.
Assignee: nobody → ttaubert
Status: NEW → ASSIGNED
Attachment #8576048 - Flags: review?(gijskruitbosch+bugs)
Iteration: --- → 39.2 - 23 Mar
Points: --- → 1
Flags: qe-verify-
Flags: firefox-backlog+
Comment on attachment 8576048 [details] [diff] [review]
0001-Bug-1093660-Fix-intermittent-browser_e10s_switchbrow.patch

Review of attachment 8576048 [details] [diff] [review]:
-----------------------------------------------------------------

People pass tab.linkedBrowser to this function, e.g. browser/base/content/test/general/browser_bug575561.js .


Seems like the default param should be aBrowser=gBrowser.selectedBrowser instead?
Attachment #8576048 - Flags: review?(gijskruitbosch+bugs) → review-
(Also, can you do a separate patch to move this to BrowserTestUtils? I promise quick reviews!)
(In reply to :Gijs Kruitbosch from comment #62)
> (Also, can you do a separate patch to move this to BrowserTestUtils? I
> promise quick reviews!)

BrowserTestUtils has something similar like that already, browserLoaded(). This works a little differently and I fear it justifies having its own bug due to all the possible breakage.
Attachment #8576048 - Attachment is obsolete: true
Attachment #8576066 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8576066 [details] [diff] [review]
0001-Bug-1093660-Fix-intermittent-browser_e10s_switchbrow.patch, v2

Review of attachment 8576066 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/base/content/test/general/head.js
@@ +427,5 @@
>          if ((flags & docStop) == docStop && status != Cr.NS_BINDING_ABORTED) {
>            aBrowser.removeProgressListener(this);
>            waitForDocLoadComplete.listeners.delete(this);
> +
> +          let chan = req.QueryInterface(Ci.nsIChannel);

Try push because I bet there's silly request objects for which this can fail? :-)

@@ +428,5 @@
>            aBrowser.removeProgressListener(this);
>            waitForDocLoadComplete.listeners.delete(this);
> +
> +          let chan = req.QueryInterface(Ci.nsIChannel);
> +          info("Browser loaded " + chan.originalURI.spec);

Vaguely curious if this ever differs from .location. Guessing it doesn't matter too much because it's just logging, so w/e. :-)
Attachment #8576066 - Flags: review?(gijskruitbosch+bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/fa2cd844dcc9
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
You need to log in before you can comment on or make changes to this bug.