Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / js / script-tests / strict-readonly-statics.js
blobada8e655fd7a9ae5e35097a513239c068fc4db09
1 description(
2 "This tests that a assigning to a readonly property in a static or symbol table throws in strict mode."
3 );
5 function testWindowUndefined()
7 "use strict";
8 try {
9 window.undefined = 42;
10 } catch (e) {
11 return e instanceof TypeError;
13 return false;
16 function testNumberMAX_VALUE()
18 "use strict";
19 try {
20 Number.MAX_VALUE = 42;
21 } catch (e) {
22 return e instanceof TypeError;
24 return false;
27 shouldBeTrue('testWindowUndefined()');
28 shouldBeTrue('testNumberMAX_VALUE()');