| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/macros.h" | 5 #include "base/macros.h" |
| 6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
| 7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/extensions/extension_uninstall_dialog.h" | 8 #include "chrome/browser/extensions/extension_uninstall_dialog.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/browser_window.h" | 10 #include "chrome/browser/ui/browser_window.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 128 |
| 129 // Kill parent window. | 129 // Kill parent window. |
| 130 browser()->window()->Close(); | 130 browser()->window()->Close(); |
| 131 run_loop.Run(); | 131 run_loop.Run(); |
| 132 EXPECT_TRUE(delegate.canceled()); | 132 EXPECT_TRUE(delegate.canceled()); |
| 133 } | 133 } |
| 134 | 134 |
| 135 // Test that when the user clicks Uninstall on the ExtensionUninstallDialog, the | 135 // Test that when the user clicks Uninstall on the ExtensionUninstallDialog, the |
| 136 // extension's uninstall url (when it is specified) should open and be the | 136 // extension's uninstall url (when it is specified) should open and be the |
| 137 // active tab. | 137 // active tab. |
| 138 IN_PROC_BROWSER_TEST_F(ExtensionUninstallDialogViewBrowserTest, | 138 // DISABLED: Flaky on Win 10 x64 |
| 139 EnsureExtensionUninstallURLIsActiveTabAfterUninstall) { | 139 IN_PROC_BROWSER_TEST_F( |
| 140 ExtensionUninstallDialogViewBrowserTest, |
| 141 DISABLED_EnsureExtensionUninstallURLIsActiveTabAfterUninstall) { |
| 140 scoped_refptr<extensions::Extension> extension(BuildTestExtension()); | 142 scoped_refptr<extensions::Extension> extension(BuildTestExtension()); |
| 141 ExtensionService* extension_service = | 143 ExtensionService* extension_service = |
| 142 extensions::ExtensionSystem::Get(browser()->profile()) | 144 extensions::ExtensionSystem::Get(browser()->profile()) |
| 143 ->extension_service(); | 145 ->extension_service(); |
| 144 extension_service->AddExtension(extension.get()); | 146 extension_service->AddExtension(extension.get()); |
| 145 SetUninstallURL( | 147 SetUninstallURL( |
| 146 extensions::ExtensionPrefs::Get(extension_service->GetBrowserContext()), | 148 extensions::ExtensionPrefs::Get(extension_service->GetBrowserContext()), |
| 147 extension->id()); | 149 extension->id()); |
| 148 | 150 |
| 149 // Auto-confirm the uninstall dialog. | 151 // Auto-confirm the uninstall dialog. |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 ->tab_strip_model() | 240 ->tab_strip_model() |
| 239 ->GetWebContentsAt(1) | 241 ->GetWebContentsAt(1) |
| 240 ->GetLastCommittedURL() | 242 ->GetLastCommittedURL() |
| 241 .spec()); | 243 .spec()); |
| 242 | 244 |
| 243 run_loop.Run(); | 245 run_loop.Run(); |
| 244 // The delegate should not be canceled because the user chose to uninstall the | 246 // The delegate should not be canceled because the user chose to uninstall the |
| 245 // extension, which should be successful. | 247 // extension, which should be successful. |
| 246 EXPECT_TRUE(!delegate.canceled()); | 248 EXPECT_TRUE(!delegate.canceled()); |
| 247 } | 249 } |
| OLD | NEW |