| OLD | NEW |
| (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> |
| OLD | NEW |