| OLD | NEW |
| 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 chrome.test.runTests([ | 79 chrome.test.runTests([ |
| 80 function loadFileSystem() { | 80 function loadFileSystem() { |
| 81 chrome.fileBrowserPrivate.requestLocalFileSystem( | 81 chrome.fileBrowserPrivate.requestLocalFileSystem( |
| 82 function (fs) { | 82 function (fs) { |
| 83 chrome.test.assertTrue(!!fs); | 83 chrome.test.assertTrue(!!fs); |
| 84 fs.root.getDirectory('drive', {create: false}, chrome.test.succeed, | 84 fs.root.getDirectory('drive', {create: false}, chrome.test.succeed, |
| 85 errorCallback.bind(null, 'Unable to get drive root ')); | 85 errorCallback.bind(null, 'Unable to get drive root ')); |
| 86 }); | 86 }); |
| 87 }, | 87 }, |
| 88 function driveSearch() { | 88 function driveSearch() { |
| 89 chrome.fileBrowserPrivate.searchGData('foo', '', | 89 chrome.fileBrowserPrivate.searchDrive('foo', '', |
| 90 function(entries, nextFeed) { | 90 function(entries, nextFeed) { |
| 91 verifySearchResult(entries, nextFeed, 'https://next_feed/'); | 91 verifySearchResult(entries, nextFeed, 'https://next_feed/'); |
| 92 chrome.fileBrowserPrivate.searchGData('foo', nextFeed, | 92 chrome.fileBrowserPrivate.searchDrive('foo', nextFeed, |
| 93 function(entries, nextFeed) { | 93 function(entries, nextFeed) { |
| 94 verifySearchResult(entries, nextFeed, ''); | 94 verifySearchResult(entries, nextFeed, ''); |
| 95 | 95 |
| 96 var directoryVerifier = verifyDirectoryAccessible.bind(null, | 96 var directoryVerifier = verifyDirectoryAccessible.bind(null, |
| 97 entries[0], 1, chrome.test.succeed, errorCallback); | 97 entries[0], 1, chrome.test.succeed, errorCallback); |
| 98 | 98 |
| 99 verifyFileAccessible(entries[1], directoryVerifier, | 99 verifyFileAccessible(entries[1], directoryVerifier, |
| 100 errorCallback); | 100 errorCallback); |
| 101 }); | 101 }); |
| 102 }); | 102 }); |
| 103 } | 103 } |
| 104 ]); | 104 ]); |
| OLD | NEW |