| 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 27 matching lines...) Expand all Loading... |
| 38 ->browser_actions(); | 38 ->browser_actions(); |
| 39 ASSERT_TRUE(browser_actions_container); | 39 ASSERT_TRUE(browser_actions_container); |
| 40 | 40 |
| 41 browser_action_test_util_.reset(new BrowserActionTestUtil(browser(), | 41 browser_action_test_util_.reset(new BrowserActionTestUtil(browser(), |
| 42 false)); | 42 false)); |
| 43 media_router_action_.reset(new MediaRouterAction(browser(), | 43 media_router_action_.reset(new MediaRouterAction(browser(), |
| 44 browser_action_test_util_->GetToolbarActionsBar())); | 44 browser_action_test_util_->GetToolbarActionsBar())); |
| 45 | 45 |
| 46 // Sets delegate on |media_router_action_|. | 46 // Sets delegate on |media_router_action_|. |
| 47 toolbar_action_view_.reset( | 47 toolbar_action_view_.reset( |
| 48 new ToolbarActionView(media_router_action_.get(), browser()->profile(), | 48 new ToolbarActionView(media_router_action_.get(), |
| 49 browser_actions_container)); | 49 browser_actions_container)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 void TearDownOnMainThread() override { | 52 void TearDownOnMainThread() override { |
| 53 toolbar_action_view_.reset(); | 53 toolbar_action_view_.reset(); |
| 54 media_router_action_.reset(); | 54 media_router_action_.reset(); |
| 55 browser_action_test_util_.reset(); | 55 browser_action_test_util_.reset(); |
| 56 InProcessBrowserTest::TearDownOnMainThread(); | 56 InProcessBrowserTest::TearDownOnMainThread(); |
| 57 } | 57 } |
| 58 | 58 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 // Navigate away. | 115 // Navigate away. |
| 116 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); | 116 ui_test_utils::NavigateToURL(browser(), GURL("about:blank")); |
| 117 | 117 |
| 118 // The navigation should have removed the previously created dialog. | 118 // The navigation should have removed the previously created dialog. |
| 119 // We expect a new dialog WebContents to be created by calling this. | 119 // We expect a new dialog WebContents to be created by calling this. |
| 120 OpenMediaRouterDialogAndWaitForNewWebContents(); | 120 OpenMediaRouterDialogAndWaitForNewWebContents(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 } // namespace media_router | 123 } // namespace media_router |
| OLD | NEW |