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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/variables/inherit-in-inline-style.html

Issue 2188343002: Fix serialization of css-wide keywords in custom properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/variables/inherit-in-inline-style-expected.txt » ('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 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script> 3 <script src="../../../resources/testharnessreport.js"></script>
4 <style> 4 <style>
5 #container { 5 #container {
6 --a: green; 6 --a: green;
7 } 7 }
8 8
9 #b { 9 #b {
10 --a: inherit; 10 --a: inherit;
11 } 11 }
12 12
13 </style> 13 </style>
14 14
15 <div id="container"> 15 <div id="container">
16 <div id="a" style="--a: inherit;"></div> 16 <div id="a" style="--a: inherit;"></div>
17 <div id="b"></div> 17 <div id="b"></div>
18 </div> 18 </div>
19 19
20 <script> 20 <script>
21 test(function() { 21 test(function() {
22 assert_equals(getComputedStyle(container).getPropertyValue("--a"), " green"); 22 assert_equals(getComputedStyle(container).getPropertyValue("--a"), " green");
23 assert_equals(getComputedStyle(a).getPropertyValue("--a"), " green"); 23 assert_equals(getComputedStyle(a).getPropertyValue("--a"), " green");
24 assert_equals(a.style.getPropertyValue("--a"), " inherit"); 24 assert_equals(a.style.getPropertyValue("--a"), "inherit");
25 assert_equals(a.style.cssText, "--a: inherit;");
25 }, 'The special inherit value can be read from inline style.'); 26 }, 'The special inherit value can be read from inline style.');
26 27
27 test(function() { 28 test(function() {
28 a.style.setProperty("--a", "inherit"); 29 a.style.setProperty("--a", "inherit");
29 assert_equals(a.style.getPropertyValue("--a"), " inherit"); 30 assert_equals(a.style.getPropertyValue("--a"), "inherit");
30 }, 'The special inherit value can be read after setting.') 31 }, 'The special inherit value can be read after setting.')
31 32
32 test(function() { 33 test(function() {
33 assert_equals(document.styleSheets[0].rules[1].style.getPropertyValue("--a"), " inherit"); 34 assert_equals(document.styleSheets[0].rules[1].style.getPropertyValue("--a"), "inherit");
34 }, 'The special inherit value can be read from a declared rule.') 35 }, 'The special inherit value can be read from a declared rule.')
35 </script> 36 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/variables/inherit-in-inline-style-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698