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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/usecounter-angle-zero-gradient.html

Issue 2908053002: CSS Conic Gradients: do not support unitless 0 angles (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/gradients/conic-gradient.html » ('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 <script> 4 <script>
5 'use strict'; 5 'use strict';
6 6
7 test(() => { 7 test(() => {
8 let UnitlessZeroAngleGradient = 2008; // From UseCounter.h 8 let UnitlessZeroAngleGradient = 2008; // From UseCounter.h
9 9
10 let isCounted = () => internals.isUseCounted(document, UnitlessZeroAngleGrad ient); 10 let isCounted = () => internals.isUseCounted(document, UnitlessZeroAngleGrad ient);
11 var div = document.createElement('div'); 11 var div = document.createElement('div');
12 12
13 // These values are invalid. 13 // These values are invalid.
14 div.style = 'image-orientation: 0;'; 14 div.style = 'image-orientation: 0;';
15 div.style = 'rotate: 0;'; 15 div.style = 'rotate: 0;';
16 div.style = 'offset-path: ray(0 closest-side);'; 16 div.style = 'offset-path: ray(0 closest-side);';
17 div.style = 'background-image: conic-gradient(from 0 at left top, red 0deg, green 180deg);';
18 div.style = 'background-image: conic-gradient(from 0deg at left top, red 0, green 180deg);';
19
17 // These properties have their own counters. 20 // These properties have their own counters.
18 div.style = 'filter: hue-rotate(0);'; 21 div.style = 'filter: hue-rotate(0);';
19 div.style = 'offset-rotate: 0;'; 22 div.style = 'offset-rotate: 0;';
20 div.style = 'transform: skewX(0);'; 23 div.style = 'transform: skewX(0);';
21 assert_false(isCounted(), 24 assert_false(isCounted(),
22 'non gradient should not be counted'); 25 'non gradient should not be counted');
23 26
24 div.style = 'background-image: linear-gradient(0deg, red, black);'; 27 div.style = 'background-image: linear-gradient(0deg, red, black);';
25 assert_false(isCounted(), 28 assert_false(isCounted(),
26 '0deg should not be counted'); 29 '0deg should not be counted');
27 30
28 div.style = 'background-image: linear-gradient(0, red, black);'; 31 div.style = 'background-image: linear-gradient(0, red, black);';
29 assert_true(isCounted(), 32 assert_true(isCounted(),
30 '0 should be counted'); 33 '0 should be counted');
31 }, 'angle 0 is use counted for gradient'); 34 }, 'angle 0 is use counted for linear gradient');
32 </script> 35 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/gradients/conic-gradient.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698