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

Unified Diff: chromecast/browser/test/cast_browser_test.h

Issue 2570623003: [Chromecast] Turn CastContentWindow into an abstract interface. (Closed)
Patch Set: Fix browser test Created 3 years, 11 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
« no previous file with comments | « chromecast/browser/service/cast_service_simple.cc ('k') | chromecast/browser/test/cast_browser_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/test/cast_browser_test.h
diff --git a/chromecast/browser/test/cast_browser_test.h b/chromecast/browser/test/cast_browser_test.h
index dfb25ebd02c1dfa2e537fc23e5e020529275f368..63acd6b4183410e35755bd825f4ff89b019abf51 100644
--- a/chromecast/browser/test/cast_browser_test.h
+++ b/chromecast/browser/test/cast_browser_test.h
@@ -8,6 +8,7 @@
#include <memory>
#include "base/macros.h"
+#include "chromecast/browser/cast_content_window.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_base.h"
@@ -18,14 +19,13 @@ class WebContents;
namespace chromecast {
namespace shell {
-class CastContentWindow;
-
// This test allows for running an entire browser-process lifecycle per unit
// test, using Chromecast's cast_shell. This starts up the shell, runs a test
// case, then shuts down the entire shell.
// Note that this process takes 7-10 seconds per test case on Chromecast, so
// fewer test cases with more assertions are preferable.
-class CastBrowserTest : public content::BrowserTestBase {
+class CastBrowserTest : public content::BrowserTestBase,
+ CastContentWindow::Delegate {
protected:
CastBrowserTest();
~CastBrowserTest() override;
@@ -39,6 +39,10 @@ class CastBrowserTest : public content::BrowserTestBase {
content::WebContents* NavigateToURL(const GURL& url);
private:
+ // CastContentWindow::Delegate implementation:
+ void OnWindowDestroyed() override;
+ void OnKeyEvent(const ui::KeyEvent& key_event) override;
+
std::unique_ptr<CastContentWindow> window_;
std::unique_ptr<content::WebContents> web_contents_;
« no previous file with comments | « chromecast/browser/service/cast_service_simple.cc ('k') | chromecast/browser/test/cast_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698