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

Side by Side Diff: LayoutTests/fast/css/getComputedStyle/getComputedStyle-border-image-slice.html

Issue 703793002: Remove some testing of getPropertyCSSValue in fast/css/getComputedStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <script src="../../../resources/js-test.js"></script> 5 <script src="../../../resources/js-test.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <script> 8 <script>
9 9
10 description("Test to make sure border-image-slice is correctly parsed.") 10 description("Test to make sure border-image-slice is correctly parsed.")
11 11
12 var testContainer = document.createElement("div"); 12 var testContainer = document.createElement("div");
13 document.body.appendChild(testContainer); 13 document.body.appendChild(testContainer);
14 14
15 testContainer.innerHTML = '<div style="width:100px;height:100px"><div id="test"> hello</div></div>'; 15 testContainer.innerHTML = '<div style="width:100px;height:100px"><div id="test"> hello</div></div>';
16 16
17 e = document.getElementById('test'); 17 e = document.getElementById('test');
18 computedStyle = window.getComputedStyle(e, null); 18 computedStyle = window.getComputedStyle(e, null);
19 19
20 var testValues = [ "10", "30%", "10 10", "10 30%", "30% 30%", "10 10 10", "30% 1 0 10", "10 30% 10", "30% 30% 30% 10", "10 10 10 10", "30% 30% 30% 10", "30% 30% 30% 30%", "fill 30%", "fill 10", "fill 2 4 8% 16%", "30% fill", "10 fill", "2 4 8% 16% fill", "10 fill 10", "solid", "fill fill" ]; 20 var testValues = [ "10", "30%", "10 10", "10 30%", "30% 30%", "10 10 10", "30% 1 0 10", "10 30% 10", "30% 30% 30% 10", "10 10 10 10", "30% 30% 30% 10", "30% 30% 30% 30%", "fill 30%", "fill 10", "fill 2 4 8% 16%", "30% fill", "10 fill", "2 4 8% 16% fill", "10 fill 10", "solid", "fill fill" ];
21 21
22 var expectedValues = [ "'10'", "'30%'", "'10'", "'10 30%'", "'30%'", "'10'", "'3 0% 10 10'", "'10 30%'", "'30% 30% 30% 10'", "'10'", "'30% 30% 30% 10'", "'30%'", "'30% fill'", "'10 fill'", "'2 4 8% 16% fill'", "'30% fill'", "'10 fill'", "'2 4 8% 16% fill'", "'100%'", "'100%'", "'100%'" ]; 22 var expectedValues = [ "'10'", "'30%'", "'10'", "'10 30%'", "'30%'", "'10'", "'3 0% 10 10'", "'10 30%'", "'30% 30% 30% 10'", "'10'", "'30% 30% 30% 10'", "'30%'", "'30% fill'", "'10 fill'", "'2 4 8% 16% fill'", "'30% fill'", "'10 fill'", "'2 4 8% 16% fill'", "'100%'", "'100%'", "'100%'" ];
23 23
24 for (i = 0; i < testValues.length; i++) { 24 for (i = 0; i < testValues.length; i++) {
25 e.style.borderImageSlice = ""; 25 e.style.borderImageSlice = "";
26 e.style.borderImageSlice = testValues[i]; 26 e.style.borderImageSlice = testValues[i];
27 shouldBe("computedStyle.getPropertyValue('border-image-slice')", expectedVal ues[i]); 27 shouldBe("computedStyle.getPropertyValue('border-image-slice')", expectedVal ues[i]);
28 shouldBe("computedStyle.getPropertyCSSValue('border-image-slice').cssText", expectedValues[i]);
29 } 28 }
30 document.body.removeChild(testContainer); 29 document.body.removeChild(testContainer);
31 30
32 </script> 31 </script>
33 </body> 32 </body>
34 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698