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

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

Issue 10808093: move openMediaGalleryManager fn out of experimental. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 80 chars Created 8 years, 5 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
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 chrome.experimental.app.onLaunched.addListener(function() {
6 var mediaFileSystemsListCallback = function(results) { 6 var experimentalMediaGalleries = chrome.experimental.mediaGalleries;
7 // There should be a "Pictures" directory on all desktop platforms. 7 var mediaGalleries = chrome.mediaGalleries;
8 var expectedFileSystems = 1; 8 var mediaFileSystemsListCallback = function(results) {
9 // But not on Android and ChromeOS. 9 // There should be a "Pictures" directory on all desktop platforms.
10 if (/Android/.test(navigator.userAgent) || /CrOS/.test(navigator.userAgent)) { 10 var expectedFileSystems = 1;
11 expectedFileSystems = 0; 11 // But not on Android and ChromeOS.
12 if (/Android/.test(navigator.userAgent) || /CrOS/.test(navigator.userAgent))
13 expectedFileSystems = 0;
14 chrome.test.assertEq(expectedFileSystems, results.length);
15 // TODO(vandebo) Test that we can read from the file system object.
16 };
17 var nullCallback = function(result) {
18 chrome.test.assertEq(null, result);
19 };
20
21 function runTests(tests) {
22 chrome.test.getConfig(function(config) {
23 operatingSystem = config.osName;
24 chrome.test.runTests(tests);
not at google - send to devlin 2012/07/24 04:56:21 I can see the code was already like this... but ha
Evan Stade 2012/07/24 17:31:33 yea, I think you are right. It still passes locall
25 });
12 } 26 }
13 chrome.test.assertEq(expectedFileSystems, results.length);
14 // TODO(vandebo) Test that we can read from the file system object.
15 };
16 var nullCallback = function(result) {
17 chrome.test.assertEq(null, result);
18 };
19 27
20 function runTests(tests) { 28 chrome.test.runTests([
21 chrome.test.getConfig(function(config) { 29 function getGalleries() {
22 operatingSystem = config.osName; 30 mediaGalleries.getMediaFileSystems(
23 chrome.test.runTests(tests); 31 chrome.test.callbackPass(mediaFileSystemsListCallback));
24 }); 32 },
25 }
26 33
27 chrome.test.runTests([ 34 function extractEmbeddedThumbnails() {
28 function getGalleries() { 35 var result = experimentalMediaGalleries.extractEmbeddedThumbnails({});
vandebo (ex-Chrome) 2012/07/24 04:07:05 We could test experimental APIs in a different tes
29 mediaGalleries.getMediaFileSystems( 36 chrome.test.assertEq(null, result);
30 chrome.test.callbackPass(mediaFileSystemsListCallback)); 37 chrome.test.succeed();
31 }, 38 },
32 39
33 function extractEmbeddedThumbnails() { 40 function assembleMediaFile() {
34 var result = mediaGalleries.extractEmbeddedThumbnails({}); 41 experimentalMediaGalleries.assembleMediaFile(
35 chrome.test.assertEq(null, result); 42 new Blob, {},
36 chrome.test.succeed(); 43 chrome.test.callbackPass(nullCallback));
37 }, 44 },
38 45 ]);
39 function assembleMediaFile() { 46 });
40 mediaGalleries.assembleMediaFile(
41 new Blob, {},
42 chrome.test.callbackPass(nullCallback));
43 },
44 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698