| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 IN_PROC_BROWSER_TEST_F( | 98 IN_PROC_BROWSER_TEST_F( |
| 99 WebstoreInlineInstallTest, InstallNotAllowedFromNonVerifiedDomains) { | 99 WebstoreInlineInstallTest, InstallNotAllowedFromNonVerifiedDomains) { |
| 100 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 100 CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
| 101 switches::kAppsGalleryInstallAutoConfirmForTests, "cancel"); | 101 switches::kAppsGalleryInstallAutoConfirmForTests, "cancel"); |
| 102 ui_test_utils::NavigateToURL( | 102 ui_test_utils::NavigateToURL( |
| 103 browser(), | 103 browser(), |
| 104 GenerateTestServerUrl(kNonAppDomain, "install_non_verified_domain.html")); | 104 GenerateTestServerUrl(kNonAppDomain, "install_non_verified_domain.html")); |
| 105 | 105 |
| 106 RunInlineInstallTest("runTest1"); | 106 RunInlineInstallTest("runTest1"); |
| 107 RunInlineInstallTest("runTest2"); | 107 RunInlineInstallTest("runTest2"); |
| 108 |
| 109 // Even though we're now on the app's domain, the verified domain has a |
| 110 // different port number, so installation should still fail. |
| 111 ui_test_utils::NavigateToURL( |
| 112 browser(), |
| 113 GenerateTestServerUrl(kAppDomain, "install_non_verified_domain.html")); |
| 114 |
| 115 RunInlineInstallTest("runTest3"); |
| 108 } | 116 } |
| 109 | 117 |
| 110 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallTest, FindLink) { | 118 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallTest, FindLink) { |
| 111 ui_test_utils::NavigateToURL( | 119 ui_test_utils::NavigateToURL( |
| 112 browser(), GenerateTestServerUrl(kAppDomain, "find_link.html")); | 120 browser(), GenerateTestServerUrl(kAppDomain, "find_link.html")); |
| 113 | 121 |
| 114 RunInlineInstallTest("runTest"); | 122 RunInlineInstallTest("runTest"); |
| 115 } | 123 } |
| 116 | 124 |
| 117 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallTest, ArgumentValidation) { | 125 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallTest, ArgumentValidation) { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 171 |
| 164 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallUnpackFailureTest, Test) { | 172 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallUnpackFailureTest, Test) { |
| 165 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 173 CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
| 166 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); | 174 switches::kAppsGalleryInstallAutoConfirmForTests, "accept"); |
| 167 | 175 |
| 168 ui_test_utils::NavigateToURL(browser(), | 176 ui_test_utils::NavigateToURL(browser(), |
| 169 GenerateTestServerUrl(kAppDomain, "install_unpack_failure.html")); | 177 GenerateTestServerUrl(kAppDomain, "install_unpack_failure.html")); |
| 170 | 178 |
| 171 RunInlineInstallTest("runTest"); | 179 RunInlineInstallTest("runTest"); |
| 172 } | 180 } |
| OLD | NEW |