| 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 var mediaGalleries = chrome.mediaGalleries; | 5 var mediaGalleries = chrome.mediaGalleries; |
| 6 | 6 |
| 7 var galleries; | 7 var galleries; |
| 8 var testResults = []; | 8 var testResults = []; |
| 9 var expectedFileSystems; | 9 var expectedFileSystems; |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 dirReader.readEntries(mediaFileSystemsDirectoryEntryCallback, | 56 dirReader.readEntries(mediaFileSystemsDirectoryEntryCallback, |
| 57 mediaFileSystemsDirectoryErrorCallback); | 57 mediaFileSystemsDirectoryErrorCallback); |
| 58 } | 58 } |
| 59 }, | 59 }, |
| 60 function validFileCopyToShouldFail() { | 60 function validFileCopyToShouldFail() { |
| 61 runCopyToTest(validWEBPImageCase, false /* expect failure */); | 61 runCopyToTest(validWEBPImageCase, false /* expect failure */); |
| 62 }, | 62 }, |
| 63 function invalidFileCopyToShouldFail() { | 63 function invalidFileCopyToShouldFail() { |
| 64 runCopyToTest(invalidWEBPImageCase, false /* expect failure */); | 64 runCopyToTest(invalidWEBPImageCase, false /* expect failure */); |
| 65 }, | 65 }, |
| 66 function MediaScanWithoutPermission() { | |
| 67 var startListener = function(details) { | |
| 68 chrome.test.assertEq('error', details.type); | |
| 69 mediaGalleries.onScanProgress.removeListener(startListener); | |
| 70 chrome.test.succeed(); | |
| 71 } | |
| 72 mediaGalleries.onScanProgress.addListener(startListener); | |
| 73 | |
| 74 mediaGalleries.startMediaScan(); | |
| 75 } | |
| 76 ]); | 66 ]); |
| 77 }) | 67 }) |
| OLD | NEW |