Closed
Bug 1254557
Opened 9 years ago
Closed 9 years ago
Make test_428653.xul work in e10s
Categories
(Toolkit :: View Source, defect, P1)
Toolkit
View Source
Tracking
()
People
(Reporter: past, Assigned: past)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxprivacy])
Attachments
(1 file)
This is a chrome mochitest that needs to be converted to either a browser chrome test or a plain mochitest.
Updated•9 years ago
|
Blocks: 1216897
Status: NEW → ASSIGNED
Iteration: --- → 48.1 - Mar 21
Flags: qe-verify?
Priority: -- → P1
Whiteboard: [fxprivacy]
Updated•9 years ago
|
Flags: qe-verify? → qe-verify-
Assignee | ||
Updated•9 years ago
|
Blocks: e10s-tests
Updated•9 years ago
|
tracking-e10s:
--- → +
Assignee | ||
Comment 1•9 years ago
|
||
Originally I had convinced myself that this test needs to run in e10s, but now that I started working on it I no longer see the point. Bobby, what do you think?
Flags: needinfo?(bobbyholley)
Comment 2•9 years ago
|
||
This test doesn't really need to be using a <browser> element, or to anything related to view-source AFAICT. We just need to have some chrome code interacting with a content document.
I'm worried that in its current configuration, this test will just cease to work at some point. So I think it should either be converted into a proper mochitest-chrome (html document with a content iframe), or a mochitest-plain that does the chrome stuff via SpecialPowers.Cu.Sandbox.
Flags: needinfo?(bobbyholley)
Assignee | ||
Comment 3•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/40405/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/40405/
Assignee | ||
Updated•9 years ago
|
Attachment #8731167 -
Flags: review?(bobbyholley)
Assignee | ||
Comment 4•9 years ago
|
||
Is this what you had in mind? The test remains a mochitest-chrome test, which means it won't run in e10s, but it now uses an HTML document with an iframe.
Assignee | ||
Comment 5•9 years ago
|
||
For some reason MozReview lost the fact that the test file was just renamed and modified only in the preamble and epilogue. The JS code remains the same.
Updated•9 years ago
|
Attachment #8731167 -
Flags: review?(bobbyholley)
Comment 6•9 years ago
|
||
Comment on attachment 8731167 [details]
MozReview Request: Bug 1254557 - Convert test_428653.xul to an HTML-based chrome mochitest. r?bholley
https://reviewboard.mozilla.org/r/40405/#review36993
r=me with that one change.
::: toolkit/components/viewsource/test/test_bug428653.html:13
(Diff revision 1)
> + <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
> + <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
> +</head>
> +<body>
> +
> + <iframe id="content"> </iframe>
I think we should probably load a real document here, a la:
http://mxr.mozilla.org/mozilla-central/source/dom/base/test/file_empty.html?force=1
Since some of the relevant code here might do different things with about:blank documents.
Updated•9 years ago
|
Attachment #8731167 -
Flags: review+
Assignee | ||
Comment 7•9 years ago
|
||
The test fails if I use <iframe id="content" src="file_empty.html"></iframe>:
4 INFO TEST-UNEXPECTED-FAIL | toolkit/components/viewsource/test/test_bug428653.html | Shouldn't have opened document - got true, expected false
SimpleTest.is@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:267:5
testDocumentOpen@chrome://mochitests/content/chrome/toolkit/components/viewsource/test/test_bug428653.html:36:5
The current version of the test is indeed using <browser src="about:blank" />, so perhaps this is to be expected?
Flags: needinfo?(bobbyholley)
Comment 8•9 years ago
|
||
(In reply to Panos Astithas [:past] from comment #7)
> The test fails if I use <iframe id="content" src="file_empty.html"></iframe>:
Is that actually what your code looks like? Because a chrome:// test is loaded from the chrome:// protocol, which means that relative loads will also be from the chrome:// protocol. You need to load the thing relative to http://www.example.com or somesuch to make it load as content.
See the examples here:
http://mxr.mozilla.org/mozilla-central/search?string=file_empty&find=xpconnect%2Ftests%2Fchrome&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central
Flags: needinfo?(bobbyholley)
Assignee | ||
Comment 9•9 years ago
|
||
Oops, good point, fixed.
Comment 11•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•