Bug 1456527 [wpt PR 10607] - Deprecate document.origin, a=testonly
authorPhilip Jägenstedt <foolip@chromium.org>
Tue, 01 May 2018 14:52:26 +0000
changeset 472666 edfffa28463a1f84d604388d5295f223efd9a165
parent 472665 9eddd875f444f85e9c51ac7ccf18e573343fa97e
child 472667 31b6943c7bec30239685fc0955099a5d5795eea7
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1456527, 10607, 692084, 1013699, 553537
milestone61.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 1456527 [wpt PR 10607] - Deprecate document.origin, a=testonly Automatic update from web-platform-testsDeprecate document.origin Intent to Deprecate and Remove: https://groups.google.com/a/chromium.org/d/msg/blink-dev/0D_37iuh1zc/ndyyNaxgCQAJ Bug: 692084 Change-Id: Iae09a7d82e09c9bc3f0394dfa476370fd1efe516 Reviewed-on: https://chromium-review.googlesource.com/1013699 Reviewed-by: Mike West <mkwst@chromium.org> Commit-Queue: Philip J├Ągenstedt <foolip@chromium.org> Cr-Commit-Position: refs/heads/master@{#553537} -- wpt-commits: 3e538e72b8f12de065612862486c3fc24beb9c53 wpt-pr: 10607
testing/web-platform/meta/MANIFEST.json
testing/web-platform/tests/content-security-policy/frame-ancestors/frame-ancestors-overrides-xfo.html
testing/web-platform/tests/referrer-policy/generic/common.js
testing/web-platform/tests/referrer-policy/generic/referrer-policy-test-case.js
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -425553,17 +425553,17 @@
    "c6d7b2b67f933e00feadefa00263cc3b17443395",
    "testharness"
   ],
   "content-security-policy/frame-ancestors/frame-ancestors-none-block.html": [
    "b5d0f5f0923f8c1e3400d91f6194f665d7a30a97",
    "testharness"
   ],
   "content-security-policy/frame-ancestors/frame-ancestors-overrides-xfo.html": [
-   "988cf59388b862631a33dfab0565c937e9515763",
+   "a1f179dec77eec4b0172613c56b2ba9608e24b12",
    "testharness"
   ],
   "content-security-policy/frame-ancestors/frame-ancestors-self-allow.html": [
    "635dd6a6ae1cc8f51fad8b9c0cdcaf7d2b8322b4",
    "testharness"
   ],
   "content-security-policy/frame-ancestors/frame-ancestors-self-block.html": [
    "31b16e7e4c7113ec27cba6c0b880b2472fbc174b",
@@ -590685,29 +590685,29 @@
    "ee846339f4196a496b90652bbfbdeb13ddab5884",
    "testharness"
   ],
   "referrer-policy/css-integration/processing-instruction.html": [
    "cc6d82ccc48376e75c323711b61f6d013305c655",
    "testharness"
   ],
   "referrer-policy/generic/common.js": [
-   "00233e7d4513c8e3c4b7f7fa60f313ef1b6dbddd",
+   "583f61d9d6f30742f8144ded8ea31035a07034a3",
    "support"
   ],
   "referrer-policy/generic/iframe-inheritance.html": [
    "67531ab9869113d138d781ed8d0c92eefa08ec3b",
    "testharness"
   ],
   "referrer-policy/generic/link-rel-prefetch.html": [
    "96461340190f20f47a50b7fa4e6cdf9d2a7e09de",
    "testharness"
   ],
   "referrer-policy/generic/referrer-policy-test-case.js": [
-   "20c8273fd2a2cad07d3a607717d69d6ae94cf27e",
+   "62d77f2911b075bfa2de6138faffd8f5997ac7d5",
    "support"
   ],
   "referrer-policy/generic/sandboxed-iframe-with-opaque-origin.html": [
    "7c2be55288d3e3a7524aa537d1e88314857b7827",
    "testharness"
   ],
   "referrer-policy/generic/sanity-checker.js": [
    "1ff719209d37a7a6adc1df63247a5d3642fbf4c8",
--- a/testing/web-platform/tests/content-security-policy/frame-ancestors/frame-ancestors-overrides-xfo.html
+++ b/testing/web-platform/tests/content-security-policy/frame-ancestors/frame-ancestors-overrides-xfo.html
@@ -5,17 +5,17 @@
     <script src="/resources/testharnessreport.js"></script>
 </head>
 <body>
     <script>
         async_test(function (t) {
             var i = document.createElement('iframe');
             i.src = "support/frame-ancestors-and-x-frame-options.sub.html?policy='self'&xfo=DENY";
             i.onload = t.step_func_done(function () {
-                assert_equals(i.contentDocument.origin, document.origin, "The same-origin page loaded.");
+                assert_equals(i.contentWindow.origin, window.origin, "The same-origin page loaded.");
             });
             document.body.appendChild(i);
         }, "A 'frame-ancestors' CSP directive overrides an 'x-frame-options' header which would block the page.");
 
         async_test(function (t) {
             var i = document.createElement('iframe');
             i.src = "support/frame-ancestors-and-x-frame-options.sub.html?policy=other-origin.com&xfo=SAMEORIGIN";
             i.onload = t.step_func_done(function () {
--- a/testing/web-platform/tests/referrer-policy/generic/common.js
+++ b/testing/web-platform/tests/referrer-policy/generic/common.js
@@ -243,12 +243,8 @@ function queryScript(url, callback) {
 
   document.body.appendChild(script);
 }
 
  // SanityChecker does nothing in release mode.
 function SanityChecker() {}
 SanityChecker.prototype.checkScenario = function() {};
 SanityChecker.prototype.checkSubresourceResult = function() {};
-
-// TODO(kristijanburnik): document.origin is supported since Chrome 41,
-// other browsers still don't support it. Remove once they do.
-document.origin = document.origin || (location.protocol + "//" + location.host);
--- a/testing/web-platform/tests/referrer-policy/generic/referrer-policy-test-case.js
+++ b/testing/web-platform/tests/referrer-policy/generic/referrer-policy-test-case.js
@@ -24,17 +24,17 @@ function ReferrerPolicyTestCase(scenario
     "xhr-request": queryXhr
   };
 
   var referrerUrlResolver = {
     "omitted": function() {
       return undefined;
     },
     "origin": function() {
-      return document.origin + "/";
+      return self.origin + "/";
     },
     "stripped-referrer": function() {
       return stripUrlForUseAsReferrer(location.toString());
     }
   };
 
   var t = {
     _scenario: scenario,