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

Side by Side Diff: media/mojo/services/media_mojo_unittest.cc

Issue 2240213003: Update media mojom files to use TimeDelta instead of int64 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@OnDurationChanged_CL
Patch Set: Created 4 years, 4 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/mojo/interfaces/renderer.mojom ('k') | media/mojo/services/mojo_renderer_service.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 2015 The Chromium Authors. All rights reserved. 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 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 25 matching lines...) Expand all
36 const char kInvalidKeySystem[] = "invalid.key.system"; 36 const char kInvalidKeySystem[] = "invalid.key.system";
37 #endif 37 #endif
38 const char kSecurityOrigin[] = "http://foo.com"; 38 const char kSecurityOrigin[] = "http://foo.com";
39 39
40 class MockRendererClient : public mojom::RendererClient { 40 class MockRendererClient : public mojom::RendererClient {
41 public: 41 public:
42 MockRendererClient() {} 42 MockRendererClient() {}
43 ~MockRendererClient() override {} 43 ~MockRendererClient() override {}
44 44
45 // mojom::RendererClient implementation. 45 // mojom::RendererClient implementation.
46 MOCK_METHOD2(OnTimeUpdate, void(int64_t time_usec, int64_t max_time_usec)); 46 MOCK_METHOD2(OnTimeUpdate,
47 void(base::TimeDelta time, base::TimeDelta max_time));
47 MOCK_METHOD1(OnBufferingStateChange, void(mojom::BufferingState state)); 48 MOCK_METHOD1(OnBufferingStateChange, void(mojom::BufferingState state));
48 MOCK_METHOD0(OnEnded, void()); 49 MOCK_METHOD0(OnEnded, void());
49 MOCK_METHOD0(OnError, void()); 50 MOCK_METHOD0(OnError, void());
50 MOCK_METHOD1(OnVideoOpacityChange, void(bool opaque)); 51 MOCK_METHOD1(OnVideoOpacityChange, void(bool opaque));
51 MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size& size)); 52 MOCK_METHOD1(OnVideoNaturalSizeChange, void(const gfx::Size& size));
52 MOCK_METHOD1(OnStatisticsUpdate, 53 MOCK_METHOD1(OnStatisticsUpdate,
53 void(const media::PipelineStatistics& stats)); 54 void(const media::PipelineStatistics& stats));
54 MOCK_METHOD0(OnWaitingForDecryptionKey, void()); 55 MOCK_METHOD0(OnWaitingForDecryptionKey, void());
55 MOCK_METHOD1(OnDurationChange, void(int64_t time_usec)); 56 MOCK_METHOD1(OnDurationChange, void(base::TimeDelta duration));
56 57
57 private: 58 private:
58 DISALLOW_COPY_AND_ASSIGN(MockRendererClient); 59 DISALLOW_COPY_AND_ASSIGN(MockRendererClient);
59 }; 60 };
60 61
61 class MediaServiceTest : public shell::test::ServiceTest { 62 class MediaServiceTest : public shell::test::ServiceTest {
62 public: 63 public:
63 MediaServiceTest() 64 MediaServiceTest()
64 : ServiceTest("exe:media_mojo_unittests"), 65 : ServiceTest("exe:media_mojo_unittests"),
65 renderer_client_binding_(&renderer_client_), 66 renderer_client_binding_(&renderer_client_),
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 // close the connection. 189 // close the connection.
189 EXPECT_CALL(*this, ConnectionClosed()) 190 EXPECT_CALL(*this, ConnectionClosed())
190 .Times(Exactly(1)) 191 .Times(Exactly(1))
191 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit)); 192 .WillOnce(Invoke(run_loop_.get(), &base::RunLoop::Quit));
192 service_factory_.reset(); 193 service_factory_.reset();
193 194
194 run_loop_->Run(); 195 run_loop_->Run();
195 } 196 }
196 197
197 } // namespace media 198 } // namespace media
OLDNEW
« no previous file with comments | « media/mojo/interfaces/renderer.mojom ('k') | media/mojo/services/mojo_renderer_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698