Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html> | |
| 2 <head> | |
| 3 <script> | |
| 4 if (!window.testRunner) { | |
| 5 document.write("This test does not work in manual mode."); | |
| 6 } else { | |
| 7 testRunner.dumpAsText() | |
| 8 testRunner.waitUntilDone(); | |
| 9 } | |
| 10 | |
| 11 function onLoad() { | |
| 12 var plugin = document.getElementById("test"); | |
| 13 plugin.setAttribute("type", "application/x-blink-deprecated-test-plugin"); | |
| 14 | |
| 15 Object.defineProperties(plugin.testObject, { | |
| 16 "p1": { get: function () { return undefined; } }, | |
| 17 "p2": {} | |
| 18 }); | |
| 19 | |
| 20 if (plugin.hasOwnProperty("p1") && plugin.testObject.hasOwnProperty("p1") && | |
| 21 plugin.hasOwnProperty("p2") && plugin.testObject.hasOwnProperty("p2")) { | |
| 22 document.getElementById('result').innerHTML = 'SUCCESS'; | |
|
bashi
2016/03/21 23:33:15
Printing SUCCESS is not the best way to show resul
| |
| 23 } | |
| 24 | |
| 25 testRunner.notifyDone(); | |
| 26 } | |
| 27 </script> | |
| 28 </head> | |
| 29 <body onload="onLoad()"> | |
| 30 <div>This tests checks that hasOwnProperty return true on plugin's getters that return undefined and on plugin's properties defined with value undefined</div> | |
| 31 <object id="test" type="application/x-blink-deprecated-test-plugin"></object> | |
| 32 <div id="result">FAILURE</div> | |
| 33 </body> | |
| 34 </html> | |
| OLD | NEW |