mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
Update web-platform-tests to revision cf8340b5fae7b820788ffc31f8cc6b6b04978002
This commit is contained in:
parent
a547ae6826
commit
538f8f0ef9
41 changed files with 270 additions and 295 deletions
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset=utf-8>
|
||||
<title>Test for [[SetPrototypeOf]] with Windows</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
assert_throws(new TypeError, function() {
|
||||
Object.setPrototypeOf(window, window);
|
||||
}, "Setting the prototype should throw");
|
||||
}, "Setting the prototype of a window to itself via setPrototypeOf");
|
||||
|
||||
test(function() {
|
||||
assert_throws(new TypeError, function() {
|
||||
window.__proto__ = window;
|
||||
}, "Setting the prototype should throw");
|
||||
}, "Setting the prototype of a window to itself via __proto__");
|
||||
|
||||
test(function() {
|
||||
assert_throws(new TypeError, function() {
|
||||
Object.setPrototypeOf(window, Object.create(window));
|
||||
}, "Setting the prototype should throw");
|
||||
}, "Setting the prototype of a window to something that has the window on " +
|
||||
"its proto chain via setPrototypeOf");
|
||||
|
||||
test(function() {
|
||||
assert_throws(new TypeError, function() {
|
||||
window.__proto__ = Object.create(window);
|
||||
}, "Setting the prototype should throw");
|
||||
}, "Setting the prototype of a window to something that has the window on " +
|
||||
"its proto chain via __proto__");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue