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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/variables/multiple-writes-to-inline-style.html

Issue 1905163003: Fix CSSParserToken::operator== for NumberTokens (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/CSSParserToken.h » ('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 <div id='testElem'></div> 4 <div id='testElem'></div>
5 <script> 5 <script>
6 6
7 test(function() { 7 test(function() {
8 assert_equals(testElem.getAttribute('style'), null); 8 assert_equals(testElem.getAttribute('style'), null);
9 testElem.style.setProperty('--foo', 'first'); 9 testElem.style.setProperty('--foo', 'first');
10 assert_equals(testElem.style.getPropertyValue('--foo'), 'first'); 10 assert_equals(testElem.style.getPropertyValue('--foo'), 'first');
11 assert_equals(getComputedStyle(testElem).getPropertyValue('--foo'), 'first'); 11 assert_equals(getComputedStyle(testElem).getPropertyValue('--foo'), 'first');
12 assert_equals(testElem.getAttribute('style'), '--foo:first;'); 12 assert_equals(testElem.getAttribute('style'), '--foo:first;');
13 testElem.style.setProperty('--foo', 'second'); 13 testElem.style.setProperty('--foo', 'second');
14 assert_equals(testElem.style.getPropertyValue('--foo'), 'second'); 14 assert_equals(testElem.style.getPropertyValue('--foo'), 'second');
15 assert_equals(testElem.getAttribute('style'), '--foo:second;'); 15 assert_equals(testElem.getAttribute('style'), '--foo:second;');
16 }, "subsequent writes to inline style overwrite older values.") 16 }, "subsequent writes to inline style overwrite older values.")
17 17
18 test(function() {
19 var value = '10 20% 30px bla("x")';
20 testElem.style.setProperty('--foo', value);
21 assert_equals(testElem.style.getPropertyValue('--foo'), value);
22 testElem.offsetTop;
23 testElem.style.setProperty('--foo', value);
24 assert_equals(testElem.style.getPropertyValue('--foo'), value);
25 testElem.offsetTop;
26 value = '-5 1.5px [ ]'
27 testElem.style.setProperty('--foo', value);
28 assert_equals(testElem.style.getPropertyValue('--foo'), value);
29 }, "various token types can be compared")
30
18 </script> 31 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/CSSParserToken.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698