OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
2 <head> | |
3 <script src="../resources/js-test.js"></script> | |
4 <script> | |
5 description("This tests checks that hasOwnProperty return true on plugin's gette rs that return undefined"); | |
6 jsTestIsAsync = true; | |
bashi
2016/03/22 23:14:50
Why does this test need to be async?
| |
7 var ref; | |
8 | |
9 function onLoad() { | |
10 // The plugin implements testGetUndefined the same way as the following: | |
11 function ReferenceObject () { | |
12 Object.defineProperties(this, { | |
13 "testGetUndefined": { get: function () { return undefined; } } | |
14 }); | |
15 } | |
16 ref = new ReferenceObject(); | |
17 | |
18 shouldBeTrue('ref.hasOwnProperty("testGetUndefined")'); | |
19 shouldBeTrue('document.getElementById("plugin").hasOwnProperty("testGetUndef ined")'); | |
20 | |
21 finishJSTest(); | |
22 } | |
23 </script> | |
24 </head> | |
25 <body onload="onLoad()"> | |
26 <object id="plugin" type="application/x-blink-deprecated-test-plugin"></object> | |
27 </body> | |
28 </html> | |
OLD | NEW |