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

Side by Side Diff: third_party/WebKit/LayoutTests/accessibility/loading-iframe-updates-axtree.html

Issue 1761633002: One accessibility tree per frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix is-richly-editable test Created 4 years, 9 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 <html>
2 <head>
3 <script src="../resources/js-test.js"></script>
4
5 <script>
6 if (window.testRunner)
7 testRunner.waitUntilDone();
8
9 function runTest()
10 {
11 description("This tests that if an iframe loads new content after its ac cessibility object has already been accessed, the iframe accessibility object's descendants are the new scroll area and web area, not the old deleted ones.");
12
13 if (window.accessibilityController) {
14 window.iframe = accessibilityController.accessibleElementById('ifram e');
15 window.subwebarea = iframe.childAtIndex(0);
16 }
17
18 window.iframeElement = document.getElementById("iframe");
19 iframeElement.addEventListener("load", function() {
20 if (window.accessibilityController) {
21 window.newIframe = accessibilityController.accessibleElementById ('iframe');
22 window.newSubwebarea = newIframe.childAtIndex(0);
23
24 shouldBeTrue("iframe.isEqual(newIframe)");
25 shouldBeFalse("subwebarea.isEqual(newSubwebarea)");
26 shouldBeTrue("newSubwebarea.childrenCount > 0");
27 }
28
29 debug('<br /><span class="pass">TEST COMPLETE</span>');
30 if (window.testRunner)
31 testRunner.notifyDone();
32 }, false);
33
34 // Load content into the iframe. This will trigger the event
35 // handler above, which will check that the accessibility tree
36 // was updated with new content.
37 window.iframeElement.src = "data:text/html,<body><button>Click me</butto n></body>";
38
39 }
40
41 window.addEventListener('load', function() {
42 runTest();
43 }, false);
44
45 </script>
46 </head>
47 <body>
48
49 <p>Before</p>
50
51 <iframe id="iframe" role="group"></iframe>
52
53 <p>After</p>
54
55 <p>End of test</p>
56
57 <p id="description"></p>
58 <div id="console"></div>
59
60 </body>
61 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698