| 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 9e13d94a0f782b74c11ef52a903930cb8b62ef3b..47becb01d34d3b25181f281fea1f75797129fa27 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
|
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs
|
| @@ -573,7 +573,7 @@ TEST_F('BackgroundTest', 'ModeSwitching', function() {
|
| }.bind(this));
|
| });
|
|
|
| -TEST_F('BackgroundTest', 'FocusIframe', function() {
|
| +TEST_F('BackgroundTest', 'ShouldNotFocusIframe', function() {
|
| this.runWithLoadedTree( function() {/*!
|
| <iframe tabindex=0 src="data:text/html,<p>Inside</p>"></iframe>
|
| <button>outside</button>
|
| @@ -585,9 +585,9 @@ TEST_F('BackgroundTest', 'FocusIframe', function() {
|
| assertEquals('button', button.role);
|
|
|
| var didFocus = false;
|
| - iframe.focus = function() {
|
| + iframe.addEventListener('focus', function() {
|
| didFocus = true;
|
| - };
|
| + });
|
| var b = ChromeVoxState.instance;
|
| b.currentRange_ = cursors.Range.fromNode(button);
|
| doCmd('previousElement');
|
| @@ -595,6 +595,27 @@ TEST_F('BackgroundTest', 'FocusIframe', function() {
|
| }.bind(this));
|
| });
|
|
|
| +TEST_F('BackgroundTest', 'ShouldFocusLink', function() {
|
| + this.runWithLoadedTree( function() {/*!
|
| + <div><a href="#">mylink</a></div>
|
| + <button>after</button>
|
| + */}, function(root) {
|
| + var link = root.find({role: RoleType.link});
|
| + var button = root.find({role: RoleType.button});
|
| +
|
| + assertEquals('link', link.role);
|
| + assertEquals('button', button.role);
|
| +
|
| + var didFocus = false;
|
| + link.addEventListener('focus', this.newCallback(function() {
|
| + // Success
|
| + }));
|
| + var b = ChromeVoxState.instance;
|
| + b.currentRange_ = cursors.Range.fromNode(button);
|
| + doCmd('previousElement');
|
| + });
|
| +});
|
| +
|
| TEST_F('BackgroundTest', 'NoisySlider', function() {
|
| var mockFeedback = this.createMockFeedback();
|
| this.runWithLoadedTree( function() {/*!
|
|
|