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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/quirks-mode/supports.html

Issue 2020943002: update-w3c-deps: Do not modify testharness tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 <!-- quirks --> 1 <!--quirks-->
2 <title>Syntax quirks in @supports/CSS.supports</title> 2 <title>Syntax quirks in @supports/CSS.supports</title>
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 <link rel=help href=https://drafts.csswg.org/css-conditional/#at-supports> 5 <link rel=help href=https://drafts.csswg.org/css-conditional/#at-supports>
6 <link rel=help href=https://drafts.csswg.org/css-conditional/#the-css-interface> 6 <link rel=help href=https://drafts.csswg.org/css-conditional/#the-css-interface>
7 <link rel=help href=https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk > 7 <link rel=help href=https://quirks.spec.whatwg.org/#the-hashless-hex-color-quirk >
8 <link rel=help href=https://quirks.spec.whatwg.org/#the-unitless-length-quirk> 8 <link rel=help href=https://quirks.spec.whatwg.org/#the-unitless-length-quirk>
9 <style> 9 <style>
10 /* sanity check */ 10 /* sanity check */
11 @supports (background-color: lime) { #a { background-color: lime } } 11 @supports (background-color: lime) { #a { background-color: lime } }
12 @supports (background-position: 1px 1px) { #a { background-position: 1px 1px } } 12 @supports (background-position: 1px 1px) { #a { background-position: 1px 1px } }
13 /* test */ 13 /* test */
14 @supports (background-color: 00ff00) { #b { background-color: 00ff00 } } 14 @supports (background-color: 00ff00) { #b { background-color: 00ff00 } }
15 @supports (background-position: 1 1) { #b { background-position: 1 1 } } 15 @supports (background-position: 1 1) { #b { background-position: 1 1 } }
16 </style> 16 </style>
17 <div id=a></div> 17 <div id=a></div>
18 <div id=b></div> 18 <div id=b></div>
19 <div id=c></div> <!-- c unstyled --> 19 <div id=c></div> <!-- c unstyled -->
20 <script> 20 <script>
21 var a = document.getElementById('a'); 21 var a = document.getElementById('a');
22 var b = document.getElementById('b'); 22 var b = document.getElementById('b');
23 var c = document.getElementById('c'); 23 var c = document.getElementById('c');
24 24
25 test(function() { 25 test(function() {
26 assert_not_equals(getComputedStyle(a).backgroundColor, getComputedStyle(c).bac kgroundColor); 26 assert_not_equals(getComputedStyle(a).backgroundColor, getComputedStyle(c).bac kgroundColor);
27 }, 'Sanity check @supports color'); 27 }, 'Sanity check @supports color');
28 28
29 test(function() { 29 test(function() {
30 assert_equals(getComputedStyle(b).backgroundColor, getComputedStyle(a).backgro undColor); 30 assert_equals(getComputedStyle(b).backgroundColor, getComputedStyle(a).backgro undColor);
31 }, '@supports quirky color'); 31 }, '@supports quirky color');
32 32
33 test(function() { 33 test(function() {
34 assert_false(CSS.supports('background-color', '00ff00')); 34 assert_false(CSS.supports('background-color', '00ff00'));
35 }, 'CSS.supports() quirky color'); 35 }, 'CSS.supports() quirky color');
36 36
37 test(function() { 37 test(function() {
38 assert_not_equals(getComputedStyle(a).backgroundPosition, getComputedStyle(c). backgroundPosition); 38 assert_not_equals(getComputedStyle(a).backgroundPosition, getComputedStyle(c). backgroundPosition);
39 }, 'Sanity check @supports length'); 39 }, 'Sanity check @supports length');
40 40
41 test(function() { 41 test(function() {
42 assert_equals(getComputedStyle(b).backgroundPosition, getComputedStyle(a).back groundPosition); 42 assert_equals(getComputedStyle(b).backgroundPosition, getComputedStyle(a).back groundPosition);
43 }, '@supports quirky length'); 43 }, '@supports quirky length');
44 44
45 test(function() { 45 test(function() {
46 assert_false(CSS.supports('background-position', '1 1')); 46 assert_false(CSS.supports('background-position', '1 1'));
47 }, 'CSS.supports() quirky length'); 47 }, 'CSS.supports() quirky length');
48 </script> 48 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698