mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 23:05:42 +00:00
Bug 1184351. Remove a race in the picture-tag cases in mixed-content web platform tests. r=jgraham
This commit is contained in:
parent
0858e31ab6
commit
b0077c1653
@ -1,5 +0,0 @@
|
|||||||
[opt-in-blocks.https.html]
|
|
||||||
type: testharness
|
|
||||||
disabled:
|
|
||||||
if debug and (os == "linux"): https://bugzilla.mozilla.org/show_bug.cgi?id=1184351
|
|
||||||
if e10s and (os == "linux"): https://bugzilla.mozilla.org/show_bug.cgi?id=1184351
|
|
@ -1,10 +0,0 @@
|
|||||||
[no-opt-in-blocks.https.html]
|
|
||||||
type: testharness
|
|
||||||
disabled:
|
|
||||||
if e10s and (os == "linux"): https://bugzilla.mozilla.org/show_bug.cgi?id=1184351
|
|
||||||
if e10s and (os == "mac"): https://bugzilla.mozilla.org/show_bug.cgi?id=1184351
|
|
||||||
[opt_in_method: no-opt-in\n origin: cross-origin-http\n source_scheme: https\n context_nesting: top-level\n redirection: no-redirect\n subresource: picture-tag\n expectation: blocked]
|
|
||||||
expected:
|
|
||||||
if debug and (os == "linux"): FAIL
|
|
||||||
if debug and (os == "mac"): FAIL
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
|||||||
[no-opt-in-blocks.https.html]
|
|
||||||
type: testharness
|
|
||||||
disabled:
|
|
||||||
if debug and (os == "linux"): https://bugzilla.mozilla.org/show_bug.cgi?id=1184351
|
|
||||||
if e10s and (os == "linux"): https://bugzilla.mozilla.org/show_bug.cgi?id=1184351
|
|
||||||
if e10s and (os == "mac"): https://bugzilla.mozilla.org/show_bug.cgi?id=1184351
|
|
||||||
[opt_in_method: no-opt-in\n origin: same-host-http\n source_scheme: https\n context_nesting: top-level\n redirection: no-redirect\n subresource: picture-tag\n expectation: blocked]
|
|
||||||
expected:
|
|
||||||
if debug and (os == "mac"): FAIL
|
|
||||||
|
|
@ -107,11 +107,22 @@ function createElement(tagName, attrs, parent, doBindEvents) {
|
|||||||
|
|
||||||
// We set the attributes after binding to events to catch any
|
// We set the attributes after binding to events to catch any
|
||||||
// event-triggering attribute changes. E.g. form submission.
|
// event-triggering attribute changes. E.g. form submission.
|
||||||
setAttributes(element, attrs);
|
//
|
||||||
|
// But be careful with images: unlike other elements they will start the load
|
||||||
|
// as soon as the attr is set, even if not in the document yet, and sometimes
|
||||||
|
// complete it synchronously, so the append doesn't have the effect we want.
|
||||||
|
// So for images, we want to set the attrs after appending, whereas for other
|
||||||
|
// elements we want to do it before appending.
|
||||||
|
var isImg = (tagName == "img");
|
||||||
|
if (!isImg)
|
||||||
|
setAttributes(element, attrs);
|
||||||
|
|
||||||
if (parent)
|
if (parent)
|
||||||
parent.appendChild(element);
|
parent.appendChild(element);
|
||||||
|
|
||||||
|
if (isImg)
|
||||||
|
setAttributes(element, attrs);
|
||||||
|
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user