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

Unified Diff: chrome/test/data/extensions/api_test/media_gallery/test.js

Issue 10816024: Revert 147895 - switch mediaGalleries to .idl api definition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/api_test/media_gallery/manifest.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/media_gallery/test.js
diff --git a/chrome/test/data/extensions/api_test/media_gallery/test.js b/chrome/test/data/extensions/api_test/media_gallery/test.js
new file mode 100644
index 0000000000000000000000000000000000000000..6302065f5d8abbbdfced24b1fb80aa76da91fd99
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/media_gallery/test.js
@@ -0,0 +1,48 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var mediaGalleries = chrome.experimental.mediaGalleries;
+var mediaFileSystemsListCallback = function(results) {
+ // There should be a "Pictures" directory on all desktop platforms.
+ var expectedFileSystems = 1;
+ // But not on Android and ChromeOS.
+ if (/Android/.test(navigator.userAgent) || /CrOS/.test(navigator.userAgent)) {
+ expectedFileSystems = 0;
+ }
+ chrome.test.assertEq(expectedFileSystems, results.length);
+};
+var nullCallback = function(result) {
+ chrome.test.assertEq(null, result);
+};
+
+function runTests(tests) {
+ chrome.test.getConfig(function(config) {
+ operatingSystem = config.osName;
+ chrome.test.runTests(tests);
+ });
+}
+
+chrome.test.runTests([
+ function getGalleries() {
+ mediaGalleries.getMediaFileSystems(
+ chrome.test.callbackPass(mediaFileSystemsListCallback));
+ },
+
+ function openMediaGalleryManager() {
+ // Just confirm that the function exists.
+ chrome.test.assertTrue(mediaGalleries.openMediaGalleryManager !== null);
+ chrome.test.succeed()
+ },
+
+ function extractEmbeddedThumbnails() {
+ var result = mediaGalleries.extractEmbeddedThumbnails({});
+ chrome.test.assertEq(null, result);
+ chrome.test.succeed()
+ },
+
+ function assembleMediaFile() {
+ mediaGalleries.assembleMediaFile(
+ {}, {}, chrome.test.callbackPass(nullCallback));
+ },
+]);
« no previous file with comments | « chrome/test/data/extensions/api_test/media_gallery/manifest.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698