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

Side by Side Diff: LayoutTests/fast/css/shorthand-priority.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
« no previous file with comments | « no previous file | LayoutTests/fast/css/shorthand-setProperty-important.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <script src="../../resources/js-test.js"></script> 5 <script src="../../resources/js-test.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <script> 8 <script>
9 9
10 description("Tests that querying the priority for a shorthand works."); 10 description("Tests that querying the priority for a shorthand works.");
11 11
12 var testContainer = document.createElement("div"); 12 var testContainer = document.createElement("div");
13 document.body.appendChild(testContainer); 13 document.body.appendChild(testContainer);
14 14
15 testContainer.innerHTML = '<div id="test">hello</div>'; 15 testContainer.innerHTML = '<div id="test">hello</div>';
16 16
17 e = document.getElementById('test'); 17 e = document.getElementById('test');
18 18
19 // Sanity check. 19 // Sanity check.
20 e.style.setProperty("border-bottom-style", "solid", "!important"); 20 e.style.setProperty("border-bottom-style", "solid", "important");
21 shouldBe("e.style.getPropertyValue('border-bottom-style')", "'solid'"); 21 shouldBe("e.style.getPropertyValue('border-bottom-style')", "'solid'");
22 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "'important'"); 22 shouldBe("e.style.getPropertyPriority('border-bottom-style')", "'important'");
23 23
24 e.style.borderBottomStyle = ""; 24 e.style.borderBottomStyle = "";
25 e.style.border = "20px solid green"; 25 e.style.border = "20px solid green";
26 shouldBe("e.style.getPropertyValue('border')", "'20px solid green'"); 26 shouldBe("e.style.getPropertyValue('border')", "'20px solid green'");
27 shouldBe("e.style.getPropertyPriority('border')", "''"); 27 shouldBe("e.style.getPropertyPriority('border')", "''");
28 28
29 e.style.border = ""; 29 e.style.border = "";
30 e.style.setProperty("border", "20px solid green", "!important"); 30 e.style.setProperty("border", "20px solid green", "important");
31 shouldBe("e.style.getPropertyValue('border')", "'20px solid green'"); 31 shouldBe("e.style.getPropertyValue('border')", "'20px solid green'");
32 shouldBe("e.style.getPropertyPriority('border')", "'important'"); 32 shouldBe("e.style.getPropertyPriority('border')", "'important'");
33 33
34 document.body.removeChild(testContainer); 34 document.body.removeChild(testContainer);
35 </script> 35 </script>
36 </body> 36 </body>
37 </html> 37 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css/shorthand-setProperty-important.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698