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

Unified Diff: components/web_modal/web_contents_modal_dialog_manager_unittest.cc

Issue 1548203002: Convert Pass()→std::move() in //components/[n-z]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad headers Created 5 years 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: components/web_modal/web_contents_modal_dialog_manager_unittest.cc
diff --git a/components/web_modal/web_contents_modal_dialog_manager_unittest.cc b/components/web_modal/web_contents_modal_dialog_manager_unittest.cc
index c103c202e69cc21621e293e16e3fa01fbc245b89..0cb10999e11a4d505095b39b103206d886442d9c 100644
--- a/components/web_modal/web_contents_modal_dialog_manager_unittest.cc
+++ b/components/web_modal/web_contents_modal_dialog_manager_unittest.cc
@@ -142,8 +142,8 @@ TEST_F(WebContentsModalDialogManagerTest, WebContentsVisible) {
NativeManagerTracker tracker;
TestNativeWebContentsModalDialogManager* native_manager =
new TestNativeWebContentsModalDialogManager(dialog, manager, &tracker);
- manager->ShowDialogWithManager(dialog,
- scoped_ptr<SingleWebContentsDialogManager>(native_manager).Pass());
+ manager->ShowDialogWithManager(
+ dialog, scoped_ptr<SingleWebContentsDialogManager>(native_manager));
EXPECT_EQ(NativeManagerTracker::SHOWN, tracker.state_);
EXPECT_TRUE(manager->IsDialogActive());
@@ -164,8 +164,8 @@ TEST_F(WebContentsModalDialogManagerTest, WebContentsNotVisible) {
NativeManagerTracker tracker;
TestNativeWebContentsModalDialogManager* native_manager =
new TestNativeWebContentsModalDialogManager(dialog, manager, &tracker);
- manager->ShowDialogWithManager(dialog,
- scoped_ptr<SingleWebContentsDialogManager>(native_manager).Pass());
+ manager->ShowDialogWithManager(
+ dialog, scoped_ptr<SingleWebContentsDialogManager>(native_manager));
EXPECT_EQ(NativeManagerTracker::NOT_SHOWN, tracker.state_);
EXPECT_TRUE(manager->IsDialogActive());
@@ -190,12 +190,12 @@ TEST_F(WebContentsModalDialogManagerTest, ShowDialogs) {
new TestNativeWebContentsModalDialogManager(dialog2, manager, &tracker2);
TestNativeWebContentsModalDialogManager* native_manager3 =
new TestNativeWebContentsModalDialogManager(dialog3, manager, &tracker3);
- manager->ShowDialogWithManager(dialog1,
- scoped_ptr<SingleWebContentsDialogManager>(native_manager1).Pass());
- manager->ShowDialogWithManager(dialog2,
- scoped_ptr<SingleWebContentsDialogManager>(native_manager2).Pass());
- manager->ShowDialogWithManager(dialog3,
- scoped_ptr<SingleWebContentsDialogManager>(native_manager3).Pass());
+ manager->ShowDialogWithManager(
+ dialog1, scoped_ptr<SingleWebContentsDialogManager>(native_manager1));
+ manager->ShowDialogWithManager(
+ dialog2, scoped_ptr<SingleWebContentsDialogManager>(native_manager2));
+ manager->ShowDialogWithManager(
+ dialog3, scoped_ptr<SingleWebContentsDialogManager>(native_manager3));
EXPECT_TRUE(delegate->web_contents_blocked());
EXPECT_EQ(NativeManagerTracker::SHOWN, tracker1.state_);
@@ -214,8 +214,8 @@ TEST_F(WebContentsModalDialogManagerTest, VisibilityObservation) {
NativeManagerTracker tracker;
TestNativeWebContentsModalDialogManager* native_manager =
new TestNativeWebContentsModalDialogManager(dialog, manager, &tracker);
- manager->ShowDialogWithManager(dialog,
- scoped_ptr<SingleWebContentsDialogManager>(native_manager).Pass());
+ manager->ShowDialogWithManager(
+ dialog, scoped_ptr<SingleWebContentsDialogManager>(native_manager));
EXPECT_TRUE(manager->IsDialogActive());
EXPECT_TRUE(delegate->web_contents_blocked());
@@ -247,10 +247,10 @@ TEST_F(WebContentsModalDialogManagerTest, InterstitialPage) {
new TestNativeWebContentsModalDialogManager(dialog1, manager, &tracker1);
TestNativeWebContentsModalDialogManager* native_manager2 =
new TestNativeWebContentsModalDialogManager(dialog2, manager, &tracker2);
- manager->ShowDialogWithManager(dialog1,
- scoped_ptr<SingleWebContentsDialogManager>(native_manager1).Pass());
- manager->ShowDialogWithManager(dialog2,
- scoped_ptr<SingleWebContentsDialogManager>(native_manager2).Pass());
+ manager->ShowDialogWithManager(
+ dialog1, scoped_ptr<SingleWebContentsDialogManager>(native_manager1));
+ manager->ShowDialogWithManager(
+ dialog2, scoped_ptr<SingleWebContentsDialogManager>(native_manager2));
test_api->DidAttachInterstitialPage();
@@ -283,14 +283,14 @@ TEST_F(WebContentsModalDialogManagerTest, CloseDialogs) {
new TestNativeWebContentsModalDialogManager(dialog3, manager, &tracker3);
TestNativeWebContentsModalDialogManager* native_manager4 =
new TestNativeWebContentsModalDialogManager(dialog4, manager, &tracker4);
- manager->ShowDialogWithManager(dialog1,
- scoped_ptr<SingleWebContentsDialogManager>(native_manager1).Pass());
- manager->ShowDialogWithManager(dialog2,
- scoped_ptr<SingleWebContentsDialogManager>(native_manager2).Pass());
- manager->ShowDialogWithManager(dialog3,
- scoped_ptr<SingleWebContentsDialogManager>(native_manager3).Pass());
- manager->ShowDialogWithManager(dialog4,
- scoped_ptr<SingleWebContentsDialogManager>(native_manager4).Pass());
+ manager->ShowDialogWithManager(
+ dialog1, scoped_ptr<SingleWebContentsDialogManager>(native_manager1));
+ manager->ShowDialogWithManager(
+ dialog2, scoped_ptr<SingleWebContentsDialogManager>(native_manager2));
+ manager->ShowDialogWithManager(
+ dialog3, scoped_ptr<SingleWebContentsDialogManager>(native_manager3));
+ manager->ShowDialogWithManager(
+ dialog4, scoped_ptr<SingleWebContentsDialogManager>(native_manager4));
native_manager1->Close();
@@ -345,9 +345,8 @@ TEST_F(WebContentsModalDialogManagerTest, CloseAllDialogs) {
native_managers[i] =
new TestNativeWebContentsModalDialogManager(
dialog, manager, &(trackers[i]));
- manager->ShowDialogWithManager(dialog,
- scoped_ptr<SingleWebContentsDialogManager>(
- native_managers[i]).Pass());
+ manager->ShowDialogWithManager(
+ dialog, scoped_ptr<SingleWebContentsDialogManager>(native_managers[i]));
}
for (int i = 0; i < kWindowCount; i++)
« no previous file with comments | « components/web_modal/web_contents_modal_dialog_manager.cc ('k') | components/web_resource/web_resource_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698