Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html |
| diff --git a/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html b/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a15ebcbf302d66ca50eb8656d122394dcc886abe |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html |
| @@ -0,0 +1,35 @@ |
| +<html> |
| +<head> |
| +<script> |
| +if (!window.testRunner) { |
| + document.write("This test does not work in manual mode."); |
| +} else { |
| + testRunner.dumpAsText() |
| + testRunner.waitUntilDone(); |
| +} |
| + |
| +function onLoad() { |
| + var plugin = document.getElementById("test"); |
| + plugin.setAttribute("type", "application/x-blink-deprecated-test-plugin"); |
| + |
| + function TestObject () { |
| + Object.defineProperties(this, { |
| + "testprop": { get: function () { return undefined; } } |
|
dcheng
2016/03/21 17:29:21
If you rebase, can you just use testObject instead
Julien Isorce Samsung
2016/03/21 18:02:56
Do you mean renaming "testprop" to "testObject" ev
dcheng
2016/03/21 18:09:15
https://codereview.chromium.org/1814093003 recentl
|
| + }); |
| + } |
| + |
| + var ref = new TestObject; |
| + |
| + if (ref.hasOwnProperty("testprop") === plugin.hasOwnProperty("testprop") == true) |
| + document.getElementById('result').innerHTML = 'SUCCESS'; |
| + |
| + testRunner.notifyDone(); |
| +} |
| +</script> |
| +</head> |
| +<body onload="onLoad()"> |
| +<div>This tests checks that hasOwnProperty return true on plugin's getters that return undefined</div> |
| +<object id="test" type="application/x-blink-deprecated-test-plugin"></object> |
| +<div id="result">FAILURE</div> |
| +</body> |
| +</html> |