Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / media / router / media_router_mojo_test.h
blob69db798d308e993a37b2c9369b363f1e0291539f
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_TEST_H_
6 #define CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_TEST_H_
8 #include <string>
10 #include "base/message_loop/message_loop.h"
11 #include "chrome/browser/media/router/media_router_mojo_impl.h"
12 #include "chrome/browser/media/router/mock_media_router.h"
13 #include "chrome/browser/media/router/test_helper.h"
14 #include "chrome/test/base/testing_profile.h"
15 #include "mojo/message_pump/message_pump_mojo.h"
16 #include "testing/gmock/include/gmock/gmock.h"
17 #include "testing/gtest/include/gtest/gtest.h"
18 #include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
20 namespace media_router {
22 class MediaRouterMojoImpl;
24 // Tests the API call flow between the MediaRouterMojoImpl and the Media Router
25 // Mojo service in both directions.
26 class MediaRouterMojoTest : public ::testing::Test {
27 public:
28 MediaRouterMojoTest();
29 ~MediaRouterMojoTest() override;
31 protected:
32 void SetUp() override;
34 void ProcessEventLoop();
36 void ConnectProviderManagerService();
38 const std::string& extension_id() const { return extension_id_; }
40 MediaRouterMojoImpl* router() const { return mock_media_router_.get(); }
42 // Mock objects.
43 MockMediaRouteProvider mock_media_route_provider_;
44 testing::NiceMock<MockEventPageTracker> mock_event_page_tracker_;
46 // Mojo proxy object for |mock_media_router_|
47 media_router::interfaces::MediaRouterPtr media_router_proxy_;
49 private:
50 base::MessageLoop message_loop_;
51 std::string extension_id_;
52 scoped_ptr<MediaRouterMojoImpl> mock_media_router_;
53 scoped_ptr<mojo::Binding<interfaces::MediaRouteProvider>> binding_;
55 DISALLOW_COPY_AND_ASSIGN(MediaRouterMojoTest);
58 } // namespace media_router
60 #endif // CHROME_BROWSER_MEDIA_ROUTER_MEDIA_ROUTER_MOJO_TEST_H_