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

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

Issue 1974833002: Import quirks-mode tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add separate Release and Debug entries Created 4 years, 7 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
(Empty)
1 <!-- quirks -->
2 <title>Syntax quirks in @supports/CSS.supports</title>
3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script>
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>
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>
9 <style>
10 /* sanity check */
11 @supports (background-color: lime) { #a { background-color: lime } }
12 @supports (background-position: 1px 1px) { #a { background-position: 1px 1px } }
13 /* test */
14 @supports (background-color: 00ff00) { #b { background-color: 00ff00 } }
15 @supports (background-position: 1 1) { #b { background-position: 1 1 } }
16 </style>
17 <div id=a></div>
18 <div id=b></div>
19 <div id=c></div> <!-- c unstyled -->
20 <script>
21 var a = document.getElementById('a');
22 var b = document.getElementById('b');
23 var c = document.getElementById('c');
24
25 test(function() {
26 assert_not_equals(getComputedStyle(a).backgroundColor, getComputedStyle(c).bac kgroundColor);
27 }, 'Sanity check @supports color');
28
29 test(function() {
30 assert_equals(getComputedStyle(b).backgroundColor, getComputedStyle(a).backgro undColor);
31 }, '@supports quirky color');
32
33 test(function() {
34 assert_false(CSS.supports('background-color', '00ff00'));
35 }, 'CSS.supports() quirky color');
36
37 test(function() {
38 assert_not_equals(getComputedStyle(a).backgroundPosition, getComputedStyle(c). backgroundPosition);
39 }, 'Sanity check @supports length');
40
41 test(function() {
42 assert_equals(getComputedStyle(b).backgroundPosition, getComputedStyle(a).back groundPosition);
43 }, '@supports quirky length');
44
45 test(function() {
46 assert_false(CSS.supports('background-position', '1 1'));
47 }, 'CSS.supports() quirky length');
48 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698