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

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

Issue 14312009: drive: Add a very basic browser test for the autocomplete feature (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 years, 8 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
« no previous file with comments | « chrome/browser/resources/file_manager/js/test_util.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Expected files before tests are performed. 6 * Expected files before tests are performed.
7 * @type {Array.<Array.<string>>} 7 * @type {Array.<Array.<string>>}
8 * @const 8 * @const
9 */ 9 */
10 var EXPECTED_FILES_BEFORE = [ 10 var EXPECTED_FILES_BEFORE = [
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 'fakeMouseClick', appId, ['[volume-type-icon=drive_recent]'], 166 'fakeMouseClick', appId, ['[volume-type-icon=drive_recent]'],
167 function(result) { 167 function(result) {
168 chrome.test.assertFalse(!result); 168 chrome.test.assertFalse(!result);
169 callRemoteTestUtil('waitForFileListChange', 169 callRemoteTestUtil('waitForFileListChange',
170 appId, 170 appId,
171 [EXPECTED_FILES_BEFORE.length], 171 [EXPECTED_FILES_BEFORE.length],
172 onFileListChange); 172 onFileListChange);
173 }); 173 });
174 }); 174 });
175 }; 175 };
176
177 /**
178 * Tests autocomplete with a query 'hello'. This test is only available for
179 * Drive.
180 */
181 testcase.autocomplete = function() {
182 var EXPECTED_AUTOCOMPLETE_LIST = [
183 '\'hello\' - search Drive\n',
184 'hello.txt\n',
185 ];
186
187 var onAutocompleteListShown = chrome.test.callbackPass(
188 function(autocompleteList) {
189 chrome.test.assertEq(EXPECTED_AUTOCOMPLETE_LIST, autocompleteList);
190 });
191
192 setupAndWaitUntilReady('/drive/root', function(appId, list) {
193 callRemoteTestUtil('performAutocompleteAndWait',
194 appId,
195 ['hello', EXPECTED_AUTOCOMPLETE_LIST.length],
196 onAutocompleteListShown);
197 });
198 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/js/test_util.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698