| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/strings/utf_string_conversions.h" | 5 #include "base/strings/utf_string_conversions.h" |
| 6 #include "chrome/browser/extensions/extension_install_prompt.h" | 6 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/extensions/tab_helper.h" | 8 #include "chrome/browser/extensions/tab_helper.h" |
| 9 #include "chrome/browser/extensions/webstore_inline_installer.h" | 9 #include "chrome/browser/extensions/webstore_inline_installer.h" |
| 10 #include "chrome/browser/extensions/webstore_inline_installer_factory.h" | 10 #include "chrome/browser/extensions/webstore_inline_installer_factory.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 new WebstoreInlineInstallerForTestFactory()); | 139 new WebstoreInlineInstallerForTestFactory()); |
| 140 RunTestAsync("runTest"); | 140 RunTestAsync("runTest"); |
| 141 while (!ProgrammableInstallPrompt::Ready()) | 141 while (!ProgrammableInstallPrompt::Ready()) |
| 142 base::RunLoop().RunUntilIdle(); | 142 base::RunLoop().RunUntilIdle(); |
| 143 web_contents->Close(); | 143 web_contents->Close(); |
| 144 ProgrammableInstallPrompt::Accept(); | 144 ProgrammableInstallPrompt::Accept(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 // http://crbug.com/517309 | 147 // http://crbug.com/517309 |
| 148 #if defined(OS_WIN) | 148 #if defined(OS_WIN) |
| 149 #define MAYBE_ShouldBlockInlineInstallFromPopupWindow DISABLED_ShouldBlockInline
InstallFromPopupWindow | 149 #define MAYBE_ShouldBlockInlineInstallFromPopupWindow ShouldBlockInlineInstallFr
omPopupWindow |
| 150 #else | 150 #else |
| 151 #define MAYBE_ShouldBlockInlineInstallFromPopupWindow ShouldBlockInlineInstallFr
omPopupWindow | 151 #define MAYBE_ShouldBlockInlineInstallFromPopupWindow ShouldBlockInlineInstallFr
omPopupWindow |
| 152 #endif | 152 #endif |
| 153 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerTest, | 153 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerTest, |
| 154 MAYBE_ShouldBlockInlineInstallFromPopupWindow) { | 154 MAYBE_ShouldBlockInlineInstallFromPopupWindow) { |
| 155 GURL install_url = | 155 GURL install_url = |
| 156 GenerateTestServerUrl(kAppDomain, "install_from_popup.html"); | 156 GenerateTestServerUrl(kAppDomain, "install_from_popup.html"); |
| 157 // Disable popup blocking for the test url. | 157 // Disable popup blocking for the test url. |
| 158 browser()->profile()->GetHostContentSettingsMap()->SetContentSetting( | 158 browser()->profile()->GetHostContentSettingsMap()->SetContentSetting( |
| 159 ContentSettingsPattern::FromURL(install_url), | 159 ContentSettingsPattern::FromURL(install_url), |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, | 244 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, |
| 245 DownloadProgressListenerTest) { | 245 DownloadProgressListenerTest) { |
| 246 RunTest("download_progress_listener.html"); | 246 RunTest("download_progress_listener.html"); |
| 247 } | 247 } |
| 248 | 248 |
| 249 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, BothListenersTest) { | 249 IN_PROC_BROWSER_TEST_F(WebstoreInlineInstallerListenerTest, BothListenersTest) { |
| 250 RunTest("both_listeners.html"); | 250 RunTest("both_listeners.html"); |
| 251 } | 251 } |
| 252 | 252 |
| 253 } // namespace extensions | 253 } // namespace extensions |
| OLD | NEW |