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

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

Issue 2769153005: Remove |use_fallback_path_| from WMPI (Closed)
Patch Set: Addressed comment 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_selector.cc ('k') | media/blink/webmediaplayer_impl.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/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "media/base/renderer_factory_selector.h" 9 #include "media/base/renderer_factory_selector.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 AddFactory(FactoryType::DEFAULT); 63 AddFactory(FactoryType::DEFAULT);
64 AddFactory(FactoryType::MOJO); 64 AddFactory(FactoryType::MOJO);
65 65
66 selector_.SetBaseFactoryType(FactoryType::DEFAULT); 66 selector_.SetBaseFactoryType(FactoryType::DEFAULT);
67 EXPECT_EQ(FactoryType::DEFAULT, GetCurrentlySelectedFactoryType()); 67 EXPECT_EQ(FactoryType::DEFAULT, GetCurrentlySelectedFactoryType());
68 68
69 selector_.SetBaseFactoryType(FactoryType::MOJO); 69 selector_.SetBaseFactoryType(FactoryType::MOJO);
70 EXPECT_EQ(FactoryType::MOJO, GetCurrentlySelectedFactoryType()); 70 EXPECT_EQ(FactoryType::MOJO, GetCurrentlySelectedFactoryType());
71 } 71 }
72 72
73 #if defined(OS_ANDROID)
74 TEST_F(RendererFactorySelectorTest, SetUseMediaPlayer) {
75 AddFactory(FactoryType::DEFAULT);
76 AddFactory(FactoryType::MEDIA_PLAYER);
77 selector_.SetBaseFactoryType(FactoryType::DEFAULT);
78
79 selector_.SetUseMediaPlayer(false);
80 EXPECT_EQ(FactoryType::DEFAULT, GetCurrentlySelectedFactoryType());
81
82 selector_.SetUseMediaPlayer(true);
83 EXPECT_EQ(FactoryType::MEDIA_PLAYER, GetCurrentlySelectedFactoryType());
84
85 selector_.SetUseMediaPlayer(false);
86 EXPECT_EQ(FactoryType::DEFAULT, GetCurrentlySelectedFactoryType());
87 }
88 #endif
89
73 } // namespace media 90 } // namespace media
OLDNEW
« no previous file with comments | « media/base/renderer_factory_selector.cc ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698