| OLD | NEW |
| 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/threading/thread_task_runner_handle.h" | 6 #include "base/threading/thread_task_runner_handle.h" |
| 7 #include "chrome/browser/extensions/browser_action_test_util.h" | 7 #include "chrome/browser/extensions/browser_action_test_util.h" |
| 8 #include "chrome/browser/media/router/media_router_ui_service.h" | 8 #include "chrome/browser/media/router/media_router_ui_service.h" |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/browser_commands.h" | 10 #include "chrome/browser/ui/browser_commands.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 views::Widget* toolbar_action_view_widget_ = nullptr; | 133 views::Widget* toolbar_action_view_widget_ = nullptr; |
| 134 | 134 |
| 135 std::unique_ptr<Issue> issue_; | 135 std::unique_ptr<Issue> issue_; |
| 136 | 136 |
| 137 // A vector of MediaRoutes that includes a local route. | 137 // A vector of MediaRoutes that includes a local route. |
| 138 std::vector<MediaRoute> routes_; | 138 std::vector<MediaRoute> routes_; |
| 139 | 139 |
| 140 MediaRouterActionController* action_controller_ = nullptr; | 140 MediaRouterActionController* action_controller_ = nullptr; |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 // TODO(crbug.com/658005): Fails on multiple platforms. |
| 143 IN_PROC_BROWSER_TEST_F(MediaRouterUIBrowserTest, | 144 IN_PROC_BROWSER_TEST_F(MediaRouterUIBrowserTest, |
| 144 OpenDialogWithMediaRouterAction) { | 145 DISABLED_OpenDialogWithMediaRouterAction) { |
| 145 // We start off at about:blank page. | 146 // We start off at about:blank page. |
| 146 // Make sure there is 1 tab and media router is enabled. | 147 // Make sure there is 1 tab and media router is enabled. |
| 147 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 148 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
| 148 | 149 |
| 149 OpenMediaRouterDialogAndWaitForNewWebContents(); | 150 OpenMediaRouterDialogAndWaitForNewWebContents(); |
| 150 | 151 |
| 151 // Reload the browser and wait. | 152 // Reload the browser and wait. |
| 152 content::TestNavigationObserver reload_observer( | 153 content::TestNavigationObserver reload_observer( |
| 153 browser()->tab_strip_model()->GetActiveWebContents()); | 154 browser()->tab_strip_model()->GetActiveWebContents()); |
| 154 chrome::Reload(browser(), WindowOpenDisposition::CURRENT_TAB); | 155 chrome::Reload(browser(), WindowOpenDisposition::CURRENT_TAB); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 action_controller_->OnRoutesUpdated(std::vector<MediaRoute>(), | 198 action_controller_->OnRoutesUpdated(std::vector<MediaRoute>(), |
| 198 std::vector<MediaRoute::Id>()); | 199 std::vector<MediaRoute::Id>()); |
| 199 EXPECT_FALSE(ActionExists()); | 200 EXPECT_FALSE(ActionExists()); |
| 200 action_controller_->OnRoutesUpdated(routes_, std::vector<MediaRoute::Id>()); | 201 action_controller_->OnRoutesUpdated(routes_, std::vector<MediaRoute::Id>()); |
| 201 EXPECT_TRUE(ActionExists()); | 202 EXPECT_TRUE(ActionExists()); |
| 202 browser2->window()->Close(); | 203 browser2->window()->Close(); |
| 203 EXPECT_TRUE(ActionExists()); | 204 EXPECT_TRUE(ActionExists()); |
| 204 } | 205 } |
| 205 | 206 |
| 206 } // namespace media_router | 207 } // namespace media_router |
| OLD | NEW |