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

Side by Side Diff: chrome/browser/ui/views/constrained_window_views_browsertest.cc

Issue 1550053002: Convert Pass()→std::move() in //chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/constrained_window/constrained_window_views.h" 5 #include "components/constrained_window/constrained_window_views.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 private: 51 private:
52 DISALLOW_COPY_AND_ASSIGN(TestDialog); 52 DISALLOW_COPY_AND_ASSIGN(TestDialog);
53 }; 53 };
54 54
55 // A helper function to create and show a web contents modal dialog. 55 // A helper function to create and show a web contents modal dialog.
56 scoped_ptr<TestDialog> ShowModalDialog(content::WebContents* web_contents) { 56 scoped_ptr<TestDialog> ShowModalDialog(content::WebContents* web_contents) {
57 scoped_ptr<TestDialog> dialog(new TestDialog()); 57 scoped_ptr<TestDialog> dialog(new TestDialog());
58 constrained_window::ShowWebModalDialogViews(dialog.get(), web_contents); 58 constrained_window::ShowWebModalDialogViews(dialog.get(), web_contents);
59 return dialog.Pass(); 59 return dialog;
60 } 60 }
61 61
62 } // namespace 62 } // namespace
63 63
64 typedef InProcessBrowserTest ConstrainedWindowViewTest; 64 typedef InProcessBrowserTest ConstrainedWindowViewTest;
65 65
66 // Tests the intial focus of tab-modal dialogs, the restoration of focus to the 66 // Tests the intial focus of tab-modal dialogs, the restoration of focus to the
67 // browser when they close, and that queued dialogs don't register themselves as 67 // browser when they close, and that queued dialogs don't register themselves as
68 // accelerator targets until they are displayed. 68 // accelerator targets until they are displayed.
69 IN_PROC_BROWSER_TEST_F(ConstrainedWindowViewTest, FocusTest) { 69 IN_PROC_BROWSER_TEST_F(ConstrainedWindowViewTest, FocusTest) {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 #endif 209 #endif
210 210
211 scoped_ptr<TestDialog> dialog = ShowModalDialog( 211 scoped_ptr<TestDialog> dialog = ShowModalDialog(
212 browser()->tab_strip_model()->GetActiveWebContents()); 212 browser()->tab_strip_model()->GetActiveWebContents());
213 EXPECT_TRUE(dialog->GetWidget()->IsVisible()); 213 EXPECT_TRUE(dialog->GetWidget()->IsVisible());
214 EXPECT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_ESCAPE, 214 EXPECT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_ESCAPE,
215 false, false, false, false)); 215 false, false, false, false));
216 content::RunAllPendingInMessageLoop(); 216 content::RunAllPendingInMessageLoop();
217 EXPECT_EQ(NULL, dialog->GetWidget()); 217 EXPECT_EQ(NULL, dialog->GetWidget());
218 } 218 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/confirm_bubble_views_unittest.cc ('k') | chrome/browser/ui/views/create_application_shortcut_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698