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

Side by Side Diff: chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl_browsertest.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/ui/browser_commands.h" 6 #include "chrome/browser/ui/browser_commands.h"
7 #include "chrome/browser/ui/browser_finder.h" 7 #include "chrome/browser/ui/browser_finder.h"
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" 8 #include "chrome/browser/ui/tabs/tab_strip_model.h"
9 #include "chrome/browser/ui/webui/media_router/media_router_dialog_controller_im pl.h" 9 #include "chrome/browser/ui/webui/media_router/media_router_dialog_controller_im pl.h"
10 #include "chrome/browser/ui/webui/media_router/media_router_ui.h" 10 #include "chrome/browser/ui/webui/media_router/media_router_ui.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 media_router_dialog_ = dialog_controller_->GetMediaRouterDialog(); 103 media_router_dialog_ = dialog_controller_->GetMediaRouterDialog();
104 ASSERT_TRUE(media_router_dialog_); 104 ASSERT_TRUE(media_router_dialog_);
105 105
106 { 106 {
107 // Wait for the dialog to initialize. 107 // Wait for the dialog to initialize.
108 TestNavigationObserver nav_observer(media_router_dialog_); 108 TestNavigationObserver nav_observer(media_router_dialog_);
109 nav_observer.Wait(); 109 nav_observer.Wait();
110 110
111 // Refresh and block until dialog WebContents has been destroyed. 111 // Refresh and block until dialog WebContents has been destroyed.
112 content::WebContentsDestroyedWatcher dialog_watcher(media_router_dialog_); 112 content::WebContentsDestroyedWatcher dialog_watcher(media_router_dialog_);
113 chrome::Reload(browser(), CURRENT_TAB); 113 chrome::Reload(browser(), WindowOpenDisposition::CURRENT_TAB);
114 dialog_watcher.Wait(); 114 dialog_watcher.Wait();
115 } 115 }
116 116
117 // Verify that dialog has been removed again. 117 // Verify that dialog has been removed again.
118 EXPECT_FALSE(dialog_controller_->GetMediaRouterDialog()); 118 EXPECT_FALSE(dialog_controller_->GetMediaRouterDialog());
119 } 119 }
120 120
121 IN_PROC_BROWSER_TEST_F(MediaRouterDialogControllerBrowserTest, 121 IN_PROC_BROWSER_TEST_F(MediaRouterDialogControllerBrowserTest,
122 RenderProcessHost) { 122 RenderProcessHost) {
123 // New media router dialog is a constrained window, so the number of 123 // New media router dialog is a constrained window, so the number of
(...skipping 10 matching lines...) Expand all
134 134
135 // Blocks until the dialog WebContents has been destroyed. 135 // Blocks until the dialog WebContents has been destroyed.
136 rph_watcher.Wait(); 136 rph_watcher.Wait();
137 dialog_watcher.Wait(); 137 dialog_watcher.Wait();
138 138
139 // Entry has been removed. 139 // Entry has been removed.
140 EXPECT_FALSE(dialog_controller_->GetMediaRouterDialog()); 140 EXPECT_FALSE(dialog_controller_->GetMediaRouterDialog());
141 } 141 }
142 142
143 } // namespace media_router 143 } // namespace media_router
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698