Chromium Code Reviews| 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.experimental.mediaGalleries; | 5 var mediaGalleries = chrome.experimental.mediaGalleries; |
| 6 var mediaFileSystemsListCallback = function(results) { | 6 var mediaFileSystemsListCallback = function(results) { |
| 7 // There should be a "Pictures" directory on all desktop platforms. | 7 // There should be a "Pictures" directory on all desktop platforms. |
| 8 var expectedFileSystems = 1; | 8 var expectedFileSystems = 1; |
| 9 // But not on Android and ChromeOS. | 9 // But not on Android and ChromeOS. |
| 10 if (/Android/.test(navigator.userAgent) || /CrOS/.test(navigator.userAgent)) { | 10 if (/Android/.test(navigator.userAgent) || /CrOS/.test(navigator.userAgent)) { |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 } | 24 } |
| 25 | 25 |
| 26 chrome.test.runTests([ | 26 chrome.test.runTests([ |
| 27 function getGalleries() { | 27 function getGalleries() { |
| 28 mediaGalleries.getMediaFileSystems( | 28 mediaGalleries.getMediaFileSystems( |
| 29 chrome.test.callbackPass(mediaFileSystemsListCallback)); | 29 chrome.test.callbackPass(mediaFileSystemsListCallback)); |
| 30 }, | 30 }, |
| 31 | 31 |
| 32 function openMediaGalleryManager() { | 32 function openMediaGalleryManager() { |
| 33 // Just confirm that the function exists. | 33 // Just confirm that the function exists. |
| 34 chrome.test.assertTrue(mediaGalleries.openMediaGalleryManager !== null); | 34 chrome.test.assertTrue(mediaGalleries.openMediaGalleryManager !== null); |
|
vandebo (ex-Chrome)
2012/07/19 19:58:31
this test needs to be updated
Evan Stade
2012/07/19 20:55:28
yea, it does. The reason it still passed is becaus
| |
| 35 chrome.test.succeed() | 35 chrome.test.succeed(); |
| 36 }, | 36 }, |
| 37 | 37 |
| 38 function extractEmbeddedThumbnails() { | 38 function extractEmbeddedThumbnails() { |
| 39 var result = mediaGalleries.extractEmbeddedThumbnails({}); | 39 var result = mediaGalleries.extractEmbeddedThumbnails({}); |
| 40 chrome.test.assertEq(null, result); | 40 chrome.test.assertEq(null, result); |
| 41 chrome.test.succeed() | 41 chrome.test.succeed(); |
| 42 }, | 42 }, |
| 43 | 43 |
| 44 function assembleMediaFile() { | 44 function assembleMediaFile() { |
| 45 mediaGalleries.assembleMediaFile( | 45 mediaGalleries.assembleMediaFile( |
| 46 {}, {}, chrome.test.callbackPass(nullCallback)); | 46 {'mediaFileContents': {}, 'metadata': {}}, |
| 47 chrome.test.callbackPass(nullCallback)); | |
| 47 }, | 48 }, |
| 48 ]); | 49 ]); |
| OLD | NEW |