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
This commit is contained in:
Philip Jägenstedt 2018-05-01 14:52:26 +00:00 коммит произвёл James Graham
Родитель 3d47281a72
Коммит e7755d657f
4 изменённых файлов: 5 добавлений и 9 удалений

Просмотреть файл

@ -425558,7 +425558,7 @@
"testharness"
],
"content-security-policy/frame-ancestors/frame-ancestors-overrides-xfo.html": [
"988cf59388b862631a33dfab0565c937e9515763",
"a1f179dec77eec4b0172613c56b2ba9608e24b12",
"testharness"
],
"content-security-policy/frame-ancestors/frame-ancestors-self-allow.html": [
@ -590690,7 +590690,7 @@
"testharness"
],
"referrer-policy/generic/common.js": [
"00233e7d4513c8e3c4b7f7fa60f313ef1b6dbddd",
"583f61d9d6f30742f8144ded8ea31035a07034a3",
"support"
],
"referrer-policy/generic/iframe-inheritance.html": [
@ -590702,7 +590702,7 @@
"testharness"
],
"referrer-policy/generic/referrer-policy-test-case.js": [
"20c8273fd2a2cad07d3a607717d69d6ae94cf27e",
"62d77f2911b075bfa2de6138faffd8f5997ac7d5",
"support"
],
"referrer-policy/generic/sandboxed-iframe-with-opaque-origin.html": [

Просмотреть файл

@ -10,7 +10,7 @@
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.");

Просмотреть файл

@ -248,7 +248,3 @@ function queryScript(url, callback) {
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);

Просмотреть файл

@ -29,7 +29,7 @@ function ReferrerPolicyTestCase(scenario, testDescription, sanityChecker) {
return undefined;
},
"origin": function() {
return document.origin + "/";
return self.origin + "/";
},
"stripped-referrer": function() {
return stripUrlForUseAsReferrer(location.toString());