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

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

Issue 10704258: Add extension permissions for Media Gallery API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove the permissions that aren't ready yet 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 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)) {
11 expectedFileSystems = 0; 11 expectedFileSystems = 0;
12 } 12 }
13 chrome.test.assertEq(expectedFileSystems, results.length); 13 chrome.test.assertEq(expectedFileSystems, results.length);
14 // TODO(vandebo) Test that we can read from the file system object.
14 }; 15 };
15 var nullCallback = function(result) { 16 var nullCallback = function(result) {
16 chrome.test.assertEq(null, result); 17 chrome.test.assertEq(null, result);
17 }; 18 };
18 19
19 function runTests(tests) { 20 function runTests(tests) {
20 chrome.test.getConfig(function(config) { 21 chrome.test.getConfig(function(config) {
21 operatingSystem = config.osName; 22 operatingSystem = config.osName;
22 chrome.test.runTests(tests); 23 chrome.test.runTests(tests);
23 }); 24 });
(...skipping 15 matching lines...) Expand all
39 var result = mediaGalleries.extractEmbeddedThumbnails({}); 40 var result = mediaGalleries.extractEmbeddedThumbnails({});
40 chrome.test.assertEq(null, result); 41 chrome.test.assertEq(null, result);
41 chrome.test.succeed() 42 chrome.test.succeed()
42 }, 43 },
43 44
44 function assembleMediaFile() { 45 function assembleMediaFile() {
45 mediaGalleries.assembleMediaFile( 46 mediaGalleries.assembleMediaFile(
46 {}, {}, chrome.test.callbackPass(nullCallback)); 47 {}, {}, chrome.test.callbackPass(nullCallback));
47 }, 48 },
48 ]); 49 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698