rewrite mochitest-3 tests for using data: URI

RESOLVED FIXED in Firefox 56

Status

()

Core
DOM: Security
RESOLVED FIXED
4 months ago
4 months ago

People

(Reporter: allstars, Assigned: allstars)

Tracking

Trunk
mozilla56
Points:
---

Firefox Tracking Flags

(firefox56 fixed)

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

4 months ago
see the failure from https://treeherder.mozilla.org/#/jobs?repo=try&revision=ab6e9cdc1f1b4404fec71a838540e83cccd82865&selectedJob=108445218
(Assignee)

Comment 1

4 months ago
Created attachment 8880243 [details] [diff] [review]
WIP Patch.
(Assignee)

Comment 2

4 months ago
Created attachment 8880311 [details] [diff] [review]
Patch
Attachment #8880243 - Attachment is obsolete: true
Attachment #8880311 - Flags: review?(bugs)
(Assignee)

Comment 3

4 months ago
Comment on attachment 8880311 [details] [diff] [review]
Patch

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

::: modules/libpref/init/all.js
@@ +5662,5 @@
>  // If true, data: URIs will be treated as unique opaque origins, hence will use
>  // a NullPrincipal as the security context.
>  // Otherwise it will inherit the origin from parent node, this is the legacy
>  // behavior of Firefox.
> +pref("security.data_uri.unique_opaque_origin", true);

sorry, accidentally did this
(Assignee)

Comment 4

4 months ago
Created attachment 8880314 [details] [diff] [review]
Patch
Attachment #8880311 - Attachment is obsolete: true
Attachment #8880311 - Flags: review?(bugs)
Attachment #8880314 - Flags: review?(bugs)
Comment on attachment 8880314 [details] [diff] [review]
Patch

rs+
Attachment #8880314 - Flags: review?(bugs) → review+

Comment 6

4 months ago
Pushed by yhuang@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bc8aa66de70b
rewrite mochitest-3 tests for using data: URI. r=smaug
Backed out for frequently timing out in test_fullscreen-api-race.html:

https://hg.mozilla.org/integration/mozilla-inbound/rev/378eec38a3bc7d8e8949c7168431c8a6ac1e1b54

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=bc8aa66de70b11596db42bd3997fc1f33872c07b&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=110794868&repo=mozilla-inbound

12:06:47     INFO - Testing openNewTab, exitAndClose
12:06:47     INFO - About to enter fullscreen
12:06:47     INFO - Buffered messages logged at 12:01:43
12:06:47     INFO - TEST-PASS | dom/html/test/test_fullscreen-api-race.html | Should get fullscreenchange 
12:06:47     INFO - TEST-PASS | dom/html/test/test_fullscreen-api-race.html | Should have entered fullscreen 
12:06:47     INFO - TEST-PASS | dom/html/test/test_fullscreen-api-race.html | The window should be in fullscreen 
12:06:47     INFO - About to cancel fullscreen and close the window
12:06:47     INFO - TEST-PASS | dom/html/test/test_fullscreen-api-race.html | The window should have been closed 
12:06:47     INFO - TEST-FAIL | dom/html/test/test_fullscreen-api-race.html | The author of the test has indicated that flaky timeouts are expected.  Reason: Need to wait for potential fullscreen transition 
12:06:47     INFO - Buffered messages logged at 12:01:44
12:06:47     INFO - Testing openNewWindow, navigate
12:06:47     INFO - must wait for focus
12:06:47     INFO - About to enter fullscreen
12:06:47     INFO - TEST-PASS | dom/html/test/test_fullscreen-api-race.html | Should get fullscreenchange 
12:06:47     INFO - TEST-PASS | dom/html/test/test_fullscreen-api-race.html | Should have entered fullscreen 
12:06:47     INFO - TEST-PASS | dom/html/test/test_fullscreen-api-race.html | The window should be in fullscreen 
12:06:47     INFO - About to navigate to another page
12:06:47     INFO - must wait for load
12:06:47     INFO - Buffered messages finished
12:06:47     INFO - TEST-UNEXPECTED-FAIL | dom/html/test/test_fullscreen-api-race.html | Test timed out. 
12:06:47     INFO -     reportError@SimpleTest/TestRunner.js:121:7
12:06:47     INFO -     TestRunner._checkForHangs@SimpleTest/TestRunner.js:142:7
12:06:47     INFO -     setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:163:5
12:06:47     INFO -     setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:163:5
12:06:47     INFO -     setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:163:5
12:06:47     INFO -     setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:163:5
12:06:47     INFO -     setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:163:5
12:06:47     INFO -     setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:163:5
12:06:47     INFO -     setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:163:5
12:06:47     INFO -     setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:163:5
12:06:47     INFO -     setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:163:5
12:06:47     INFO -     setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:163:5
12:06:47     INFO -     setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:163:5
12:06:47     INFO -     setTimeout handler*TestRunner._checkForHangs@SimpleTest/TestRunner.js:163:5
12:06:47     INFO -     TestRunner.runTests@SimpleTest/TestRunner.js:380:5
12:06:47     INFO -     RunSet.runtests@SimpleTest/setup.js:194:3
12:06:47     INFO -     RunSet.runall@SimpleTest/setup.js:173:5
12:06:47     INFO -     hookupTests@SimpleTest/setup.js:266:5
12:06:47     INFO - parseTestManifest@http://mochi.test:8888/manifestLibrary.js:36:5
12:06:47     INFO - getTestManifest/req.onload@http://mochi.test:8888/manifestLibrary.js:49:11
12:06:47     INFO - EventHandlerNonNull*getTestManifest@http://mochi.test:8888/manifestLibrary.js:45:3
12:06:47     INFO -     hookup@SimpleTest/setup.js:246:5
12:06:47     INFO - EventHandlerNonNull*@http://mochi.test:8888/tests?autorun=1&closeWhenDone=1&consoleLevel=INFO&hideResultsTable=1&manifestFile=tests.json&dumpOutputDirectory=c%3A%5Cusers%5Ccltbld%7E1.000%5Cappdata%5Clocal%5Ctemp&cleanupCrashes=true:11:1
Flags: needinfo?(allstars.chh)
(Assignee)

Comment 8

4 months ago
I also found out test_fullscreen-api-race.html timeout a lot even without my patch, I guess it's because there's an assertion there, I filed bug 1366151 before

Meanwhile I'll revert my change in test_fullscreen-api-race.html and re-push again.

Sorry for the trouble.
Flags: needinfo?(allstars.chh)
(Assignee)

Comment 9

4 months ago
Created attachment 8882600 [details] [diff] [review]
Patch v2

revert fullscreen-api-race.html change
Attachment #8880314 - Attachment is obsolete: true
Attachment #8882600 - Flags: review+

Comment 10

4 months ago
Pushed by yhuang@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4acc9ab01f69
rewrite mochitest-3 tests for using data: URI. r=smaug

Comment 11

4 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/4acc9ab01f69
Status: ASSIGNED → RESOLVED
Last Resolved: 4 months ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.