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

Unified Diff: chrome/test/media_router/media_router_e2e_browsertest.h

Issue 595663002: Put chromoting isolate targets under chromoting_swarm_tests=1 GYP variable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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: chrome/test/media_router/media_router_e2e_browsertest.h
diff --git a/chrome/test/media_router/media_router_e2e_browsertest.h b/chrome/test/media_router/media_router_e2e_browsertest.h
new file mode 100644
index 0000000000000000000000000000000000000000..6682e8f983e0562fef267ef7d55ef4e48ab4bc9c
--- /dev/null
+++ b/chrome/test/media_router/media_router_e2e_browsertest.h
@@ -0,0 +1,66 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_E2E_BROWSERTEST_H_
+#define CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_E2E_BROWSERTEST_H_
+
+#include <string>
+
+#include "base/memory/scoped_ptr.h"
+#include "chrome/browser/media/router/media_route.h"
+#include "chrome/browser/media/router/media_router.h"
+#include "chrome/test/media_router/media_router_base_browsertest.h"
+#include "chrome/test/media_router/test_media_sinks_observer.h"
+
+
+namespace media_router {
+
+class MediaRouter;
+
+class MediaRouterE2EBrowserTest : public MediaRouterBaseBrowserTest {
+ public:
+ MediaRouterE2EBrowserTest();
+ ~MediaRouterE2EBrowserTest() override;
+
+ protected:
+ // InProcessBrowserTest Overrides
+ void SetUpOnMainThread() override;
+ void TearDownOnMainThread() override;
+
+ // MediaRouterBaseBrowserTest Overrides
+ void ParseCommandLine() override;
+
+ // Callback from MediaRouter when a response to a media route request is
+ // received.
+ void OnRouteResponseReceived(scoped_ptr<MediaRoute> route,
+ const std::string& error);
+
+ // Initializes |observer_| to listen for sinks compatible with |source|,
+ // finds sink with name matching receiver_, and establishes media
+ // route between the source and sink.
+ // |observer_| and |route_id_| will be initialized.
+ void CreateMediaRoute(const MediaSource& source);
+
+ // Stops the established media route and unregisters |observer_|.
+ // Note that the route may not be stopped immediately, as it makes an
+ // async call to the Media Route Provider.
+ // |observer_| and |route_id_| will be reset.
+ void StopMediaRoute();
+
+ std::string receiver() const { return receiver_; }
+
+ bool IsDeviceDiscoveried() const;
+ bool IsRouteCreated() const;
+
+ private:
+ std::string receiver_;
+
+ MediaRouter* media_router_;
+ scoped_ptr<TestMediaSinksObserver> observer_;
+ MediaRoute::Id route_id_;
+};
+
+} // namespace media_router
+
+#endif // CHROME_TEST_MEDIA_ROUTER_MEDIA_ROUTER_E2E_BROWSERTEST_H_
« no previous file with comments | « chrome/test/media_router/media_router_base_browsertest.cc ('k') | chrome/test/media_router/media_router_e2e_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698