| OLD | NEW |
| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "content/public/renderer/media_stream_renderer_factory.h" | 9 #include "content/public/renderer/media_stream_renderer_factory.h" |
| 10 #include "content/renderer/media/webmediaplayer_ms.h" | 10 #include "content/renderer/media/webmediaplayer_ms.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 void RemoveObserver(int delegate_id) override { | 49 void RemoveObserver(int delegate_id) override { |
| 50 EXPECT_EQ(delegate_id_, delegate_id); | 50 EXPECT_EQ(delegate_id_, delegate_id); |
| 51 observer_ = nullptr; | 51 observer_ = nullptr; |
| 52 } | 52 } |
| 53 | 53 |
| 54 void DidPlay(int delegate_id, | 54 void DidPlay(int delegate_id, |
| 55 bool has_video, | 55 bool has_video, |
| 56 bool has_audio, | 56 bool has_audio, |
| 57 bool is_remote, | 57 bool is_remote, |
| 58 base::TimeDelta duration) override { | 58 media::MediaContentType type) override { |
| 59 EXPECT_EQ(delegate_id_, delegate_id); | 59 EXPECT_EQ(delegate_id_, delegate_id); |
| 60 EXPECT_FALSE(playing_); | 60 EXPECT_FALSE(playing_); |
| 61 playing_ = true; | 61 playing_ = true; |
| 62 is_gone_ = false; | 62 is_gone_ = false; |
| 63 } | 63 } |
| 64 | 64 |
| 65 void DidPause(int delegate_id, bool reached_end_of_stream) override { | 65 void DidPause(int delegate_id, bool reached_end_of_stream) override { |
| 66 EXPECT_EQ(delegate_id_, delegate_id); | 66 EXPECT_EQ(delegate_id_, delegate_id); |
| 67 EXPECT_TRUE(playing_); | 67 EXPECT_TRUE(playing_); |
| 68 EXPECT_FALSE(is_gone_); | 68 EXPECT_FALSE(is_gone_); |
| (...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 // OnShown() should restart after a forced suspension. | 872 // OnShown() should restart after a forced suspension. |
| 873 player_->OnShown(); | 873 player_->OnShown(); |
| 874 EXPECT_FALSE(player_->paused()); | 874 EXPECT_FALSE(player_->paused()); |
| 875 EXPECT_CALL(*this, DoSetWebLayer(false)); | 875 EXPECT_CALL(*this, DoSetWebLayer(false)); |
| 876 | 876 |
| 877 message_loop_.RunUntilIdle(); | 877 message_loop_.RunUntilIdle(); |
| 878 } | 878 } |
| 879 #endif | 879 #endif |
| 880 | 880 |
| 881 } // namespace content | 881 } // namespace content |
| OLD | NEW |