Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / getter-on-window-object2.html
blob67d3fc0515582570e1566d5cc115d6ece9569e32
1 <script src="../../resources/js-test.js"></script>
3 <script>
4 description("This page tests what happens when a getter / setter on the window object conflicts with another property or declared variable");
6 var x = 1;
7 try {
8 window.__defineGetter__("x", function() { return "window.x __getter__"; });
9 } catch(e) { debug(e); }
11 shouldBe("window.x", "1");
12 shouldBe("typeof window.__lookupGetter__('x')", "'undefined'");
13 shouldBe("typeof Object.getOwnPropertyDescriptor(window, 'x').get", "'undefined'");
14 debug("");
17 try {
18 window.__defineSetter__("x", function() { debug("window.x __setter__ called"); });
19 } catch(e) { debug(e); }
20 x = 2;
22 shouldBe("window.x", "2");
23 shouldBe("typeof window.__lookupGetter__('x')", "'undefined'");
24 shouldBe("typeof Object.getOwnPropertyDescriptor(window, 'x').get", "'undefined'");
25 debug("");
28 window.y = 1;
29 try {
30 window.__defineGetter__("y", function() { return "window.y __getter__"; });
31 } catch(e) { debug(e); }
33 shouldBe("window.y", "'window.y __getter__'");
34 shouldBe("typeof window.__lookupGetter__('y')", "'function'");
35 shouldBe("typeof Object.getOwnPropertyDescriptor(window, 'y').get", "'function'");
36 debug("");
39 try {
40 window.__defineSetter__("y", function() { "window.y __setter__ called"; });
41 } catch(e) { debug(e); }
42 window.y = 2;
44 shouldBe("window.y", "'window.y __getter__'");
45 shouldBe("typeof window.__lookupGetter__('y')", "'function'");
46 shouldBe("typeof Object.getOwnPropertyDescriptor(window, 'y').get", "'function'");
47 debug("");
50 try {
51 window.__defineSetter__("z", function() { "window.z __setter__ called"; });
52 } catch(e) { debug(e); }
53 window.z = 1;
55 shouldBeUndefined("window.z");
56 shouldBe("typeof window.__lookupSetter__('z')", "'function'");
57 shouldBe("typeof Object.getOwnPropertyDescriptor(window, 'z').set", "'function'");
59 </script>