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

Side by Side Diff: chrome/test/data/extensions/api_test/filebrowser_component/remote_search.js

Issue 10634020: [FileManager] Do drive search incrementally (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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/renderer/resources/extensions/file_browser_private_custom_bindings.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 function errorCallback(messagePrefix, error) { 5 function errorCallback(messagePrefix, error) {
6 var msg = ''; 6 var msg = '';
7 if (!error.code) { 7 if (!error.code) {
8 msg = error.message; 8 msg = error.message;
9 } else { 9 } else {
10 switch (error.code) { 10 switch (error.code) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 chrome.test.runTests([ 70 chrome.test.runTests([
71 function loadFileSystem() { 71 function loadFileSystem() {
72 chrome.fileBrowserPrivate.requestLocalFileSystem( 72 chrome.fileBrowserPrivate.requestLocalFileSystem(
73 function (fs) { 73 function (fs) {
74 chrome.test.assertTrue(!!fs); 74 chrome.test.assertTrue(!!fs);
75 fs.root.getDirectory('drive', {create: false}, chrome.test.succeed, 75 fs.root.getDirectory('drive', {create: false}, chrome.test.succeed,
76 errorCallback.bind(null, 'Unable to get drive root ')); 76 errorCallback.bind(null, 'Unable to get drive root '));
77 }); 77 });
78 }, 78 },
79 function driveSearch() { 79 function driveSearch() {
80 chrome.fileBrowserPrivate.searchGData('foo', 80 chrome.fileBrowserPrivate.searchGData('foo', '',
81 function(entries) { 81 function(entries, nextFeed) {
82 chrome.test.assertTrue(!!entries); 82 chrome.test.assertTrue(!!entries);
83 chrome.test.assertEq(2, entries.length); 83 chrome.test.assertEq(2, entries.length);
84 chrome.test.assertEq('', nextFeed);
84 85
85 chrome.test.assertEq('/drive/Folder', 86 chrome.test.assertEq('/drive/Folder',
86 entries[0].fullPath); 87 entries[0].fullPath);
87 chrome.test.assertEq('/drive/Folder/File.aBc', 88 chrome.test.assertEq('/drive/Folder/File.aBc',
88 entries[1].fullPath); 89 entries[1].fullPath);
89 90
90 var directoryVerifier = verifyDirectoryAccessible.bind(null, 91 var directoryVerifier = verifyDirectoryAccessible.bind(null,
91 entries[0], 1, chrome.test.succeed, errorCallback); 92 entries[0], 1, chrome.test.succeed, errorCallback);
92 93
93 verifyFileAccessible(entries[1], directoryVerifier, errorCallback); 94 verifyFileAccessible(entries[1], directoryVerifier, errorCallback);
94 }); 95 });
95 } 96 }
96 ]); 97 ]);
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/file_browser_private_custom_bindings.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698