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

Side by Side Diff: chrome/test/data/extensions/api_test/file_manager_browsertest/traverse.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 * Test utility for traverse tests.
9 * @param {string} path Root path to be traversed.
10 */
11 function traverseDirectories(path) {
12 var appId;
13 StepsRunner.run([
14 // Set up File Manager. Do not add initial files.
15 function() {
16 openNewWindow(null, path, this.next);
17 },
18 // Check the initial view.
19 function(inAppId) {
20 appId = inAppId;
21 waitForElement(appId, '#detail-table').then(this.next);
22 },
23 function() {
24 addEntries(['local', 'drive'], NESTED_ENTRY_SET, this.next);
25 },
26 function(result) {
27 chrome.test.assertTrue(result);
28 waitForFiles(appId, [ENTRIES.directoryA.getExpectedRow()]).
29 then(this.next);
30 },
31 // Open the directory
32 function() {
33 callRemoteTestUtil('openFile', appId, ['A'], this.next);
34 },
35 // Check the contents of current directory.
36 function(result) {
37 chrome.test.assertTrue(result);
38 waitForFiles(appId, [ENTRIES.directoryB.getExpectedRow()]).
39 then(this.next);
40 },
41 // Open the directory
42 function() {
43 callRemoteTestUtil('openFile', appId, ['B'], this.next);
44 },
45 // Check the contents of current directory.
46 function(result) {
47 chrome.test.assertTrue(result);
48 waitForFiles(appId, [ENTRIES.directoryC.getExpectedRow()]).
49 then(this.next);
50 },
51 // Check the error.
52 function() {
53 checkIfNoErrorsOccured(this.next);
54 }
55 ]);
56 }
57
58 /**
59 * Tests to traverse local directories.
60 */
61 testcase.traverseDownloads = function() {
62 traverseDirectories(RootPath.DOWNLOADS);
63 };
64
65 /**
66 * Tests to traverse drive directories.
67 */
68 testcase.traverseDrive = function() {
69 traverseDirectories(RootPath.DRIVE);
70 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698