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

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

Issue 1621823003: Avoid getting stuck when calling focus() on iframe nodes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test. Created 4 years, 11 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
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 06e90281b3084ef6437b35b01a94e697a4591dd5..5b517e808acf35fee5ad83091dc82a9053c7758c 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
@@ -505,3 +505,25 @@ TEST_F('BackgroundTest', 'ModeSwitching', function() {
assertEquals('classic', global.backgroundObj.mode);
}.bind(this));
});
+
+TEST_F('BackgroundTest', 'FocusIframe', function() {
+ this.runWithLoadedTree( function() {/*!
+ <iframe tabindex=0 src="data:text/html,<p>Inside</p>"></iframe>
+ <button>outside</button>
+ */}, function(root) {
+ var iframe = root.find({role: 'iframe'});
+ var button = root.find({role: 'button'});
+
+ assertEquals('iframe', iframe.role);
+ assertEquals('button', button.role);
+
+ var didFocus = false;
+ iframe.focus = function() {
+ didFocus = true;
+ };
+ var b = global.backgroundObj;
+ b.currentRange_ = cursors.Range.fromNode(button);
+ b.onGotCommand('previousElement');
+ assertFalse(didFocus);
+ }.bind(this));
+});
« no previous file with comments | « chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698