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

Unified Diff: chrome/browser/ui/views/constrained_window_views_browsertest.cc

Issue 12045037: Refactor modality-specific behavior from ConstrainedWindowViews to WebContentsModalDialogManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Android link error Created 7 years, 10 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/ui/views/constrained_window_views_browsertest.cc
diff --git a/chrome/browser/ui/views/constrained_window_views_browsertest.cc b/chrome/browser/ui/views/constrained_window_views_browsertest.cc
index 8048dacbeca6bc6ac4bb3c68f14696fb5f6ebf80..9defbaed2998d2d58076c917f336eec83496d377 100644
--- a/chrome/browser/ui/views/constrained_window_views_browsertest.cc
+++ b/chrome/browser/ui/views/constrained_window_views_browsertest.cc
@@ -136,7 +136,7 @@ IN_PROC_BROWSER_TEST_F(ConstrainedWindowViewTest, FocusTest) {
// Create a constrained dialog. It will attach itself to web_contents.
scoped_ptr<TestConstrainedDialog> test_dialog1(new TestConstrainedDialog);
- ConstrainedWindowViews* window1 = new ConstrainedWindowViews(
+ ConstrainedWindowViews* window1 = ConstrainedWindowViews::Create(
web_contents, test_dialog1.get());
views::FocusManager* focus_manager = window1->GetFocusManager();
@@ -150,7 +150,7 @@ IN_PROC_BROWSER_TEST_F(ConstrainedWindowViewTest, FocusTest) {
// web_contents, but will remain hidden since the test_dialog1 is still
// showing.
scoped_ptr<TestConstrainedDialog> test_dialog2(new TestConstrainedDialog);
- ConstrainedWindowViews* window2 = new ConstrainedWindowViews(
+ ConstrainedWindowViews* window2 = ConstrainedWindowViews::Create(
web_contents, test_dialog2.get());
// Should be the same focus_manager.
ASSERT_EQ(focus_manager, window2->GetFocusManager());
@@ -211,7 +211,7 @@ IN_PROC_BROWSER_TEST_F(ConstrainedWindowViewTest, TabCloseTest) {
// Create a constrained dialog. It will attach itself to web_contents.
scoped_ptr<TestConstrainedDialog> test_dialog(new TestConstrainedDialog);
- new ConstrainedWindowViews(
+ ConstrainedWindowViews::Create(
web_contents, test_dialog.get());
bool closed =
@@ -232,7 +232,7 @@ IN_PROC_BROWSER_TEST_F(ConstrainedWindowViewTest, TabSwitchTest) {
// Create a constrained dialog. It will attach itself to web_contents.
scoped_ptr<TestConstrainedDialog> test_dialog(new TestConstrainedDialog);
- ConstrainedWindowViews* window = new ConstrainedWindowViews(
+ ConstrainedWindowViews* window = ConstrainedWindowViews::Create(
web_contents, test_dialog.get());
EXPECT_TRUE(window->IsVisible());

Powered by Google App Engine
This is Rietveld 408576698