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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/css-styles.html

Issue 2006043002: Improved the reporting of background color information. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added blank line to test expectations. 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../resources/js-test.js"></script> 4 <script src="../resources/js-test.js"></script>
5 <style> 5 <style>
6 body { 6 body {
7 background-color: black; 7 background-color: black;
8 font-size: 10px; 8 font-size: 10px;
9 } 9 }
10 h1 { 10 h1 {
11 color: red; 11 color: red;
12 font-size: 12px; 12 font-size: 12px;
13 } 13 }
14 p { 14 p {
15 color: lime; 15 color: lime;
16 font-size: 14px; 16 font-size: 14px;
17 } 17 }
18 input { 18 input {
19 background-color: white; 19 background-color: red;
20 color: blue; 20 color: blue;
21 font-size: 16px; 21 font-size: 16px;
22 } 22 }
23 </style> 23 </style>
24 </head> 24 </head>
25 <body> 25 <body>
26 26
27 <h1 id="h1">Heading.</h1> 27 <h1 id="h1">Heading.</h1>
28 <p id="p">Line one.<br><span id="span">Line two.</span></p> 28 <p id="p">Line one.<br><span id="span">Line two.</span></p>
29 <input id="button" type="button" value="Button"> 29 <input id="button" type="button" value="Button">
30 <input id="text" type="text" value="Button"> 30 <input id="text" type="text" value="Button">
31 31
32 <script> 32 <script>
33 description("This test ensures that various style attributes can be retrieved via the accessibility APIs."); 33 description("This test ensures that various style attributes can be retrieved via the accessibility APIs.");
34 34
35 if (window.accessibilityController) { 35 if (window.accessibilityController) {
36 var axHeading = accessibilityController.accessibleElementById("h 1"); 36 var axHeading = accessibilityController.accessibleElementById("h 1");
37 // Black has the value 0x000000. 37 shouldBeEqualToNumber("axHeading.backgroundColor", 0xff000000); // Black
38 shouldBeZero("axHeading.backgroundColor"); 38 shouldBeEqualToNumber("axHeading.color", 0xff0000); // Red
39 shouldBeEqualToNumber("axHeading.color", 0xff0000);
40 shouldBeEqualToNumber("axHeading.fontSize", 12); 39 shouldBeEqualToNumber("axHeading.fontSize", 12);
41 40
42 var axParagraph = accessibilityController.accessibleElementById( "p"); 41 var axParagraph = accessibilityController.accessibleElementById( "p");
43 shouldBeZero("axParagraph.backgroundColor"); 42 shouldBeEqualToNumber("axParagraph.backgroundColor", 0xff000000) ; // Black
43 // 0xff00 is called "lime" in CSS.
44 shouldBeEqualToNumber("axParagraph.color", 0xff00); 44 shouldBeEqualToNumber("axParagraph.color", 0xff00);
45 shouldBeEqualToNumber("axParagraph.fontSize", 14); 45 shouldBeEqualToNumber("axParagraph.fontSize", 14);
46 46
47 var axButton = accessibilityController.accessibleElementById("bu tton"); 47 var axButton = accessibilityController.accessibleElementById("bu tton");
48 // Button's background is not transparent, so alpha value is inc luded. 48 // Button's background is not transparent, so alpha value is inc luded.
49 shouldBeEqualToNumber("axButton.backgroundColor", 0xffffffff); 49 shouldBeEqualToNumber("axButton.backgroundColor", 0xffff0000); // Red
50 shouldBeEqualToNumber("axButton.color", 0xff); 50 shouldBeEqualToNumber("axButton.color", 0xff); // Blue
51 shouldBeEqualToNumber("axButton.fontSize", 16); 51 shouldBeEqualToNumber("axButton.fontSize", 16);
52 52
53 var axText = accessibilityController.accessibleElementById("text "); 53 var axText = accessibilityController.accessibleElementById("text ");
54 shouldBeEqualToNumber("axText.backgroundColor", 0xffffffff); 54 shouldBeEqualToNumber("axText.backgroundColor", 0xffff0000); // Red
55 shouldBeEqualToNumber("axText.color", 0xff); 55 shouldBeEqualToNumber("axText.color", 0xff); // Blue
56 shouldBeEqualToNumber("axText.fontSize", 16); 56 shouldBeEqualToNumber("axText.fontSize", 16);
57 } 57 }
58 58
59 </script> 59 </script>
60 </body> 60 </body>
61 </html> 61 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698