Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Side by Side Diff: chrome/test/media_router/media_router_e2e_browsertest.cc

Issue 1507743005: [MediaRouter] Renames CloseRoute() to Terminate() and creates DetachRoute() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix android build Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <vector> 7 #include <vector>
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 // Wait for the route request to be fulfilled (and route to be started). 108 // Wait for the route request to be fulfilled (and route to be started).
109 ASSERT_TRUE(ConditionalWait( 109 ASSERT_TRUE(ConditionalWait(
110 base::TimeDelta::FromSeconds(30), base::TimeDelta::FromSeconds(1), 110 base::TimeDelta::FromSeconds(30), base::TimeDelta::FromSeconds(1),
111 base::Bind(&MediaRouterE2EBrowserTest::IsRouteCreated, 111 base::Bind(&MediaRouterE2EBrowserTest::IsRouteCreated,
112 base::Unretained(this)))); 112 base::Unretained(this))));
113 } 113 }
114 114
115 void MediaRouterE2EBrowserTest::StopMediaRoute() { 115 void MediaRouterE2EBrowserTest::StopMediaRoute() {
116 ASSERT_FALSE(route_id_.empty()); 116 ASSERT_FALSE(route_id_.empty());
117 117 media_router_->TerminateRoute(route_id_);
118 media_router_->CloseRoute(route_id_);
119 } 118 }
120 119
121 bool MediaRouterE2EBrowserTest::IsSinkDiscovered() const { 120 bool MediaRouterE2EBrowserTest::IsSinkDiscovered() const {
122 return ContainsKey(observer_->sink_map, receiver()); 121 return ContainsKey(observer_->sink_map, receiver());
123 } 122 }
124 123
125 bool MediaRouterE2EBrowserTest::IsRouteCreated() const { 124 bool MediaRouterE2EBrowserTest::IsRouteCreated() const {
126 return !route_id_.empty(); 125 return !route_id_.empty();
127 } 126 }
128 127
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 CreateMediaRoute(MediaSourceForPresentationUrl(kCastAppPresentationUrl), 162 CreateMediaRoute(MediaSourceForPresentationUrl(kCastAppPresentationUrl),
164 GURL(kOriginUrl), nullptr); 163 GURL(kOriginUrl), nullptr);
165 Wait(base::TimeDelta::FromSeconds(30)); 164 Wait(base::TimeDelta::FromSeconds(30));
166 165
167 // Wait for 10 seconds to make sure route has been stopped. 166 // Wait for 10 seconds to make sure route has been stopped.
168 StopMediaRoute(); 167 StopMediaRoute();
169 Wait(base::TimeDelta::FromSeconds(10)); 168 Wait(base::TimeDelta::FromSeconds(10));
170 } 169 }
171 170
172 } // namespace media_router 171 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/media_router/media_router_ui.cc ('k') | content/browser/presentation/presentation_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698