Closed Bug 850349 Opened 9 years ago Closed 9 years ago

Intermittent components/search/test/browser_contextmenu.js | Test timed out | Found a tab after previous test timed out: data:text/plain;charset=utf8,test%20search


(Firefox :: Search, defect)

Not set



Firefox 22


(Reporter: RyanVM, Assigned: MattN)



(Keywords: intermittent-failure)


(2 files)

Attached image screenshot
This showed up after the fix for bug 848943 landed on inbound. Not sure if it's a new problem or one that was just hidden previously.

Rev3 WINNT 6.1 mozilla-inbound opt test mochitest-browser-chrome on 2013-03-12 08:09:05 PDT for push 397034d19dfc
slave: talos-r3-w7-070

08:20:42     INFO -  TEST-START | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js
08:20:42     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Engine was added.
08:20:42     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | currentEngine set
08:20:42     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Got context menu XUL
08:20:42     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Got select all context menu item
08:21:00     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Console message: 1363101660762	Services.DataReporting.Policy	WARN	Hard error submitting data: Server failure.
08:21:12  WARNING -  TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Test timed out
08:21:12     INFO -  args: ['C:\\talos-slave\\test\\build\\tests\\bin\\screenshot.exe', 'c:\\users\\cltbld\\appdata\\local\\temp\\mozilla-test-fail_rwgjmv']
08:21:12     INFO -  SCREENSHOT: <see attached>
08:21:12     INFO -  INFO TEST-END | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | finished in 30019ms
08:21:12  WARNING -  TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Found a tab after previous test timed out: data:text/plain;charset=utf8,test%20search
08:21:12     INFO -  TEST-INFO | checking window state
Assignee: nobody → mnoorenberghe+bmo
OS: Windows 7 → All
Hardware: x86 → All
Patch changes:
1) browser_426329.js - Fix exception in popupshowing event listener (from 
                       |this| confusion) causing search history dropdown to 
                       remain open on subsequent tests.

2) browser_contextmenu.js - Add some debug messages.
                          - Move |doOnloadOnce(checkSearchURL);| just before 
                            the search tab opens so there is less interference 
                            with later tests.
                          - Add nsISelectionListener to know when selection has 

3) head.js - Consolidate duplicated doOnloadOnce function.

4) test.html - Fix character set warning.

5) Other whitespace fixes.

I don't know that this will fix the intermittent because I still don't fully understand the cause.  For some reason the mouse click on the body doesn't cause the context menu to appear in some cases.  You can easily reproduce if you remove the executeSoon for rightClickOnDocument. It doesn't seem to be a selection issue since getSelection was returning the expected text locally and that wouldn't have blocked the test execution where it did. When the problem happens locally without the executeSoon, the selected text is grey instead of blue on OS X (as if it's the inactive window even when it is the foreground one). It seems like it's too early for some kind of initialization but I don't know what.

I also don't understand why the test suite's screenshots don't even show the tab for the test.  Maybe the screenshot is after teardown? The "Found a tab after previous test timed out" comes later so that makes me think that's not the case.

Try push:
Attachment #724309 - Flags: review?(
Comment on attachment 724309 [details] [diff] [review]
Cleanup browser search tests while debugging an intermittent failure

The selection listener has the potential to mess with other tests or cause leaks, perhaps it should be removed in a cleanup function?

The "info()" calls in waitForPopupShown in head.js should prefix their messages with the functino name to make it clearer where those messages are coming from.
Attachment #724309 - Flags: review?( → review+

(In reply to :Gavin Sharp (use for email) from comment #37)
> The selection listener has the potential to mess with other tests or cause
> leaks, perhaps it should be removed in a cleanup function?

Using registerCleanupFunction to cleanup didn't work because removeSelectionListener returns NS_ERROR_FAILURE if the listener is not registered as a listener and registerCleanupFunction causes a test failure in that case.  The listener got removed when finalize closed the tab.  I could have just wrapped that in a try/catch block but it didn't seem right.

Instead, I registered |finalize| as a cleanup function which should prevent failures in subsequent tests since it closes the tabs.
Closed: 9 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
You need to log in before you can comment on or make changes to this bug.