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

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

Issue 10409084: Media Gallery: Implement a basic version of GetMediaFileSystems(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix win again Created 8 years, 6 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/experimental.media_galleries_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 var mediaGalleries = chrome.experimental.mediaGalleries; 5 var mediaGalleries = chrome.experimental.mediaGalleries;
6 var emptyListCallback = function(results) { 6 var mediaFileSystemsListCallback = function(results) {
7 chrome.test.assertEq(results, []); 7 // There should be a "Pictures" directory on all desktop platforms.
8 chrome.test.assertEq(1, results.length);
8 }; 9 };
9 var nullCallback = function(result) { 10 var nullCallback = function(result) {
10 chrome.test.assertEq(result, null); 11 chrome.test.assertEq(null, result);
11 }; 12 };
12 13
13 chrome.test.runTests([ 14 chrome.test.runTests([
14 function getGalleries() { 15 function getGalleries() {
15 mediaGalleries.getMediaFileSystems( 16 mediaGalleries.getMediaFileSystems(
16 chrome.test.callbackPass(emptyListCallback)); 17 chrome.test.callbackPass(mediaFileSystemsListCallback));
17 }, 18 },
18 19
19 function openMediaGalleryManager() { 20 function openMediaGalleryManager() {
20 // Just confirm that the function exists. 21 // Just confirm that the function exists.
21 chrome.test.assertTrue(mediaGalleries.openMediaGalleryManager !== null); 22 chrome.test.assertTrue(mediaGalleries.openMediaGalleryManager !== null);
22 chrome.test.succeed() 23 chrome.test.succeed()
23 }, 24 },
24 25
25 function extractEmbeddedThumbnails() { 26 function extractEmbeddedThumbnails() {
26 var result = mediaGalleries.extractEmbeddedThumbnails({}); 27 var result = mediaGalleries.extractEmbeddedThumbnails({});
27 chrome.test.assertEq(result, null); 28 chrome.test.assertEq(null, result);
28 chrome.test.succeed() 29 chrome.test.succeed()
29 }, 30 },
30 31
31 function assembleMediaFile() { 32 function assembleMediaFile() {
32 mediaGalleries.assembleMediaFile( 33 mediaGalleries.assembleMediaFile(
33 {}, {}, chrome.test.callbackPass(nullCallback)); 34 {}, {}, chrome.test.callbackPass(nullCallback));
34 }, 35 },
35 ]); 36 ]);
OLDNEW
« no previous file with comments | « chrome/renderer/resources/extensions/experimental.media_galleries_custom_bindings.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698