| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 void OnResolveWithSession(PromiseResult expected, | 285 void OnResolveWithSession(PromiseResult expected, |
| 286 const std::string& session_id) { | 286 const std::string& session_id) { |
| 287 EXPECT_EQ(expected, RESOLVED); | 287 EXPECT_EQ(expected, RESOLVED); |
| 288 EXPECT_GT(session_id.length(), 0ul); | 288 EXPECT_GT(session_id.length(), 0ul); |
| 289 current_session_id_ = session_id; | 289 current_session_id_ = session_id; |
| 290 } | 290 } |
| 291 | 291 |
| 292 void OnResolve(PromiseResult expected) { EXPECT_EQ(expected, RESOLVED); } | 292 void OnResolve(PromiseResult expected) { EXPECT_EQ(expected, RESOLVED); } |
| 293 | 293 |
| 294 void OnReject(PromiseResult expected, | 294 void OnReject(PromiseResult expected, |
| 295 media::MediaKeys::Exception exception_code, | 295 media::CdmPromise::Exception exception_code, |
| 296 uint32_t system_code, | 296 uint32_t system_code, |
| 297 const std::string& error_message) { | 297 const std::string& error_message) { |
| 298 EXPECT_EQ(expected, REJECTED) << error_message; | 298 EXPECT_EQ(expected, REJECTED) << error_message; |
| 299 } | 299 } |
| 300 | 300 |
| 301 std::unique_ptr<SimpleCdmPromise> CreatePromise(PromiseResult expected) { | 301 std::unique_ptr<SimpleCdmPromise> CreatePromise(PromiseResult expected) { |
| 302 std::unique_ptr<media::SimpleCdmPromise> promise( | 302 std::unique_ptr<media::SimpleCdmPromise> promise( |
| 303 new media::CdmCallbackPromise<>( | 303 new media::CdmCallbackPromise<>( |
| 304 base::Bind(&KeyProvidingApp::OnResolve, base::Unretained(this), | 304 base::Bind(&KeyProvidingApp::OnResolve, base::Unretained(this), |
| 305 expected), | 305 expected), |
| (...skipping 2172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2478 | 2478 |
| 2479 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 2479 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
| 2480 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); | 2480 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); |
| 2481 Play(); | 2481 Play(); |
| 2482 ASSERT_TRUE(WaitUntilOnEnded()); | 2482 ASSERT_TRUE(WaitUntilOnEnded()); |
| 2483 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 2483 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
| 2484 demuxer_->GetStartTime()); | 2484 demuxer_->GetStartTime()); |
| 2485 } | 2485 } |
| 2486 | 2486 |
| 2487 } // namespace media | 2487 } // namespace media |
| OLD | NEW |