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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 }; | 624 }; |
625 | 625 |
626 #if defined(MOJO_RENDERER) | 626 #if defined(MOJO_RENDERER) |
627 class PipelineIntegrationTestHost : public mojo::test::ApplicationTestBase, | 627 class PipelineIntegrationTestHost : public mojo::test::ApplicationTestBase, |
628 public PipelineIntegrationTestBase { | 628 public PipelineIntegrationTestBase { |
629 public: | 629 public: |
630 bool ShouldCreateDefaultRunLoop() override { return false; } | 630 bool ShouldCreateDefaultRunLoop() override { return false; } |
631 | 631 |
632 void SetUp() override { | 632 void SetUp() override { |
633 ApplicationTestBase::SetUp(); | 633 ApplicationTestBase::SetUp(); |
634 if (!IsMediaLibraryInitialized()) | 634 InitializeMediaLibrary(); |
635 InitializeMediaLibraryForTesting(); | |
636 } | 635 } |
637 | 636 |
638 protected: | 637 protected: |
639 scoped_ptr<Renderer> CreateRenderer() override { | 638 scoped_ptr<Renderer> CreateRenderer() override { |
640 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 639 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
641 request->url = mojo::String::From("mojo:media"); | 640 request->url = mojo::String::From("mojo:media"); |
642 mojo::ServiceProvider* service_provider = | 641 mojo::ServiceProvider* service_provider = |
643 application_impl() | 642 application_impl() |
644 ->ConnectToApplication(request.Pass()) | 643 ->ConnectToApplication(request.Pass()) |
645 ->GetServiceProvider(); | 644 ->GetServiceProvider(); |
(...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1741 | 1740 |
1742 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 1741 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
1743 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); | 1742 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); |
1744 Play(); | 1743 Play(); |
1745 ASSERT_TRUE(WaitUntilOnEnded()); | 1744 ASSERT_TRUE(WaitUntilOnEnded()); |
1746 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 1745 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
1747 demuxer_->GetStartTime()); | 1746 demuxer_->GetStartTime()); |
1748 } | 1747 } |
1749 | 1748 |
1750 } // namespace media | 1749 } // namespace media |
OLD | NEW |