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

Side by Side Diff: LayoutTests/cssom/cssvalue-comparison.html

Issue 846933002: Handle null in value list in getLayeredShorthandValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix more tests Created 5 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 | LayoutTests/cssom/cssvalue-comparison-expected.txt » ('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 <html> 2 <html>
3 <head> 3 <head>
4 <title>CSSValue comparison test</title> 4 <title>CSSValue comparison test</title>
5 <script type="text/javascript" src="../resources/testharness.js"></script> 5 <script type="text/javascript" src="../resources/testharness.js"></script>
6 <script type="text/javascript" src="../resources/testharnessreport.js"></scrip t> 6 <script type="text/javascript" src="../resources/testharnessreport.js"></scrip t>
7 </head> 7 </head>
8 <body onload="run()"> 8 <body onload="run()">
9 <p>This test verifies that CSSValue objects comparison works correctly.</p> 9 <p>This test verifies that CSSValue objects comparison works correctly.</p>
10 <div id="test" contenteditable></div> 10 <div id="test" contenteditable></div>
(...skipping 17 matching lines...) Expand all
28 var insertedDiv = document.getElementById('insertedDiv'); 28 var insertedDiv = document.getElementById('insertedDiv');
29 var result = expectedResult; 29 var result = expectedResult;
30 if (propertyName in insertedDiv.style) 30 if (propertyName in insertedDiv.style)
31 result = insertedDiv.style[propertyName] === ""; 31 result = insertedDiv.style[propertyName] === "";
32 insertedDiv.remove(); 32 insertedDiv.remove();
33 return result; 33 return result;
34 } 34 }
35 35
36 var tests = [ {"width" : ["20%", "2em", "2rem", "20px", "2cm", "20mm", "4in", "20pt", "10pc", "6vw", "6vh", "4vmin", "10vmax", "-webkit-calc(-100px + 100%)"] }, // lengths, calc 36 var tests = [ {"width" : ["20%", "2em", "2rem", "20px", "2cm", "20mm", "4in", "20pt", "10pc", "6vw", "6vh", "4vmin", "10vmax", "-webkit-calc(-100px + 100%)"] }, // lengths, calc
37 {"-webkit-transform" : ["rotate(15deg)", "rotate(1.55rad)", "r otate(200grad)", "rotate(0.5turn)"]}, // angle 37 {"-webkit-transform" : ["rotate(15deg)", "rotate(1.55rad)", "r otate(200grad)", "rotate(0.5turn)"]}, // angle
38 {"background" : ["url(dummy://test.png)", "url(dummy://green.p ng)"]}, // uri 38 {"background-image" : ["url(dummy://test.png)", "url(dummy://g reen.png)"]}, // uri
39 {"font-weight" : ["bold", "inherit"]}, // ident 39 {"font-weight" : ["bold", "inherit"]}, // ident
40 {"content" : ["counter(a)", "counters(a, '.')"]}, // counter 40 {"content" : ["counter(a)", "counters(a, '.')"]}, // counter
41 {"content" : ["attr(a)", "attr(p)"]}, // attr 41 {"content" : ["attr(a)", "attr(p)"]}, // attr
42 {"clip" : ["rect(40px, 0, 45px, -5px)", "rect(10px, 5px, 15px, -10px)"]}, // rect 42 {"clip" : ["rect(40px, 0, 45px, -5px)", "rect(10px, 5px, 15px, -10px)"]}, // rect
43 {"border-radius" : ["30px 75px 15px 15px", "164px / 82px", "40 px"]}, // quads 43 {"border-radius" : ["30px 75px 15px 15px", "164px / 82px", "40 px"]}, // quads
44 {"stop-color" : ["rgb(255,0,0)", "#FF5566"]}, // hex, rgb colo r 44 {"stop-color" : ["rgb(255,0,0)", "#FF5566"]}, // hex, rgb colo r
45 {"-webkit-clip-path" : ["polygon(evenodd, 10px 75px, 180px 180 px, 100px 10px, 10px 180px, 180px 75px, 10px 75px)", "polygon(nonzero, 20% 20%, 80% 20%, 80% 80%, 20% 80%)"]}, // shape value 45 {"-webkit-clip-path" : ["polygon(evenodd, 10px 75px, 180px 180 px, 100px 10px, 10px 180px, 180px 75px, 10px 75px)", "polygon(nonzero, 20% 20%, 80% 20%, 80% 80%, 20% 80%)"]}, // shape value
46 {"-webkit-animation-duration" : ["10s", "100ms"]}, // seconds, milliseconds 46 {"-webkit-animation-duration" : ["10s", "100ms"]}, // seconds, milliseconds
47 {"color" : ["red", "blue"]}, // ident 47 {"color" : ["red", "blue"]}, // ident
48 {"border-image-source" : ["url(resources/greenbox.png)", "url( resources/redbox.png)"]}, // image 48 {"border-image-source" : ["url(resources/greenbox.png)", "url( resources/redbox.png)"]}, // image
49 {"border-image-slice" : ["1 2 3 4", "2 3 4 5"]}, // border ima ge slice 49 {"border-image-slice" : ["1 2 3 4", "2 3 4 5"]}, // border ima ge slice
50 {"cursor" : ["url(resources/greenbox.png) 0 0, pointer", "url( resources/cursor.png) 1 1, wait"]}, // cursor 50 {"cursor" : ["url(resources/greenbox.png) 0 0, pointer", "url( resources/cursor.png) 1 1, wait"]}, // cursor
51 {"font" : ["italic bold 12px/30px arial", "italic bold 8px/16p x helvetica"]}, // font 51 {"font" : ["italic bold 12px/30px arial", "italic bold 8px/16p x helvetica"]}, // font
52 {"background" : ["-webkit-gradient(linear, left top, left bott om, from(#ccc), to(#000))", "-webkit-gradient(radial, 45 45, 0, 52 50, 0, from(# A7D30C), to(rgba(1,159,98,0)), color-stop(90%, #019F62))"]}, // gradients 52 {"background-image" : ["-webkit-gradient(linear, left top, lef t bottom, from(#ccc), to(#000))", "-webkit-gradient(radial, 45 45, 0, 52 50, 0, from(#A7D30C), to(rgba(1,159,98,0)), color-stop(90%, #019F62))"]}, // gradients
53 {"background" : ["radial-gradient(circle, #ccc, #000)"]}, // g radients 53 {"background-image" : ["radial-gradient(circle, #ccc, #000)"]} , // gradients
54 {"background" : ["linear-gradient(#000, #234)", "linear-gradie nt(to top, #000, #234)"]}, // gradients 54 {"background-image" : ["linear-gradient(#000, #234)", "linear- gradient(to top, #000, #234)"]}, // gradients
55 {"background-image" : ["-webkit-cross-fade(url(dummy://example .png), url(dummy://example.png), 50%)", "-webkit-cross-fade(url(dummy://backgrou nd.png), url(dummy://foreground.png), 80%)"]}, // crossfade 55 {"background-image" : ["-webkit-cross-fade(url(dummy://example .png), url(dummy://example.png), 50%)", "-webkit-cross-fade(url(dummy://backgrou nd.png), url(dummy://foreground.png), 80%)"]}, // crossfade
56 {"-webkit-box-reflect" : ["below 10px", "below 0px -webkit-gra dient(linear, left top, left bottom, from(transparent), to(rgba(10, 55, 234, 1)) )"]}, // reflect 56 {"-webkit-box-reflect" : ["below 10px", "below 0px -webkit-gra dient(linear, left top, left bottom, from(transparent), to(rgba(10, 55, 234, 1)) )"]}, // reflect
57 {"-webkit-box-shadow" : ["0 -20px 10px red, 0 20px 10px blue", "0 20px 10px blue", "5px 5px 5px rgba(0, 0, 0, 0.3)"]}, // shadow 57 {"-webkit-box-shadow" : ["0 -20px 10px red, 0 20px 10px blue", "0 20px 10px blue", "5px 5px 5px rgba(0, 0, 0, 0.3)"]}, // shadow
58 {"-webkit-transition-timing-function" : ["cubic-bezier(0.25, 0 .1, 0.25, 1)", "linear", "steps(3, end)"]}, // timing functions 58 {"-webkit-transition-timing-function" : ["cubic-bezier(0.25, 0 .1, 0.25, 1)", "linear", "steps(3, end)"]}, // timing functions
59 {"-webkit-transform" : ["rotate(30deg)", "translate(50px,50px) ", "scale(2,4)", "skew(30deg,20deg)", "matrix(0.4,0.5,-0.5,0.4,0,0)"]}, // trans forms 59 {"-webkit-transform" : ["rotate(30deg)", "translate(50px,50px) ", "scale(2,4)", "skew(30deg,20deg)", "matrix(0.4,0.5,-0.5,0.4,0,0)"]}, // trans forms
60 {"-webkit-line-box-contain" : ["inline-box", "font", "glyphs", "replaced"]}, // line-box-contain 60 {"-webkit-line-box-contain" : ["inline-box", "font", "glyphs", "replaced"]}, // line-box-contain
61 {"background-image" : ["-webkit-image-set(url(dummy://test.png ) 1x, url(dummy://test.png) 2x)", "-webkit-image-set(url(dummy://small.png) 2x, url(dummy://big.png) 3x)"]}, // image set 61 {"background-image" : ["-webkit-image-set(url(dummy://test.png ) 1x, url(dummy://test.png) 2x)", "-webkit-image-set(url(dummy://small.png) 2x, url(dummy://big.png) 3x)"]}, // image set
62 {"-webkit-filter" : ["grayscale(100%) sepia(100%)", "sepia(10% ) grayscale(50%)"]}, // filter 62 {"-webkit-filter" : ["grayscale(100%) sepia(100%)", "sepia(10% ) grayscale(50%)"]}, // filter
63 {"-webkit-dashboard-region" : ["dashboard-region(label circle) ", "dashboard-region(label circle 1px 2px 3px 4px) dashboard-region(label rectan gle 5px 6px 7px 8px)"]} // dashboard region 63 {"-webkit-dashboard-region" : ["dashboard-region(label circle) ", "dashboard-region(label circle 1px 2px 3px 4px) dashboard-region(label rectan gle 5px 6px 7px 8px)"]} // dashboard region
64 ]; 64 ];
(...skipping 12 matching lines...) Expand all
77 test(function() {assert_false(runTest(key, testValues[0], testVa lues[1], false))}, "Two CSSValues \"" + testValues[0] + "\" and \"" + testValues [1] + "\" for property \"" + key + "\" are not equal."); 77 test(function() {assert_false(runTest(key, testValues[0], testVa lues[1], false))}, "Two CSSValues \"" + testValues[0] + "\" and \"" + testValues [1] + "\" for property \"" + key + "\" are not equal.");
78 } 78 }
79 } 79 }
80 80
81 done(); 81 done();
82 } 82 }
83 83
84 </script> 84 </script>
85 </body> 85 </body>
86 </html> 86 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/cssom/cssvalue-comparison-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698