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/thread_task_runner_handle.h" | 6 #include "base/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/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_commands.h" | 9 #include "chrome/browser/ui/browser_commands.h" |
10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 nav_observer.StopWatchingNewWebContents(); | 87 nav_observer.StopWatchingNewWebContents(); |
88 } | 88 } |
89 | 89 |
90 void ExecuteMediaRouterAction(AppMenuButton* app_menu_button) { | 90 void ExecuteMediaRouterAction(AppMenuButton* app_menu_button) { |
91 EXPECT_TRUE(app_menu_button->IsMenuShowing()); | 91 EXPECT_TRUE(app_menu_button->IsMenuShowing()); |
92 media_router_action_->ExecuteAction(true); | 92 media_router_action_->ExecuteAction(true); |
93 } | 93 } |
94 | 94 |
95 protected: | 95 protected: |
96 // Must be initialized after |InProcessBrowserTest::SetUpOnMainThread|. | 96 // Must be initialized after |InProcessBrowserTest::SetUpOnMainThread|. |
97 scoped_ptr<BrowserActionTestUtil> browser_action_test_util_; | 97 std::unique_ptr<BrowserActionTestUtil> browser_action_test_util_; |
98 scoped_ptr<MediaRouterAction> media_router_action_; | 98 std::unique_ptr<MediaRouterAction> media_router_action_; |
99 | 99 |
100 // ToolbarActionView constructed to set the delegate on | 100 // ToolbarActionView constructed to set the delegate on |
101 // |media_router_action_|. | 101 // |media_router_action_|. |
102 ToolbarActionView* toolbar_action_view_; | 102 ToolbarActionView* toolbar_action_view_; |
103 | 103 |
104 // Hosts the |toolbar_action_view_|. | 104 // Hosts the |toolbar_action_view_|. |
105 views::Widget* toolbar_action_view_widget_; | 105 views::Widget* toolbar_action_view_widget_; |
106 }; | 106 }; |
107 | 107 |
108 IN_PROC_BROWSER_TEST_F(MediaRouterUIBrowserTest, | 108 IN_PROC_BROWSER_TEST_F(MediaRouterUIBrowserTest, |
(...skipping 16 matching lines...) Expand all Loading... |
125 | 125 |
126 // Navigate away. | 126 // Navigate away. |
127 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); | 127 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); |
128 | 128 |
129 // The navigation should have removed the previously created dialog. | 129 // The navigation should have removed the previously created dialog. |
130 // We expect a new dialog WebContents to be created by calling this. | 130 // We expect a new dialog WebContents to be created by calling this. |
131 OpenMediaRouterDialogAndWaitForNewWebContents(); | 131 OpenMediaRouterDialogAndWaitForNewWebContents(); |
132 } | 132 } |
133 | 133 |
134 } // namespace media_router | 134 } // namespace media_router |
OLD | NEW |