Closed Bug 789954 Opened 7 years ago Closed 7 years ago

TEST-UNEXPECTED-FAIL | /tests/suite/browser/test/test_contextmenu.html | Test timed out. (Port Port Bug 778420 - Fix up tests that don't like the new enablePrivilege)


(SeaMonkey :: General, defect)

Not set


(Not tracked)



(Reporter: philip.chee, Assigned: philip.chee)



(3 files)

1805 ERROR TEST-UNEXPECTED-FAIL | /tests/suite/browser/test/test_contextmenu.html | Test timed out.
> function runTest(testNum) {
>   // Seems we need to enable this again, or sendKeyEvent() complaints.
Firefox removed this enablePrivilege. However we still need this because we do:

> (";1" in Components.classes) ?
> ["context-setDesktopBackground", true] : []).concat(

Passed: 1713
Failed: 0
Todo: 0
Attachment #659722 - Flags: review?(
Attachment #659722 - Flags: feedback?(neil)
Attachment #659722 - Flags: feedback?(neil) → feedback+
Comment on attachment 659722 [details] [diff] [review]
Patch v1.0 Proposed fix.

Serge seems to be MIA. Asking Neil for review. Whoever gets to this first.
Attachment #659722 - Flags: review?(neil)
Changes from Bug 792036 - Prepare test suite for disappearance of |Components| in content scopes.
Automated fixups:

***This applies on top of the test changes in Bug 715410.***
Attachment #664471 - Flags: review?(
Pushed to comm-central:
rs=me test bustage.
post landing reviews pending.
Ugh still stopped at:

Timestamp: 30/09/12 12:33:26 AM
Error: TypeError: invalid 'in' operand SpecialPowers.Components.classes
Source File: http://mochi.test:8888/tests/suite/browser/test/test_contextmenu.html?autorun=1&closeWhenDone=1&logFile=c%3A%5Ct1%5Chg%5Cobjdir-sm%5Cmozilla%5Cmochitest-plain.log&fileLevel=INFO&consoleLevel=INFO&failureFile=c:\t1\hg\objdir-sm\mozilla\_tests\testing\mochitest\makefailures.json
Line: 336

Which is:

(";1" in SpecialPowers.Components.classes) ?
Bug 789954 Part 3 followup to v2.0 more bustage SpecialPowers fix rs=me bustage fix post-landing review pending.

The V2.0 patch didn't fix the hang due to me doing a braino. This one works locally.

For some reason:
Doesn't work but the following does"

Passed: 1866
Failed: 0
Todo: 0
Attachment #666228 - Flags: review?(
Pushed part 3. Leave open for post landing review.
Comment on attachment 659722 [details] [diff] [review]
Patch v1.0 Proposed fix.

> function executeCopyCommand(command, expectedValue)
> {
>   // Just execute the command directly rather than simulating a context menu
>   // press to avoid having to deal with its asynchronous nature
>-  subwindow.controllers.getControllerForCommand(command).doCommand(command);
>+  SpecialPowers.wrap(subwindow).controllers.getControllerForCommand(command).doCommand(command);
Maybe this should use chromeWin instead of SpecialPowers.wrap(subwindow)

>+    chromeWin = SpecialPowers.wrap(subwindow)
>                     .QueryInterface(Ci.nsIInterfaceRequestor)
>                     .getInterface(Ci.nsIWebNavigation)
>                     .QueryInterface(Ci.nsIDocShellTreeItem)
>                     .rootTreeItem
>                     .QueryInterface(Ci.nsIInterfaceRequestor)
>                     .getInterface(Ci.nsIDOMWindow)
>                     .QueryInterface(Ci.nsIDOMChromeWindow);
Nit: indentation
Attachment #659722 - Flags: review?(neil) → review+
Comment on attachment 666228 [details] [diff] [review]
Patch v3.0 Really fix the test this time.

>-    is(contextMenu.state, "closed", "checking if popup is closed");
>+    is(SpecialPowers.wrap(contextMenu).state, "closed", "checking if popup is closed");
[Odd. Isn't the context menu already wrapped? After all, it's a chrome element.]
Attachment #666228 - Flags: feedback+
Ugh, time to close this bug. rs=me
Attachment #659722 - Flags: review?(
Comment on attachment 664471 [details] [diff] [review]
Patch v2.0 Additional changes from |Bug 792036 - Automated fixups|

Attachment #664471 - Flags: review?( → review+
Comment on attachment 666228 [details] [diff] [review]
Patch v3.0 Really fix the test this time.

Attachment #666228 - Flags: review?( → review+
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.15
You need to log in before you can comment on or make changes to this bug.