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

Side by Side Diff: third_party/WebKit/LayoutTests/custom-properties/registered-property-cssom.html

Issue 2624213004: Fix setting css-wide keywords on registered custom properties (Closed)
Patch Set: Created 3 years, 11 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/Source/core/css/parser/CSSParserImpl.cpp » ('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 4
5 <style> 5 <style>
6 #inner { 6 #inner {
7 --length: 10px; 7 --length: 10px;
8 --color: red; 8 --color: red;
9 } 9 }
10 #outer { 10 #outer {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 assert_equals(inlineStyle.getPropertyValue('--color'), ''); 60 assert_equals(inlineStyle.getPropertyValue('--color'), '');
61 assert_equals(computedStyle.getPropertyValue('--length'), '10px'); 61 assert_equals(computedStyle.getPropertyValue('--length'), '10px');
62 assert_equals(computedStyle.getPropertyValue('--color'), 'red'); 62 assert_equals(computedStyle.getPropertyValue('--color'), 'red');
63 }, "Values can be removed from inline styles"); 63 }, "Values can be removed from inline styles");
64 64
65 test(function() { 65 test(function() {
66 sheetStyle.setProperty('--length', 'banana'); // Invalid, no change 66 sheetStyle.setProperty('--length', 'banana'); // Invalid, no change
67 assert_equals(computedStyle.getPropertyValue('--length'), '10px'); 67 assert_equals(computedStyle.getPropertyValue('--length'), '10px');
68 sheetStyle.setProperty('--length', '20px'); 68 sheetStyle.setProperty('--length', '20px');
69 assert_equals(computedStyle.getPropertyValue('--length'), '20px'); 69 assert_equals(computedStyle.getPropertyValue('--length'), '20px');
70 sheetStyle.setProperty('--length', 'initial');
71 assert_equals(computedStyle.getPropertyValue('--length'), '0px');
70 }, "Stylesheets can be modified by CSSOM"); 72 }, "Stylesheets can be modified by CSSOM");
71 73
72 test(function() { 74 test(function() {
73 inlineStyle.setProperty('--length', '30px'); 75 inlineStyle.setProperty('--length', '30px');
74 inlineStyle.setProperty('--color', 'pink'); 76 inlineStyle.setProperty('--color', 'pink');
75 assert_equals(inlineStyle.getPropertyValue('--length'), '30px'); 77 assert_equals(inlineStyle.getPropertyValue('--length'), '30px');
76 assert_equals(inlineStyle.getPropertyValue('--color'), 'pink'); 78 assert_equals(inlineStyle.getPropertyValue('--color'), 'pink');
77 assert_equals(computedStyle.getPropertyValue('--length'), '30px'); 79 assert_equals(computedStyle.getPropertyValue('--length'), '30px');
78 assert_equals(computedStyle.getPropertyValue('--color'), 'pink'); 80 assert_equals(computedStyle.getPropertyValue('--color'), 'pink');
81 inlineStyle.setProperty('--color', 'inherit');
82 assert_equals(inlineStyle.getPropertyValue('--color'), 'inherit');
83 assert_equals(computedStyle.getPropertyValue('--color'), 'blue');
79 }, "Valid values can be set on inline styles"); 84 }, "Valid values can be set on inline styles");
80 </script> 85 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698