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 "chrome/test/media_router/media_router_e2e_browsertest.h" | 5 #include "chrome/test/media_router/media_router_e2e_browsertest.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "chrome/browser/media/router/media_router.h" | 9 #include "chrome/browser/media/router/media_router.h" |
| 10 #include "chrome/browser/media/router/media_router_factory.h" |
10 #include "chrome/browser/media/router/media_router_mojo_impl.h" | 11 #include "chrome/browser/media/router/media_router_mojo_impl.h" |
11 #include "chrome/browser/media/router/media_router_mojo_impl_factory.h" | |
12 #include "chrome/browser/media/router/media_source.h" | 12 #include "chrome/browser/media/router/media_source.h" |
13 #include "chrome/browser/media/router/media_source_helper.h" | 13 #include "chrome/browser/media/router/media_source_helper.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/browser/sessions/session_tab_helper.h" | 15 #include "chrome/browser/sessions/session_tab_helper.h" |
16 #include "chrome/browser/ui/browser_finder.h" | 16 #include "chrome/browser/ui/browser_finder.h" |
17 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 17 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
18 #include "chrome/test/base/ui_test_utils.h" | 18 #include "chrome/test/base/ui_test_utils.h" |
19 #include "content/public/test/test_utils.h" | 19 #include "content/public/test/test_utils.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
21 #include "url/gurl.h" | 21 #include "url/gurl.h" |
(...skipping 24 matching lines...) Expand all Loading... |
46 MediaRouterE2EBrowserTest::MediaRouterE2EBrowserTest() | 46 MediaRouterE2EBrowserTest::MediaRouterE2EBrowserTest() |
47 : media_router_(nullptr) { | 47 : media_router_(nullptr) { |
48 } | 48 } |
49 | 49 |
50 MediaRouterE2EBrowserTest::~MediaRouterE2EBrowserTest() { | 50 MediaRouterE2EBrowserTest::~MediaRouterE2EBrowserTest() { |
51 } | 51 } |
52 | 52 |
53 void MediaRouterE2EBrowserTest::SetUpOnMainThread() { | 53 void MediaRouterE2EBrowserTest::SetUpOnMainThread() { |
54 MediaRouterBaseBrowserTest::SetUpOnMainThread(); | 54 MediaRouterBaseBrowserTest::SetUpOnMainThread(); |
55 media_router_ = | 55 media_router_ = |
56 MediaRouterMojoImplFactory::GetApiForBrowserContext(browser()->profile()); | 56 MediaRouterFactory::GetApiForBrowserContext(browser()->profile()); |
57 DCHECK(media_router_); | 57 DCHECK(media_router_); |
58 } | 58 } |
59 | 59 |
60 void MediaRouterE2EBrowserTest::TearDownOnMainThread() { | 60 void MediaRouterE2EBrowserTest::TearDownOnMainThread() { |
61 MediaRouterBaseBrowserTest::TearDownOnMainThread(); | 61 MediaRouterBaseBrowserTest::TearDownOnMainThread(); |
62 media_router_ = nullptr; | 62 media_router_ = nullptr; |
63 } | 63 } |
64 | 64 |
65 void MediaRouterE2EBrowserTest::OnRouteResponseReceived( | 65 void MediaRouterE2EBrowserTest::OnRouteResponseReceived( |
66 const MediaRoute* route, | 66 const MediaRoute* route, |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 CreateMediaRoute(MediaSourceForPresentationUrl(kCastAppPresentationUrl), | 151 CreateMediaRoute(MediaSourceForPresentationUrl(kCastAppPresentationUrl), |
152 GURL("http://origin/"), kInvalidTabId); | 152 GURL("http://origin/"), kInvalidTabId); |
153 Wait(base::TimeDelta::FromSeconds(30)); | 153 Wait(base::TimeDelta::FromSeconds(30)); |
154 | 154 |
155 // Wait for 10 seconds to make sure route has been stopped. | 155 // Wait for 10 seconds to make sure route has been stopped. |
156 StopMediaRoute(); | 156 StopMediaRoute(); |
157 Wait(base::TimeDelta::FromSeconds(10)); | 157 Wait(base::TimeDelta::FromSeconds(10)); |
158 } | 158 } |
159 | 159 |
160 } // namespace media_router | 160 } // namespace media_router |
OLD | NEW |