Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(799)

Unified Diff: third_party/WebKit/LayoutTests/plugins/plugin-scriptable.html

Issue 1813823002: Handle the case where the v8 scriptable object has a property defined with value undefined. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/plugins/plugin-scriptable-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/plugins/plugin-scriptable-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698