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

Side by Side Diff: LayoutTests/fast/css/shorthand-setProperty-important.html

Issue 180353002: Make getProperty more strict when handling the priority parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add idl change to distinguish between null and empty string Created 6 years, 10 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <script>
9
10 description("Verify that the priority parameter is a case-insensitive match to ' important' or the empty string.");
11
12 var testContainer = document.createElement("div");
13 document.body.appendChild(testContainer);
14
15 testContainer.innerHTML = '<div id="test">hello</div>';
16
17 e = document.getElementById('test');
18
19 // Test "important" strictness
20 e.style.borderBottomStyle = "";
21 e.style.setProperty("border-bottom-style", "solid", "!important");
22 shouldBe("e.style.getPropertyValue('border-bottom-style')", "null");
23 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''");
24
25 e.style.borderBottomStyle = "";
26 e.style.setProperty("border-bottom-style", "solid", "very important");
27 shouldBe("e.style.getPropertyValue('border-bottom-style')", "null");
28 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''");
29
30 e.style.borderBottomStyle = "";
31 e.style.setProperty("border-bottom-style", "solid", "impORTANT");
32 shouldBe("e.style.getPropertyValue('border-bottom-style')", "'solid'");
33 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "'important'");
34
35 e.style.borderBottomStyle = "";
36 e.style.setProperty("border-bottom-style", "solid", "random");
37 shouldBe("e.style.getPropertyValue('border-bottom-style')", "null");
38 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "''");
39
40 document.body.removeChild(testContainer);
41 </script>
42 </body>
43 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/shorthand-priority.html ('k') | LayoutTests/fast/css/shorthand-setProperty-important-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698