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

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

Issue 1274643002: CSSStyleDeclaraction returns empty string (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed changes from imported/csswg-test Created 5 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <script src="../resources/js-test.js"></script> 3 <script src="../resources/js-test.js"></script>
4 <script> 4 <script>
5 debug("This test checks that -internal-* properties are not exposed to JS.") 5 debug("This test checks that -internal-* properties are not exposed to JS.")
6 debug(""); 6 debug("");
7 debug(""); 7 debug("");
8 8
9 // This contains the properties along with an accepted value to ensure that we c an't 9 // This contains the properties along with an accepted value to ensure that we c an't
10 // set it from JavaScript. 10 // set it from JavaScript.
11 var internalProperties = { "-internal-marquee-direction": "alternate" }; 11 var internalProperties = { "-internal-marquee-direction": "alternate" };
12 for (var property in internalProperties) { 12 for (var property in internalProperties) {
13 debug("Testing " + property); 13 debug("Testing " + property);
14 element = document.createElement("foo"); 14 element = document.createElement("foo");
15 document.body.appendChild(element); 15 document.body.appendChild(element);
16 shouldBeNull("window.getComputedStyle(element).getPropertyValue(property)") 16 shouldBeEqualToString("window.getComputedStyle(element).getPropertyValue(pro perty)", "");
17 shouldBeUndefined("element.style[property]") 17 shouldBeUndefined("element.style[property]");
18 18
19 debug("Value after setting " + property + " to " + internalProperties[proper ty]); 19 debug("Value after setting " + property + " to " + internalProperties[proper ty]);
20 element.style.setProperty(property, internalProperties[property]); 20 element.style.setProperty(property, internalProperties[property]);
21 shouldBeUndefined("element.style[property]") 21 shouldBeUndefined("element.style[property]")
22 22
23 document.body.removeChild(element); 23 document.body.removeChild(element);
24 debug(""); 24 debug("");
25 } 25 }
26 </script> 26 </script>
27 </body> 27 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698