3e7f7bf907f5189cdce54cd381d4818578da8f55
[WebKit-https.git] / LayoutTests / platform / mac / accessibility / aria-drag-drop.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../../resources/js-test-pre.js"></script>
5 </head>
6 <body id="body">
7
8 <div tabindex=0 aria-dropeffect="copy move" role="button" aria-label="drop">drop</div>
9 <div tabindex=0 aria-grabbed=true role="button" aria-label="grab1">grab</div>
10 <div tabindex=0 aria-grabbed=false role="button" aria-label="grab2">grab</div>
11
12 <p id="description"></p>
13 <div id="console"></div>
14
15 <script>
16
17     description("This tests that the ARIA drag and drop attributes work as intended.");
18
19     if (window.accessibilityController) {
20
21           var body = document.getElementById("body");
22           body.focus();
23           body = accessibilityController.focusedElement;
24
25           shouldBe("body.childAtIndex(0).ariaDropEffects", "'copy,move'");
26
27           shouldBe("body.childAtIndex(1).ariaIsGrabbed", "true");
28           shouldBe("body.childAtIndex(2).ariaIsGrabbed", "false");
29           shouldBe("body.childAtIndex(1).isAttributeSettable('AXGrabbed')", "true");
30           shouldBe("body.childAtIndex(2).isAttributeSettable('AXGrabbed')", "true");
31     }
32
33 </script>
34
35 <script src="../../../resources/js-test-post.js"></script>
36 </body>
37 </html>