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

Unified Diff: chrome/browser/extensions/extension_gallery_install_apitest.cc

Issue 3353015: Implement gallery install API (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: erik comments Created 10 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/browser/extensions/extension_gallery_install_apitest.cc
diff --git a/chrome/browser/extensions/extension_gallery_install_apitest.cc b/chrome/browser/extensions/extension_gallery_install_apitest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..8c704a98102d4558ad17cb11dcf27f8b8c78c53a
--- /dev/null
+++ b/chrome/browser/extensions/extension_gallery_install_apitest.cc
@@ -0,0 +1,36 @@
+// Copyright (c) 2010 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.
+
+#include "base/stringprintf.h"
+#include "chrome/browser/extensions/extension_apitest.h"
+#include "chrome/browser/extensions/extension_webstore_private_api.h"
+#include "chrome/common/chrome_switches.h"
+#include "chrome/test/ui_test_utils.h"
+#include "net/base/mock_host_resolver.h"
+
+class ExtensionGalleryInstallApiTest : public ExtensionApiTest {
+ public:
+ void SetUpCommandLine(CommandLine* command_line) {
+ ExtensionApiTest::SetUpCommandLine(command_line);
+ command_line->AppendSwitchASCII(switches::kAppsGalleryURL,
+ "http://www.example.com");
+ }
+};
+
+IN_PROC_BROWSER_TEST_F(ExtensionGalleryInstallApiTest, InstallAndUninstall) {
+ host_resolver()->AddRule("www.example.com", "127.0.0.1");
+ ASSERT_TRUE(test_server()->Start());
+
+ std::string base_url = StringPrintf(
+ "http://www.example.com:%u/files/extensions/",
+ test_server()->host_port_pair().port());
+
+ std::string testing_install_base_url = base_url;
+ testing_install_base_url += "good.crx";
+ InstallFunction::SetTestingInstallBaseUrl(testing_install_base_url.c_str());
+
+ std::string page_url = base_url;
+ page_url += "api_test/extension_gallery_install/test.html";
+ ASSERT_TRUE(RunPageTest(page_url.c_str()));
+}
« no previous file with comments | « chrome/browser/extensions/extension_apitest.cc ('k') | chrome/browser/extensions/extension_management_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698