Bug 1636527 [wpt PR 23486] - Implement cross origin resource policy check , a=testonly
authorBastien Orivel <eijebong@bananium.fr>
Wed, 13 May 2020 09:48:05 +0000
changeset 531154 716ce44ad8a081d407caa06714a4b3fc263c0750
parent 531153 ae48b7d4543c9eec53af8fc3cb444f08296bddd7
child 531155 e8d82466ca218e703d2109edfa57f593021eba95
push id37435
push userapavel@mozilla.com
push dateWed, 20 May 2020 15:28:23 +0000
treeherdermozilla-central@5415da14ec9a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1636527, 23486
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1636527 [wpt PR 23486] - Implement cross origin resource policy check , a=testonly Automatic update from web-platform-tests Implement cross origin resource policy check I removed the window getter usage from those tests as servo does not support that yet. -- wpt-commits: c0981259b04a0d2dfd2c6ba397802d64b32c8974 wpt-pr: 23486
testing/web-platform/tests/fetch/cross-origin-resource-policy/image-loads.html
testing/web-platform/tests/fetch/cross-origin-resource-policy/script-loads.html
--- a/testing/web-platform/tests/fetch/cross-origin-resource-policy/image-loads.html
+++ b/testing/web-platform/tests/fetch/cross-origin-resource-policy/image-loads.html
@@ -11,16 +11,17 @@
 const host = get_host_info();
 const notSameSiteBaseURL = host.HTTP_NOTSAMESITE_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
 const ok = true;
 const ko = false;
 const noCors = false;
 
 function loadImage(url, shoudLoad, corsMode, title)
 {
+    const testDiv = document.getElementById("testDiv");
     promise_test(() => {
         const img = new Image();
         if (corsMode)
             img.crossOrigin = corsMode;
         img.src = url;
         return new Promise((resolve, reject) => {
             img.onload = shoudLoad ? resolve : reject;
             img.onerror = shoudLoad ? reject : resolve;
--- a/testing/web-platform/tests/fetch/cross-origin-resource-policy/script-loads.html
+++ b/testing/web-platform/tests/fetch/cross-origin-resource-policy/script-loads.html
@@ -11,16 +11,17 @@
 const host = get_host_info();
 const notSameSiteBaseURL = host.HTTP_NOTSAMESITE_ORIGIN + window.location.pathname.replace(/\/[^\/]*$/, '/') ;
 const ok = true;
 const ko = false;
 const noCors = false;
 
 function loadScript(url, shoudLoad, corsMode, title)
 {
+    const testDiv = document.getElementById("testDiv");
     promise_test(() => {
         const script = document.createElement("script");
         if (corsMode)
             script.crossOrigin = corsMode;
         script.src = url;
         return new Promise((resolve, reject) => {
             script.onload = shoudLoad ? resolve : reject;
             script.onerror = shoudLoad ? reject : resolve;