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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/stringprintf.h"
6 #include "chrome/browser/extensions/extension_apitest.h"
7 #include "chrome/browser/extensions/extension_webstore_private_api.h"
8 #include "chrome/common/chrome_switches.h"
9 #include "chrome/test/ui_test_utils.h"
10 #include "net/base/mock_host_resolver.h"
11
12 class ExtensionGalleryInstallApiTest : public ExtensionApiTest {
13 public:
14 void SetUpCommandLine(CommandLine* command_line) {
15 ExtensionApiTest::SetUpCommandLine(command_line);
16 command_line->AppendSwitchASCII(switches::kAppsGalleryURL,
17 "http://www.example.com");
18 }
19 };
20
21 IN_PROC_BROWSER_TEST_F(ExtensionGalleryInstallApiTest, InstallAndUninstall) {
22 host_resolver()->AddRule("www.example.com", "127.0.0.1");
23 ASSERT_TRUE(test_server()->Start());
24
25 std::string base_url = StringPrintf(
26 "http://www.example.com:%u/files/extensions/",
27 test_server()->host_port_pair().port());
28
29 std::string testing_install_base_url = base_url;
30 testing_install_base_url += "good.crx";
31 InstallFunction::SetTestingInstallBaseUrl(testing_install_base_url.c_str());
32
33 std::string page_url = base_url;
34 page_url += "api_test/extension_gallery_install/test.html";
35 ASSERT_TRUE(RunPageTest(page_url.c_str()));
36 }
OLDNEW
« 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