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

Side by Side Diff: LayoutTests/accessibility/deleting-iframe-destroys-axcache.html

Issue 40513003: Delete/move the remaining stale tests in TestExpectations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: delete plugins/reentrant-update-widget-positions.html as well Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script src="../fast/js/resources/js-test-pre.js"></script>
4
5 <script>
6 if (window.testRunner)
7 testRunner.waitUntilDone();
8
9 function buildAccessibilityTree(accessibilityObject, indent) {
10 var str = "";
11 for (var i = 0; i < indent; i++)
12 str += " ";
13 str += accessibilityObject.role;
14 str += " " + accessibilityObject.stringValue;
15
16 if (accessibilityObject.role == '')
17 str += accessibilityObject.allAttributes();
18
19 str += "\n";
20 document.getElementById("console").innerText += str;
21
22 if (accessibilityObject.stringValue.indexOf('End of test') >= 0)
23 return false;
24
25 var count = accessibilityObject.childrenCount;
26 for (var i = 0; i < count; ++i) {
27 if (!buildAccessibilityTree(accessibilityObject.childAtIndex(i), ind ent + 1))
28 return false;
29 }
30
31 return true;
32 }
33
34 function runTest()
35 {
36 description("This tests that deleting an iframe doesn't cause the access ibility cache to be destroyed and recreated.");
37
38 if (window.accessibilityController) {
39 window.root = accessibilityController.rootElement;
40 window.body = root.childAtIndex(0);
41 window.before = body.childAtIndex(0).childAtIndex(0);
42 window.iframe = body.childAtIndex(1).childAtIndex(0);
43 window.after = body.childAtIndex(2).childAtIndex(0);
44
45 window.frameBody = window.iframe.childAtIndex(0);
46 window.frameBodyRole = window.frameBody.role;
47 window.frameGroup = window.frameBody.childAtIndex(0);
48 window.frameGroupRole = window.frameGroup.role;
49 window.frameButton = window.frameGroup.childAtIndex(0);
50 window.frameButtonRole = window.frameButton.role;
51
52 document.getElementById("console").innerText += "\nBefore:\n";
53 buildAccessibilityTree(root, 0);
54
55 // Remove the iframe.
56 document.body.removeChild(document.getElementById("iframe"));
57
58 window.newRoot = accessibilityController.rootElement;
59 window.newBody = newRoot.childAtIndex(0);
60 window.newBefore = newBody.childAtIndex(0).childAtIndex(0);
61 window.newAfter = newBody.childAtIndex(1).childAtIndex(0);
62
63 document.getElementById("console").innerText += "\nAfter:\n";
64 buildAccessibilityTree(newRoot, 0);
65 document.getElementById("console").innerText += "\n";
66
67 // Make sure that the accessibility objects from the iframe's nodes
68 // are now invalid by checking that their role is changed - this
69 // is because they've been deleted.
70 shouldBeFalse("frameBodyRole == frameBody.role");
71 shouldBeFalse("frameGroupRole == frameGroup.role");
72 shouldBeFalse("frameButtonRole == frameButton.role");
73
74 // Make sure that the other nodes are unchanged.
75 shouldBeTrue("root.isEqual(newRoot)");
76 shouldBeTrue("body.isEqual(newBody)");
77 shouldBeTrue("before.isEqual(newBefore)");
78 shouldBeTrue("after.isEqual(newAfter)");
79 }
80
81 debug('<br /><span class="pass">TEST COMPLETE</span>');
82 if (window.testRunner)
83 testRunner.notifyDone();
84 }
85
86 window.addEventListener('load', function() {
87 setTimeout(runTest, 10);
88 }, false);
89
90 </script>
91 </head>
92 <body>
93
94 <p>Before</p>
95
96 <iframe id="iframe" src="data:text/html,<body><button>Click me</button></body>"> </iframe>
97
98 <p>After</p>
99
100 <p>End of test</p>
101
102 <p id="description"></p>
103 <div id="console"></div>
104
105 </body>
106 </html>
OLDNEW
« no previous file with comments | « LayoutTests/accessibility/aria-used-on-image-maps-expected.txt ('k') | LayoutTests/accessibility/document-attributes.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698