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

Side by Side Diff: chrome/test/data/extensions/api_test/file_manager_browsertest/tab_index.js

Issue 304683002: Add the browser test for the new gallery. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 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 'use strict';
6
7 /**
8 * Tests the focus behavior of the search box.
9 */
10 testcase.searchBoxFocus = function() {
11 var appId;
12 StepsRunner.run([
13 // Set up File Manager.
14 function() {
15 setupAndWaitUntilReady(null, RootPath.DRIVE, this.next);
16 },
17 // Check that the file list has the focus on launch.
18 function(inAppId) {
19 appId = inAppId;
20 waitForElement(appId, ['#file-list:focus']).then(this.next);
21 },
22 // Press the Ctrl-F key.
23 function(element) {
24 callRemoteTestUtil('fakeKeyDown',
25 appId,
26 ['body', 'U+0046', true],
27 this.next);
28 },
29 // Check that the search box has the focus.
30 function(result) {
31 chrome.test.assertTrue(result);
32 waitForElement(appId, ['#search-box input:focus']).then(this.next);
33 },
34 // Press the Tab key.
35 function(element) {
36 callRemoteTestUtil('fakeKeyDown',
37 appId,
38 ['body', 'U+0009', false],
39 this.next);
40 },
41 // Check that the file list has the focus.
42 function(result) {
43 chrome.test.assertTrue(result);
44 waitForElement(appId, ['#file-list:focus']).then(this.next);
45 },
46 // Check for errors.
47 function(element) {
48 checkIfNoErrorsOccured(this.next);
49 }
50 ]);
51 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698