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

Unified Diff: chrome/test/data/extensions/api_test/file_system_provider/get_actions/test.js

Issue 1239043002: Add support for actions for multiple file selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed externs. Created 5 years, 3 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
Index: chrome/test/data/extensions/api_test/file_system_provider/get_actions/test.js
diff --git a/chrome/test/data/extensions/api_test/file_system_provider/get_actions/test.js b/chrome/test/data/extensions/api_test/file_system_provider/get_actions/test.js
index 51e59afdd3fe42fabe0b55bc1758ff5f5f90de0a..cab5a635a2e8a617b6617f572f1f7b8c70ffb736 100644
--- a/chrome/test/data/extensions/api_test/file_system_provider/get_actions/test.js
+++ b/chrome/test/data/extensions/api_test/file_system_provider/get_actions/test.js
@@ -54,13 +54,13 @@ function onGetActionsRequested(options, onSuccess, onError) {
return;
}
- if (options.entryPath === '/' + TESTING_ACTIONS_DIR.name) {
- onSuccess(TESTING_ACTIONS_DIR_ACTIONS);
+ if (options.entryPaths.indexOf('/' + TESTING_NO_ACTIONS_DIR.name) !== -1) {
+ onSuccess([]);
return;
}
- if (options.entryPath === '/' + TESTING_NO_ACTIONS_DIR.name) {
- onSuccess([]);
+ if (options.entryPaths.indexOf('/' + TESTING_ACTIONS_DIR.name) !== -1) {
+ onSuccess(TESTING_ACTIONS_DIR_ACTIONS);
return;
}
@@ -99,8 +99,8 @@ function runTests() {
TESTING_ACTIONS_DIR.name,
{create: false},
chrome.test.callbackPass(function(dirEntry) {
- chrome.fileManagerPrivate.getEntryActions(
- dirEntry,
+ chrome.fileManagerPrivate.getCustomActions(
+ [dirEntry],
chrome.test.callbackPass(function(actions) {
chrome.test.assertEq(2, actions.length);
chrome.test.assertEq(TESTING_ACTIONS_DIR_ACTIONS[0].id,
@@ -124,8 +124,8 @@ function runTests() {
TESTING_NO_ACTIONS_DIR.name,
{create: false},
chrome.test.callbackPass(function(dirEntry) {
- chrome.fileManagerPrivate.getEntryActions(
- dirEntry,
+ chrome.fileManagerPrivate.getCustomActions(
+ [dirEntry],
chrome.test.callbackPass(function(actions) {
chrome.test.assertEq(0, actions.length);
}));
@@ -133,6 +133,31 @@ function runTests() {
function(error) {
chrome.test.fail(error.name);
});
+ },
+
+ // Get actions for multiple entries.
+ function getNoActionsMultipleSuccess() {
+ test_util.fileSystem.root.getDirectory(
+ TESTING_ACTIONS_DIR.name,
+ {create: false},
+ chrome.test.callbackPass(function(dirEntry) {
+ test_util.fileSystem.root.getDirectory(
+ TESTING_NO_ACTIONS_DIR.name,
+ {create: false},
+ chrome.test.callbackPass(function(dirEntry2) {
+ chrome.fileManagerPrivate.getCustomActions(
+ [dirEntry, dirEntry2],
+ chrome.test.callbackPass(function(actions) {
+ chrome.test.assertEq(0, actions.length);
+ }));
+ }),
+ function(error) {
+ chrome.test.fail(error.name);
+ });
+ }),
+ function(error) {
+ chrome.test.fail(error.name);
+ });
}
]);
}

Powered by Google App Engine
This is Rietveld 408576698