Closed Bug 848943 Opened 8 years ago Closed 8 years ago

Frequent components/search/test/browser_contextmenu.js | Check context menu label - Got Search Google for "open-suse.ru)", expected Search Foo for "test search" | Checking context menu search URL - Got http://mochi.test:8888/browser/browser/comp...

Categories

(Firefox :: Search, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 22

People

(Reporter: RyanVM, Assigned: MattN)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

This just regressed today around the time of the inbound->m-c merge. Josh, can you take a look at this please?

https://tbpl.mozilla.org/php/getParsedLog.php?id=20427513&tree=Mozilla-Inbound

Rev4 MacOSX Lion 10.7 mozilla-inbound opt test mochitest-browser-chrome on 2013-03-07 10:19:04 PST for push e2f80c264f10
slave: talos-r4-lion-007

10:28:08     INFO -  TEST-START | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js
10:28:08     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Engine was added.
10:28:08     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | currentEngine set
10:28:08     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Got context menu XUL
10:28:09     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Console message: [JavaScript Error: "The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature." {file: "data:text/plain,test%20search" line: 0}]
10:28:09     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Got select all context menu item
10:28:09     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Got search context menu item
10:28:09  WARNING -  TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Check context menu label - Got Search Google for "open-suse.ru)", expected Search Foo for "test search"
10:28:09  WARNING -  This is a harness error.
10:28:09     INFO -  Stack trace:
10:28:09     INFO -      JS frame :: chrome://mochikit/content/browser-test.js :: test_is :: line 486
10:28:09     INFO -      JS frame :: chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js :: checkContextMenu :: line 59
10:28:09     INFO -      native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0
10:28:09     INFO -  TEST-PASS | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Check that search context menu item is enabled
10:28:09     INFO -  TEST-INFO | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "http://mochi.test:8888/browser/browser/components/search/test/" line: 0}]
10:28:09  WARNING -  TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | Checking context menu search URL - Got http://mochi.test:8888/browser/browser/components/search/test/, expected http://mochi.test:8888/browser/browser/components/search/test/?test=test+search&ie=utf-8&client=app&channel=contextsearch
10:28:09  WARNING -  This is a harness error.
10:28:09     INFO -  Stack trace:
10:28:09     INFO -      JS frame :: chrome://mochikit/content/browser-test.js :: test_is :: line 486
10:28:09     INFO -      JS frame :: chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js :: checkSearchURL :: line 68
10:28:09     INFO -      JS frame :: chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js :: handleLoad :: line 95
10:28:09     INFO -      native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0
10:28:09     INFO -  INFO TEST-END | chrome://mochitests/content/browser/browser/components/search/test/browser_contextmenu.js | finished in 419ms
Fun, the selected text means when it thought it opened a tab with data:text/plain,test%20search, it instead got one opened by browser_plainTextLinks.js long long before it ran.
Matt, do you have any ideas here?
Component: Form Manager → Search
Product: Toolkit → Firefox
I suspect the context menu isn't ready after the executeSoon and this should have been using popupshown in the first place.

I also fixed a warning caused by the data URI not having a charset specified along with 2 other minor fixes.

Try push: https://tbpl.mozilla.org/?tree=Try&rev=5267ae365008
Assignee: nobody → mnoorenberghe+bmo
Status: NEW → ASSIGNED
Attachment #723798 - Flags: review?(dolske)
Comment on attachment 723798 [details] [diff] [review]
v.1 Switch from executeSoon to popupshown event

Good call - the context menu likely just isn't re-initialized yet, and so it uses the data from its previous initialization.
Attachment #723798 - Flags: review?(dolske) → review+
Depends on: 850349
https://hg.mozilla.org/mozilla-central/rev/fc1e85affa7f

Fix looks good, thanks Matt!
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 22
You need to log in before you can comment on or make changes to this bug.