| Index: third_party/WebKit/LayoutTests/accessibility/background-color.html
|
| diff --git a/third_party/WebKit/LayoutTests/accessibility/background-color.html b/third_party/WebKit/LayoutTests/accessibility/background-color.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ca66fba93945dafa77503a02766274a92950a43e
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/accessibility/background-color.html
|
| @@ -0,0 +1,40 @@
|
| +<!DOCTYPE html>
|
| +<script src="../resources/testharness.js"></script>
|
| +<script src="../resources/testharnessreport.js"></script>
|
| +
|
| +<!-- The default document base color is white. -->
|
| +<div id="default">Document base color.</div>
|
| +
|
| +<div style="background-color: blue">
|
| + <p id="transparent" style="background-color: transparent">Transparent color.</p>
|
| +</div>
|
| +
|
| +<div style="background-color: rgba(50%, 50%, 50%, 0.3)">
|
| + <p id="blended" style="background-color: rgba(50%, 50%, 50%, 0.3)">Blended colors.</p>
|
| +</div>
|
| +
|
| +<script>
|
| +test(function()
|
| +{
|
| + var axDefault = accessibilityController.accessibleElementById('default');
|
| +
|
| + assert_equals(axDefault.backgroundColor, 0xffffffff); // White
|
| + document.getElementById('default').style.display = 'none';
|
| +}, 'Ensures that the document base color is exposed.');
|
| +
|
| +test(function()
|
| +{
|
| + var axTransparent = accessibilityController.accessibleElementById('transparent');
|
| +
|
| + assert_equals(axTransparent.backgroundColor, 0xff0000ff); // Blue
|
| + document.getElementById('transparent').style.display = 'none';
|
| +}, 'Ensures that the color of the parent is exposed.');
|
| +
|
| +test(function()
|
| +{
|
| + var axBlended = accessibilityController.accessibleElementById('blended');
|
| +
|
| + assert_equals(axBlended.backgroundColor, 0x81808080); // Gray
|
| + document.getElementById('blended').style.display = 'none';
|
| +}, 'Ensures that background colors of overlapping objects are blended.');
|
| +</script>
|
|
|