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

Unified Diff: chromecast/browser/test/chromecast_browser_test_helper_default.cc

Issue 2450433002: Let CastMediaBlocker observe MediaSession instead of WebContents (Closed)
Patch Set: addressed comments Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chromecast/browser/test/chromecast_browser_test_helper_default.cc
diff --git a/chromecast/browser/test/chromecast_browser_test_helper_default.cc b/chromecast/browser/test/chromecast_browser_test_helper_default.cc
index 8a50925444b7a05a8bbc9c06d16b52cbc59aa428..b941974d6dd3f73c6714812134c89ded4c22983f 100644
--- a/chromecast/browser/test/chromecast_browser_test_helper_default.cc
+++ b/chromecast/browser/test/chromecast_browser_test_helper_default.cc
@@ -9,6 +9,7 @@
#include "chromecast/browser/cast_browser_process.h"
#include "chromecast/browser/cast_content_window.h"
#include "chromecast/browser/cast_media_blocker.h"
+#include "content/public/browser/media_session.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
@@ -27,7 +28,8 @@ class DefaultHelper : public ChromecastBrowserTestHelper {
web_contents_ = window_->CreateWebContents(
CastBrowserProcess::GetInstance()->browser_context());
window_->CreateWindowTree(web_contents_.get());
- blocker_.reset(new CastMediaBlocker(web_contents_.get()));
+ blocker_.reset(new CastMediaBlocker(
+ content::MediaSession::Get(web_contents_.get()), web_contents_));
content::WaitForLoadStop(web_contents_.get());
content::TestNavigationObserver same_tab_observer(web_contents_.get(), 1);
« chromecast/browser/cast_media_blocker.h ('K') | « chromecast/browser/test/cast_media_blocker_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698