OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/stringprintf.h" | 6 #include "base/stringprintf.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/extensions/extension_host.h" | 8 #include "chrome/browser/extensions/extension_host.h" |
9 #include "chrome/browser/extensions/extension_install_dialog.h" | 9 #include "chrome/browser/extensions/extension_install_dialog.h" |
10 #include "chrome/browser/extensions/extension_install_ui.h" | 10 #include "chrome/browser/extensions/extension_install_ui.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 87 |
88 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallTest, Install) { | 88 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallTest, Install) { |
89 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 89 CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
90 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); | 90 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); |
91 | 91 |
92 ui_test_utils::NavigateToURL( | 92 ui_test_utils::NavigateToURL( |
93 browser(), GenerateTestServerUrl(kAppDomain, "install.html")); | 93 browser(), GenerateTestServerUrl(kAppDomain, "install.html")); |
94 | 94 |
95 RunInlineInstallTest("runTest"); | 95 RunInlineInstallTest("runTest"); |
96 | 96 |
97 const Extension* extension = browser()->profile()->GetExtensionService()-> | 97 const extensions::Extension* extension = browser()->profile()-> |
98 GetExtensionById("ecglahbcnmdpdciemllbhojghbkagdje", false); | 98 GetExtensionService()->GetExtensionById( |
| 99 "ecglahbcnmdpdciemllbhojghbkagdje", false); |
99 EXPECT_TRUE(extension); | 100 EXPECT_TRUE(extension); |
100 } | 101 } |
101 | 102 |
102 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallTest, | 103 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallTest, |
103 InstallNotAllowedFromNonVerifiedDomains) { | 104 InstallNotAllowedFromNonVerifiedDomains) { |
104 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 105 CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
105 switches::kAppsGalleryInstallAutoConfirmForTests, "cancel"); | 106 switches::kAppsGalleryInstallAutoConfirmForTests, "cancel"); |
106 ui_test_utils::NavigateToURL( | 107 ui_test_utils::NavigateToURL( |
107 browser(), | 108 browser(), |
108 GenerateTestServerUrl(kNonAppDomain, "install_non_verified_domain.html")); | 109 GenerateTestServerUrl(kNonAppDomain, "install_non_verified_domain.html")); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallUnpackFailureTest, | 169 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallUnpackFailureTest, |
169 WebstoreInlineInstallUnpackFailureTest) { | 170 WebstoreInlineInstallUnpackFailureTest) { |
170 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 171 CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
171 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); | 172 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); |
172 | 173 |
173 ui_test_utils::NavigateToURL(browser(), | 174 ui_test_utils::NavigateToURL(browser(), |
174 GenerateTestServerUrl(kAppDomain, "install_unpack_failure.html")); | 175 GenerateTestServerUrl(kAppDomain, "install_unpack_failure.html")); |
175 | 176 |
176 RunInlineInstallTest("runTest"); | 177 RunInlineInstallTest("runTest"); |
177 } | 178 } |
OLD | NEW |