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

Side by Side Diff: media/base/renderer_factory_selector_unittest.cc

Issue 2849043002: Send AndroidOverlay routing token from WMPI to AVDA. (Closed)
Patch Set: rebased Created 3 years, 7 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 | « media/base/renderer_factory.h ('k') | media/base/routing_token_callback.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 <memory> 5 #include <memory>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "media/base/overlay_info.h"
10 #include "media/base/renderer_factory_selector.h" 11 #include "media/base/renderer_factory_selector.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 13
13 namespace media { 14 namespace media {
14 15
15 class RendererFactorySelectorTest : public testing::Test { 16 class RendererFactorySelectorTest : public testing::Test {
16 public: 17 public:
17 typedef RendererFactorySelector::FactoryType FactoryType; 18 typedef RendererFactorySelector::FactoryType FactoryType;
18 19
19 class FakeFactory : public RendererFactory { 20 class FakeFactory : public RendererFactory {
20 public: 21 public:
21 FakeFactory(FactoryType type) : type_(type){}; 22 FakeFactory(FactoryType type) : type_(type){};
22 23
23 std::unique_ptr<Renderer> CreateRenderer( 24 std::unique_ptr<Renderer> CreateRenderer(
24 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner, 25 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
25 const scoped_refptr<base::TaskRunner>& worker_task_runner, 26 const scoped_refptr<base::TaskRunner>& worker_task_runner,
26 AudioRendererSink* audio_renderer_sink, 27 AudioRendererSink* audio_renderer_sink,
27 VideoRendererSink* video_renderer_sink, 28 VideoRendererSink* video_renderer_sink,
28 const RequestSurfaceCB& request_surface_cb) override { 29 const RequestOverlayInfoCB& request_overlay_info_cb) override {
29 return std::unique_ptr<Renderer>(); 30 return std::unique_ptr<Renderer>();
30 } 31 }
31 32
32 FactoryType factory_type() { return type_; } 33 FactoryType factory_type() { return type_; }
33 34
34 private: 35 private:
35 FactoryType type_; 36 FactoryType type_;
36 }; 37 };
37 38
38 RendererFactorySelectorTest(){}; 39 RendererFactorySelectorTest(){};
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 EXPECT_EQ(FactoryType::DEFAULT, GetCurrentlySelectedFactoryType()); 104 EXPECT_EQ(FactoryType::DEFAULT, GetCurrentlySelectedFactoryType());
104 105
105 is_remoting_active_ = true; 106 is_remoting_active_ = true;
106 EXPECT_EQ(FactoryType::COURIER, GetCurrentlySelectedFactoryType()); 107 EXPECT_EQ(FactoryType::COURIER, GetCurrentlySelectedFactoryType());
107 108
108 is_remoting_active_ = false; 109 is_remoting_active_ = false;
109 EXPECT_EQ(FactoryType::DEFAULT, GetCurrentlySelectedFactoryType()); 110 EXPECT_EQ(FactoryType::DEFAULT, GetCurrentlySelectedFactoryType());
110 } 111 }
111 112
112 } // namespace media 113 } // namespace media
OLDNEW
« no previous file with comments | « media/base/renderer_factory.h ('k') | media/base/routing_token_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698