2 <script src=
"../resources/testharness.js"></script>
3 <script src=
"../resources/testharnessreport.js"></script>
9 background-color: #
99f;
15 <div id=
"shadowHost" aria-label=
"Don't ignore me">
16 This content goes inside inner.
19 This element totally obscures
"inner", but it's still possible to context-click
20 on
"inner" using accessibiltiy APIs.
24 <div id=
"inner" aria-label=
"Don't ignore me either">
32 background-color: #f99;
37 <p>Before the content.
</p>
38 <p id=
"target"><content></content></p>
39 <p>After the content.
</p>
44 var target
= document
.getElementById('target');
45 var shadowHost
= document
.getElementById('shadowHost');
46 var shadowRoot
= shadowHost
.createShadowRoot();
47 shadowRoot
.appendChild(document
.getElementById('inner'));
49 async_test(function(t
)
51 target
.addEventListener('contextmenu', function() {
52 document
.getElementById("outer").style
.display
= "none";
56 if (window
.accessibilityController
) {
57 var axTarget
= accessibilityController
.accessibleElementById("target");
58 axTargetText
= axTarget
.childAtIndex(0);
59 assert_equals(axTargetText
.role
, 'AXRole: AXStaticText');
60 assert_equals(axTargetText
.stringValue
, 'AXValue: This content goes inside inner.');
61 axTargetText
.showMenu();
63 }, "can use accessibility to show context menu on element that's obscured behind another");