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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/background-color.html

Issue 2006043002: Improved the reporting of background color information. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4
5 <!-- The default document base color is white. -->
6 <div id="default">Document base color.</div>
7
8 <div style="background-color: blue">
9 <p id="transparent" style="background-color: transparent">Transparent color. </p>
10 </div>
11
12 <div style="background-color: rgba(50%, 50%, 50%, 0.3)">
13 <p id="blended" style="background-color: rgba(50%, 50%, 50%, 0.3)">Blended c olors.</p>
14 </div>
15
16 <script>
17 test(function()
18 {
19 var axDefault = accessibilityController.accessibleElementById('default');
20
21 assert_equals(axDefault.backgroundColor, 0xffffffff); // White
22 document.getElementById('default').style.display = 'none';
23 }, 'Ensures that the document base color is exposed.');
24
25 test(function()
26 {
27 var axTransparent = accessibilityController.accessibleElementById('transpare nt');
28
29 assert_equals(axTransparent.backgroundColor, 0xff0000ff); // Blue
30 document.getElementById('transparent').style.display = 'none';
31 }, 'Ensures that the color of the parent is exposed.');
32
33 test(function()
34 {
35 var axBlended = accessibilityController.accessibleElementById('blended');
36
37 assert_equals(axBlended.backgroundColor, 0x81808080); // Gray
38 document.getElementById('blended').style.display = 'none';
39 }, 'Ensures that background colors of overlapping objects are blended.');
40 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698