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

Side by Side Diff: chrome/browser/ui/views/extensions/extension_uninstall_dialog_view_browsertest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
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_uninstall_dialog.h" 7 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_window.h" 9 #include "chrome/browser/ui/browser_window.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 IN_PROC_BROWSER_TEST_F(ExtensionUninstallDialogViewBrowserTest, 57 IN_PROC_BROWSER_TEST_F(ExtensionUninstallDialogViewBrowserTest,
58 TrackParentWindowDestruction) { 58 TrackParentWindowDestruction) {
59 // Create a second browser to prevent the app from exiting when the browser is 59 // Create a second browser to prevent the app from exiting when the browser is
60 // closed. 60 // closed.
61 CreateBrowser(browser()->profile()); 61 CreateBrowser(browser()->profile());
62 62
63 scoped_refptr<extensions::Extension> extension(BuildTestExtension()); 63 scoped_refptr<extensions::Extension> extension(BuildTestExtension());
64 64
65 base::RunLoop run_loop; 65 base::RunLoop run_loop;
66 TestExtensionUninstallDialogDelegate delegate(run_loop.QuitClosure()); 66 TestExtensionUninstallDialogDelegate delegate(run_loop.QuitClosure());
67 scoped_ptr<extensions::ExtensionUninstallDialog> dialog( 67 std::unique_ptr<extensions::ExtensionUninstallDialog> dialog(
68 extensions::ExtensionUninstallDialog::Create( 68 extensions::ExtensionUninstallDialog::Create(
69 browser()->profile(), browser()->window()->GetNativeWindow(), 69 browser()->profile(), browser()->window()->GetNativeWindow(),
70 &delegate)); 70 &delegate));
71 browser()->window()->Close(); 71 browser()->window()->Close();
72 content::RunAllPendingInMessageLoop(); 72 content::RunAllPendingInMessageLoop();
73 73
74 dialog->ConfirmUninstall(extension.get(), 74 dialog->ConfirmUninstall(extension.get(),
75 extensions::UNINSTALL_REASON_FOR_TESTING, 75 extensions::UNINSTALL_REASON_FOR_TESTING,
76 extensions::UNINSTALL_SOURCE_FOR_TESTING); 76 extensions::UNINSTALL_SOURCE_FOR_TESTING);
77 run_loop.Run(); 77 run_loop.Run();
78 EXPECT_TRUE(delegate.canceled()); 78 EXPECT_TRUE(delegate.canceled());
79 } 79 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698