mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444
This commit is contained in:
parent
25e8bf69e6
commit
665817d2a6
35333 changed files with 1818077 additions and 16036 deletions
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>[[SetPrototypeOf]] on a WindowProxy object should not allow changing its value: cross-origin via document.domain</title>
|
||||
<link rel="help" href="http://html.spec.whatwg.org/multipage/#windowproxy-setprototypeof">
|
||||
<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/test-setting-immutable-prototype.js"></script>
|
||||
|
||||
<iframe src="/common/domain-setter.sub.html"></iframe>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
// This page does *not* set document.domain, so it's cross-origin with the iframe
|
||||
setup({ explicit_done: true });
|
||||
|
||||
window.onload = () => {
|
||||
const target = frames[0];
|
||||
|
||||
test(() => {
|
||||
assert_equals(Object.getPrototypeOf(target), null);
|
||||
}, "Cross-origin via document.domain: the prototype is null");
|
||||
|
||||
testSettingImmutablePrototype("Cross-origin via document.domain", target, null, { isSameOriginDomain: false });
|
||||
|
||||
done();
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>[[SetPrototypeOf]] on a WindowProxy object should not allow changing its value: cross-origin</title>
|
||||
<link rel="help" href="http://html.spec.whatwg.org/multipage/#windowproxy-setprototypeof">
|
||||
<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/test-setting-immutable-prototype.js"></script>
|
||||
|
||||
<iframe src="//{{domains[www]}}:{{ports[http][1]}}/common/blank.html"></iframe>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
setup({ explicit_done: true });
|
||||
|
||||
window.onload = () => {
|
||||
const target = frames[0];
|
||||
|
||||
test(() => {
|
||||
assert_equals(Object.getPrototypeOf(target), null);
|
||||
}, "Cross-origin: the prototype is null");
|
||||
|
||||
testSettingImmutablePrototype("Cross-origin", target, null, { isSameOriginDomain: false });
|
||||
|
||||
done();
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>[[SetPrototypeOf]] on a WindowProxy object should not allow changing its value: cross-origin via document.domain after initially getting the object</title>
|
||||
<link rel="help" href="http://html.spec.whatwg.org/multipage/#windowproxy-setprototypeof">
|
||||
<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/test-setting-immutable-prototype.js"></script>
|
||||
|
||||
<iframe src="/common/blank.html"></iframe>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
setup({ explicit_done: true });
|
||||
|
||||
window.onload = () => {
|
||||
const target = frames[0];
|
||||
const origProto = Object.getPrototypeOf(target);
|
||||
|
||||
test(() => {
|
||||
assert_not_equals(origProto, null);
|
||||
}, "Same-origin (for now): the prototype is accessible");
|
||||
|
||||
document.domain = "{{host}}";
|
||||
|
||||
test(() => {
|
||||
assert_equals(Object.getPrototypeOf(target), null);
|
||||
}, "Became cross-origin via document.domain: the prototype is now null");
|
||||
|
||||
testSettingImmutablePrototype("Became cross-origin via document.domain", target, null, { isSameOriginDomain: false });
|
||||
|
||||
testSettingImmutablePrototypeToNewValueOnly(
|
||||
"Became cross-origin via document.domain", target, origProto,
|
||||
"the original value from before going cross-origin", { isSameOriginDomain: false });
|
||||
|
||||
done();
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>[[SetPrototypeOf]] on a WindowProxy object should not allow changing its value: cross-origin, but same-origin-domain</title>
|
||||
<link rel="help" href="http://html.spec.whatwg.org/multipage/#windowproxy-setprototypeof">
|
||||
<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/test-setting-immutable-prototype.js"></script>
|
||||
|
||||
<iframe src="//{{domains[www]}}:{{ports[http][1]}}/common/domain-setter.sub.html"></iframe>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
document.domain = "{{host}}";
|
||||
setup({ explicit_done: true });
|
||||
|
||||
window.onload = () => {
|
||||
const target = frames[0];
|
||||
const origProto = Object.getPrototypeOf(target);
|
||||
|
||||
test(() => {
|
||||
assert_not_equals(origProto, null);
|
||||
}, "Same-origin-domain prerequisite check: the original prototype is accessible");
|
||||
|
||||
testSettingImmutablePrototype("Same-origin-domain", target, origProto, { isSameOriginDomain: true });
|
||||
|
||||
done();
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,21 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>[[SetPrototypeOf]] on a WindowProxy object should not allow changing its value: same-origin</title>
|
||||
<link rel="help" href="http://html.spec.whatwg.org/multipage/#windowproxy-setprototypeof">
|
||||
<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
|
||||
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/test-setting-immutable-prototype.js"></script>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
const origProto = Object.getPrototypeOf(window);
|
||||
|
||||
test(() => {
|
||||
assert_not_equals(origProto, null);
|
||||
}, "Same-origin prerequisite check: the original prototype is accessible");
|
||||
|
||||
testSettingImmutablePrototype("Same-origin", window, origProto, { isSameOriginDomain: true });
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue