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..3c269db8c3da5e8cde47b8834c2d5881451f84cb |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html |
@@ -0,0 +1,34 @@ |
+<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"); |
+ |
+ Object.defineProperties(plugin.testObject, { |
+ "p1": { get: function () { return undefined; } }, |
+ "p2": {} |
+ }); |
+ |
+ if (plugin.hasOwnProperty("p1") && plugin.testObject.hasOwnProperty("p1") && |
+ plugin.hasOwnProperty("p2") && plugin.testObject.hasOwnProperty("p2")) { |
+ document.getElementById('result').innerHTML = 'SUCCESS'; |
bashi
2016/03/21 23:33:15
Printing SUCCESS is not the best way to show resul
|
+ } |
+ |
+ testRunner.notifyDone(); |
+} |
+</script> |
+</head> |
+<body onload="onLoad()"> |
+<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> |
+<object id="test" type="application/x-blink-deprecated-test-plugin"></object> |
+<div id="result">FAILURE</div> |
+</body> |
+</html> |