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

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
index d8f33386b1c455aae130b6939c1efe85f25afae5..87f0321aafe9bed5aa0ff928cb5224fca2668a92 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
@@ -66,7 +66,14 @@ BackgroundTest.prototype = {
<option>grape</option>
<option> banana</option>
</select>
- */}
+ */},
+
+ iframesDoc: function() {/*!
+ <p>start</p>
+ <button>Before</button>
+ <iframe srcdoc="<button>Inside</button>"></iframe>
+ <button>After</button>
+ */},
};
/** Tests that ChromeVox classic is in this context. */
@@ -586,3 +593,40 @@ TEST_F('BackgroundTest', 'Checkbox', function() {
.replay();
});
});
+
+/** Tests navigating into and out of iframes.. */
+TEST_F('BackgroundTest', 'ForwardNavigationThroughIframes', function() {
+ var mockFeedback = this.createMockFeedback();
+
+ var runTestIfIframeIsLoaded = function(rootNode) {
+ // Return if the iframe hasn't loaded yet.
+ var iframe = rootNode.find({role: 'iframe'});
+ var childDoc = iframe.firstChild;
+ if (childDoc && childDoc.children.length == 0) {
+ return;
+ }
+
+ var doCmd = this.doCmd.bind(this);
+
+ mockFeedback.expectSpeech('start').expectBraille('start');
+
+ mockFeedback.call(doCmd('nextButton'))
+ .expectSpeech('Before', 'Button');
+ mockFeedback.call(doCmd('nextButton'))
+ .expectSpeech('Inside', 'Button');
+ mockFeedback.call(doCmd('nextButton'))
+ .expectSpeech('After', 'Button');
+
+ mockFeedback.replay();
+ }.bind(this);
+
+ this.runWithLoadedTree(this.iframesDoc, function(rootNode) {
+ chrome.automation.getDesktop(function(desktopNode) {
+ runTestIfIframeIsLoaded(rootNode);
+
+ desktopNode.addEventListener('loadComplete', function(evt) {
+ runTestIfIframeIsLoaded(rootNode);
+ }, true);
+ });
+ });
+});

Powered by Google App Engine
This is Rietveld 408576698