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

Unified Diff: LayoutTests/webexposed/internal-properties-should-not-be-exposed.html

Issue 22849019: Unexpose -webkit-marquee-direction (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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: LayoutTests/webexposed/internal-properties-should-not-be-exposed.html
diff --git a/LayoutTests/webexposed/internal-properties-should-not-be-exposed.html b/LayoutTests/webexposed/internal-properties-should-not-be-exposed.html
new file mode 100644
index 0000000000000000000000000000000000000000..83a7c1779fee4967dfa1c4a216679e7fc4eb8460
--- /dev/null
+++ b/LayoutTests/webexposed/internal-properties-should-not-be-exposed.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<body>
+<script src="../fast/js/resources/js-test-pre.js"></script>
+<script>
+debug("This test checks that -internal-* properties are not exposed to JS.")
+debug("");
+debug("");
+
+// This contains the properties along with an accepted value to ensure that we can't
+// set it from JavaScript.
+var internalProperties = { "-internal-marquee-direction": "alternate" };
+for (var property in internalProperties) {
+ debug("Testing " + property);
+ element = document.createElement("foo");
+ document.body.appendChild(element);
+ shouldBeNull("window.getComputedStyle(element).getPropertyValue(property)")
+ shouldBeNull("element.style.getPropertyCSSValue(property)")
+
+ debug("Value after setting " + property + " to " + internalProperties[property]);
+ element.style.setProperty(property, internalProperties[property]);
+ shouldBeNull("element.style.getPropertyCSSValue(property)")
+
+ document.body.removeChild(element);
+ debug("");
+}
+</script>
+<script src="../fast/js/resources/js-test-post.js"></script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698