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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/variables/custom-properties-serialization.html

Issue 2538613002: CSS Variables: Fix double include of testharness.js (Closed)
Patch Set: Created 4 years 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 | third_party/WebKit/LayoutTests/fast/css/variables/custom-properties-serialization-quirks-mode.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 <script src="../../../resources/testharness.js"></script> 2 <meta charset="UTF-8">
3 <script src="../../../resources/testharness.js"></script> 3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script> 4 <script src="../../../resources/testharnessreport.js"></script>
5 <meta charset="UTF-8">
6 5
7 <style> 6 <style>
8 #test1 { 7 #test1 {
9 --camelCase: blue; 8 --camelCase: blue;
10 color: var(--camelCase); 9 color: var(--camelCase);
11 } 10 }
12 #test2 { 11 #test2 {
13 --Aå: 100px; 12 --Aå: 100px;
14 width: var(--Aå); 13 width: var(--Aå);
15 } 14 }
16 #test3 { 15 #test3 {
17 --colour: green; 16 --colour: green;
18 background: var(--colour); 17 background: var(--colour);
19 color: var(--color); 18 color: var(--color);
20 } 19 }
21 </style> 20 </style>
22 21
23 <script> 22 <script>
24 test(function() { 23 test(function() {
25 assert_equals(document.styleSheets[0].cssRules[0].cssText, "#test1 { --camelCa se: blue; color: var(--camelCase); }"); 24 var cssRules = document.styleSheets[0].cssRules;
26 assert_equals(document.styleSheets[0].cssRules[1].cssText, "#test2 { --Aå: 100 px; width: var(--Aå); }"); 25 assert_equals(cssRules[0].cssText, "#test1 { --camelCase: blue; color: var(--c amelCase); }");
27 assert_equals(document.styleSheets[0].cssRules[0].style.getPropertyValue("--ca melCase"), " blue"); 26 assert_equals(cssRules[1].cssText, "#test2 { --Aå: 100px; width: var(--Aå); }" );
28 assert_equals(document.styleSheets[0].cssRules[0].style.getPropertyValue("colo r"), "var(--camelCase)"); 27 assert_equals(cssRules[0].style.getPropertyValue("--camelCase"), " blue");
29 assert_equals(document.styleSheets[0].cssRules[1].style.getPropertyValue("--Aå "), " 100px"); 28 assert_equals(cssRules[0].style.getPropertyValue("color"), "var(--camelCase)") ;
30 assert_equals(document.styleSheets[0].cssRules[1].style.getPropertyValue("widt h"), "var(--Aå)"); 29 assert_equals(cssRules[1].style.getPropertyValue("--Aå"), " 100px");
31 assert_equals(document.styleSheets[0].cssRules[2].style.getPropertyValue("back ground"), "var(--colour)"); 30 assert_equals(cssRules[1].style.getPropertyValue("width"), "var(--Aå)");
32 assert_equals(document.styleSheets[0].cssRules[2].style.getPropertyValue("colo r"), "var(--color)"); 31 assert_equals(cssRules[2].style.getPropertyValue("background"), "var(--colour) ");
32 assert_equals(cssRules[2].style.getPropertyValue("color"), "var(--color)");
33 }, "Custom properties serialization"); 33 }, "Custom properties serialization");
34 </script> 34 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/variables/custom-properties-serialization-quirks-mode.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698