Update web-platform-tests to revision cf8340b5fae7b820788ffc31f8cc6b6b04978002

This commit is contained in:
Ms2ger 2015-09-02 09:23:06 +02:00
parent a547ae6826
commit 538f8f0ef9
41 changed files with 270 additions and 295 deletions

View file

@ -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>