| 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/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
| 8 #include "chrome/browser/extensions/browser_action_test_util.h" | 8 #include "chrome/browser/extensions/browser_action_test_util.h" |
| 9 #include "chrome/browser/media/router/media_router_ui_service.h" | 9 #include "chrome/browser/media/router/media_router_ui_service.h" |
| 10 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti
l.h" | 10 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti
l.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 ToolbarActionsBar* toolbar_actions_bar_ = nullptr; | 117 ToolbarActionsBar* toolbar_actions_bar_ = nullptr; |
| 118 | 118 |
| 119 Issue issue_; | 119 Issue issue_; |
| 120 | 120 |
| 121 // A vector of MediaRoutes that includes a local route. | 121 // A vector of MediaRoutes that includes a local route. |
| 122 std::vector<MediaRoute> routes_; | 122 std::vector<MediaRoute> routes_; |
| 123 | 123 |
| 124 MediaRouterActionController* action_controller_ = nullptr; | 124 MediaRouterActionController* action_controller_ = nullptr; |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 #if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_WIN) |
| 128 // Flaky on chromeos, linux, win: https://crbug.com/658005 |
| 129 #define MAYBE_OpenDialogWithMediaRouterAction \ |
| 130 DISABLED_OpenDialogWithMediaRouterAction |
| 131 #else |
| 132 #define MAYBE_OpenDialogWithMediaRouterAction OpenDialogWithMediaRouterAction |
| 133 #endif |
| 134 |
| 127 IN_PROC_BROWSER_TEST_F(MediaRouterUIBrowserTest, | 135 IN_PROC_BROWSER_TEST_F(MediaRouterUIBrowserTest, |
| 128 OpenDialogWithMediaRouterAction) { | 136 MAYBE_OpenDialogWithMediaRouterAction) { |
| 129 // We start off at about:blank page. | 137 // We start off at about:blank page. |
| 130 // Make sure there is 1 tab and media router is enabled. | 138 // Make sure there is 1 tab and media router is enabled. |
| 131 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 139 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
| 132 | 140 |
| 133 SetAlwaysShowActionPref(true); | 141 SetAlwaysShowActionPref(true); |
| 134 EXPECT_TRUE(ActionExists()); | 142 EXPECT_TRUE(ActionExists()); |
| 135 | 143 |
| 136 OpenMediaRouterDialogAndWaitForNewWebContents(); | 144 OpenMediaRouterDialogAndWaitForNewWebContents(); |
| 137 | 145 |
| 138 // Reload the browser and wait. | 146 // Reload the browser and wait. |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 action_controller_->OnRoutesUpdated(std::vector<MediaRoute>(), | 320 action_controller_->OnRoutesUpdated(std::vector<MediaRoute>(), |
| 313 std::vector<MediaRoute::Id>()); | 321 std::vector<MediaRoute::Id>()); |
| 314 EXPECT_FALSE(ActionExists()); | 322 EXPECT_FALSE(ActionExists()); |
| 315 action_controller_->OnRoutesUpdated(routes_, std::vector<MediaRoute::Id>()); | 323 action_controller_->OnRoutesUpdated(routes_, std::vector<MediaRoute::Id>()); |
| 316 EXPECT_TRUE(ActionExists()); | 324 EXPECT_TRUE(ActionExists()); |
| 317 browser2->window()->Close(); | 325 browser2->window()->Close(); |
| 318 EXPECT_TRUE(ActionExists()); | 326 EXPECT_TRUE(ActionExists()); |
| 319 } | 327 } |
| 320 | 328 |
| 321 } // namespace media_router | 329 } // namespace media_router |
| OLD | NEW |