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

Side by Side Diff: chrome/test/data/extensions/api_test/automation/tests/desktop/initial_focus.js

Issue 1589623002: Keep track of accessibility focus across windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final suggestions Created 4 years, 10 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 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 var allTests = [
6 function testInitialFocus() {
7 var url = 'data:text/html,<!doctype html>' +
8 encodeURI('<input autofocus title=abc>');
9 chrome.automation.getDesktop(function(rootNode) {
10 chrome.tabs.create({url: url});
11
12 rootNode.addEventListener('loadComplete', function(event) {
13 if (event.target.url == url) {
14 chrome.automation.getFocus(function(focus) {
15 assertEq('textField', focus.role);
16 assertEq('abc', focus.name);
17 chrome.test.succeed();
18 });
19 }
20 }, false);
21 });
22 },
23 ];
24
25 chrome.test.runTests(allTests);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698