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

Unified Diff: chrome/browser/extensions/extension_action_runner_browsertest.cc

Issue 2257113002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_action_runner_browsertest.cc
diff --git a/chrome/browser/extensions/extension_action_runner_browsertest.cc b/chrome/browser/extensions/extension_action_runner_browsertest.cc
index 1d2f37ccc5241c374acd513ddc768b67c5772732..6333d9f4d9d7e3e92aaf033d4275101d83e83360 100644
--- a/chrome/browser/extensions/extension_action_runner_browsertest.cc
+++ b/chrome/browser/extensions/extension_action_runner_browsertest.cc
@@ -473,8 +473,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionActionRunnerBrowserTest,
// Wire up the runner to automatically accept the bubble to prompt for page
// refresh.
runner->set_default_bubble_close_action_for_testing(
- base::WrapUnique(new ToolbarActionsBarBubbleDelegate::CloseAction(
- ToolbarActionsBarBubbleDelegate::CLOSE_EXECUTE)));
+ base::MakeUnique<ToolbarActionsBarBubbleDelegate::CloseAction>(
+ ToolbarActionsBarBubbleDelegate::CLOSE_EXECUTE));
content::NavigationEntry* entry =
web_contents->GetController().GetLastCommittedEntry();
@@ -509,8 +509,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionActionRunnerBrowserTest,
const int next_nav_id =
web_contents->GetController().GetLastCommittedEntry()->GetUniqueID();
runner->set_default_bubble_close_action_for_testing(
- base::WrapUnique(new ToolbarActionsBarBubbleDelegate::CloseAction(
- ToolbarActionsBarBubbleDelegate::CLOSE_DISMISS_USER_ACTION)));
+ base::MakeUnique<ToolbarActionsBarBubbleDelegate::CloseAction>(
+ ToolbarActionsBarBubbleDelegate::CLOSE_DISMISS_USER_ACTION));
// Try running the extension. Nothing should happen, because the user
// didn't agree to refresh the page. The extension should still want to run.
@@ -524,8 +524,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionActionRunnerBrowserTest,
// Repeat with a dismissal from bubble deactivation - same story.
runner->set_default_bubble_close_action_for_testing(
- base::WrapUnique(new ToolbarActionsBarBubbleDelegate::CloseAction(
- ToolbarActionsBarBubbleDelegate::CLOSE_DISMISS_DEACTIVATION)));
+ base::MakeUnique<ToolbarActionsBarBubbleDelegate::CloseAction>(
+ ToolbarActionsBarBubbleDelegate::CLOSE_DISMISS_DEACTIVATION));
runner->RunAction(extension, true);
base::RunLoop().RunUntilIdle();
EXPECT_TRUE(content::WaitForLoadStop(web_contents));
« no previous file with comments | « chrome/browser/extensions/extension_action_runner.cc ('k') | chrome/browser/extensions/extension_action_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698