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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/prototype-property.html

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 11 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
Index: third_party/WebKit/LayoutTests/fast/dom/prototype-property.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/prototype-property.html b/third_party/WebKit/LayoutTests/fast/dom/prototype-property.html
index cd2c9a0a0345c16d7dda23d949979762fdfc0280..4b4f4458afe9ed70fcb05fe499ffc1735aa9a54f 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/prototype-property.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/prototype-property.html
@@ -4,6 +4,30 @@
<script src="../../resources/js-test.js"></script>
</head>
<body>
-<script src="script-tests/prototype-property.js"></script>
+<script>
+description("Make sure the 'prototype' property on generated Web IDL interfaces is { DontDelete | ReadOnly }.");
+
+function tryToDeletePrototype(o) {
+ var orig = o.prototype;
+ delete o.prototype;
+ var ret = o.prototype != orig;
+ o.prototype = orig;
+ return ret;
+}
+
+function tryToSetPrototype(o, value) {
+ var orig = o.prototype;
+ o.prototype = value;
+ var ret = o.prototype != orig;
+ o.prototype = orig;
+ return ret;
+}
+
+shouldBe("tryToDeletePrototype(window.HTMLElement)", "false");
+shouldBe("tryToSetPrototype(window.HTMLElement, null)", "false");
+shouldBe("tryToSetPrototype(window.HTMLElement, undefined)", "false");
+shouldBe("tryToSetPrototype(window.HTMLElement, 1)", "false");
+shouldBe("tryToSetPrototype(window.HTMLElement, window.Object.prototype)", "false");
+</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698