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

Unified Diff: chrome/browser/chromeos/extensions/external_filesystem_apitest.cc

Issue 10834383: Chrome OS "open with" picker allowing Web Intents (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: tbarzic comments Created 8 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_browser_private_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
diff --git a/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc b/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
index ba3add138ce926e46e92b72085d976fd9f51a8b8..0d2f09102492a593c4cecd1c4594b93ba82186d2 100644
--- a/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
+++ b/chrome/browser/chromeos/extensions/external_filesystem_apitest.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/chromeos/gdata/drive_file_system.h"
#include "chrome/browser/chromeos/gdata/drive_system_service.h"
#include "chrome/browser/chromeos/gdata/mock_drive_service.h"
+#include "chrome/browser/extensions/event_router.h"
#include "chrome/browser/extensions/extension_apitest.h"
#include "chrome/browser/extensions/extension_test_message_listener.h"
#include "chrome/browser/google_apis/gdata_util.h"
@@ -24,6 +25,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/test/base/ui_test_utils.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
@@ -245,6 +247,35 @@ IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTestLazy) {
"filebrowser_component", "read.html", kComponentFlags)) << message_;
}
+IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserWebIntentTest) {
+ AddTmpMountPoint();
+
+ ResultCatcher catcher;
+ ScopedTempDir tmp_dir;
+ ASSERT_TRUE(tmp_dir.CreateUniqueTempDir());
+
+ // Create a test file inside the ScopedTempDir.
+ FilePath test_file = tmp_dir.path().AppendASCII("text_file.xul");
+ CreateDownloadFile(test_file);
+
+ ASSERT_TRUE(LoadExtension(
+ test_data_dir_.AppendASCII("webintent_handler"))) << message_;
+
+ // Load the source component, with the fileUrl within the virtual mount
+ // point.
+ const extensions::Extension* extension = LoadExtensionAsComponent(
+ test_data_dir_.AppendASCII("filebrowser_component"));
+ ASSERT_TRUE(extension) << message_;
+ std::string path = "filesystem:chrome-extension://" + extension->id() +
+ "/external" + test_file.value();
+ GURL url = extension->GetResourceURL("intent.html#" + path);
+ ui_test_utils::NavigateToURL(browser(), url);
+
+ // The webintent_handler sends chrome.test.succeed() on successful receipt
+ // of the incoming Web Intent.
+ ASSERT_TRUE(catcher.GetNextResult()) << message_;
+}
+
IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTestWrite) {
AddTmpMountPoint();
ASSERT_TRUE(RunExtensionTest("filesystem_handler_write")) << message_;
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_browser_private_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698