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

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

Issue 1784533004: [Media Router] Add origins to sink query results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 4 years, 9 months 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
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/test/media_router/test_media_sinks_observer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 const RouteRequestResult& result) { 75 const RouteRequestResult& result) {
76 ASSERT_TRUE(result.route()); 76 ASSERT_TRUE(result.route());
77 route_id_ = result.route()->media_route_id(); 77 route_id_ = result.route()->media_route_id();
78 } 78 }
79 79
80 void MediaRouterE2EBrowserTest::CreateMediaRoute( 80 void MediaRouterE2EBrowserTest::CreateMediaRoute(
81 const MediaSource& source, 81 const MediaSource& source,
82 const GURL& origin, 82 const GURL& origin,
83 content::WebContents* web_contents) { 83 content::WebContents* web_contents) {
84 DCHECK(media_router_); 84 DCHECK(media_router_);
85 observer_.reset(new TestMediaSinksObserver(media_router_, source)); 85 observer_.reset(new TestMediaSinksObserver(media_router_, source, origin));
86 observer_->Init(); 86 observer_->Init();
87 87
88 DVLOG(1) << "Receiver name: " << receiver(); 88 DVLOG(1) << "Receiver name: " << receiver();
89 // Wait for MediaSinks compatible with |source| to be discovered. 89 // Wait for MediaSinks compatible with |source| to be discovered.
90 ASSERT_TRUE(ConditionalWait( 90 ASSERT_TRUE(ConditionalWait(
91 base::TimeDelta::FromSeconds(30), base::TimeDelta::FromSeconds(1), 91 base::TimeDelta::FromSeconds(30), base::TimeDelta::FromSeconds(1),
92 base::Bind(&MediaRouterE2EBrowserTest::IsSinkDiscovered, 92 base::Bind(&MediaRouterE2EBrowserTest::IsSinkDiscovered,
93 base::Unretained(this)))); 93 base::Unretained(this))));
94 94
95 const auto& sink_map = observer_->sink_map; 95 const auto& sink_map = observer_->sink_map;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 CreateMediaRoute(MediaSourceForPresentationUrl(kCastAppPresentationUrl), 162 CreateMediaRoute(MediaSourceForPresentationUrl(kCastAppPresentationUrl),
163 GURL(kOriginUrl), nullptr); 163 GURL(kOriginUrl), nullptr);
164 Wait(base::TimeDelta::FromSeconds(30)); 164 Wait(base::TimeDelta::FromSeconds(30));
165 165
166 // Wait for 10 seconds to make sure route has been stopped. 166 // Wait for 10 seconds to make sure route has been stopped.
167 StopMediaRoute(); 167 StopMediaRoute();
168 Wait(base::TimeDelta::FromSeconds(10)); 168 Wait(base::TimeDelta::FromSeconds(10));
169 } 169 }
170 170
171 } // namespace media_router 171 } // namespace media_router
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/test/media_router/test_media_sinks_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698