Closed Bug 1383672 Opened 7 years ago Closed 7 years ago

Convert test_windowminmaxsize.xul to comply with new data: URI inheritance model

Categories

(Core :: DOM: Security, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: ckerschb, Assigned: ckerschb)

References

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file, 2 obsolete files)

      No description provided.
Assignee: nobody → ckerschb
Blocks: 1324406
Status: NEW → ASSIGNED
Priority: -- → P2
See Also: → 1337270
Whiteboard: [domsecurity-active]
This one is really tricky - in theory my patch should work but it seems
>     SimpleTest.waitForFocus(windowOpened, tests[gTestId].window);
isn't working correctly, because windowOpened() is never called :-(
Hey Gijs, sorry for bothering you with such a tedious question, but you are my last resort. Here is the problem: I am rewriting test_windowminmaxsize.xul so it works with the new data: URI inheritance model. To do so, I am assembling the markup within an *.sjs file. However, it seems that this line:
> SimpleTest.waitForFocus(windowOpened, tests[gTestId].window);
is not working anymore, because windowOpenend is never called. Presumably, because now I am loading the XUL testpage over http:// (because of the *.sjs) and not using chrome://. If I preasemble the first test in the suite and load "windowminmaxsize.xul" (see attached patch) then waitForFocus works as expected.

Now, I am in a tricky position because there are so many variable parts within the test. A naive approach would be to add several .xul files and basically have each test load using it's own file. I was wondering if you see a better alternative to rewrite that test. Thanks!
Attachment #8889885 - Attachment is obsolete: true
Flags: needinfo?(gijskruitbosch+bugs)
It seems the load event isn't being picked up by the listener from SimpleTest.waitForFocus. Adding a manual listener ourselves also doesn't seem to work. Not sure what's going on there, but I expect it has to do with these now being cross-origin, and that the simplest workaround would be to just have individual files for the individual tests that we do here.
Flags: needinfo?(gijskruitbosch+bugs)
Gijs, even though it's not a very elegant solution I think it's the best option we have available - putting each test into its own xul file.
Attachment #8890793 - Attachment is obsolete: true
Attachment #8891304 - Flags: review?(gijskruitbosch+bugs)
Comment on attachment 8891304 [details] [diff] [review]
bug_1383672_windowminmaxsize.patch

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

LGTM!
Attachment #8891304 - Flags: review?(gijskruitbosch+bugs) → review+
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/806f15a5c0f2
Convert test_windowminmaxsize.xul to comply with new data: URI inheritance model. r=gijs
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/806f15a5c0f2
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.