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

Side by Side Diff: content/renderer/media/webmediaplayer_ms_unittest.cc

Issue 2693203002: Provide a WebContents API to discover the playback of a fullscreen video. (Closed)
Patch Set: fix compile Created 3 years, 10 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
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 <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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 void ClearStaleFlag(int delegate_id) override { 88 void ClearStaleFlag(int delegate_id) override {
89 EXPECT_EQ(delegate_id_, delegate_id); 89 EXPECT_EQ(delegate_id_, delegate_id);
90 } 90 }
91 91
92 bool IsStale(int delegate_id) override { 92 bool IsStale(int delegate_id) override {
93 EXPECT_EQ(delegate_id_, delegate_id); 93 EXPECT_EQ(delegate_id_, delegate_id);
94 return false; 94 return false;
95 } 95 }
96 96
97 void SetIsFullscreen(int delegate_id, bool is_fullscreen) override {
98 EXPECT_EQ(delegate_id_, delegate_id);
99 }
100
97 bool IsFrameHidden() override { return is_hidden_; } 101 bool IsFrameHidden() override { return is_hidden_; }
98 bool IsFrameClosed() override { return false; } 102 bool IsFrameClosed() override { return false; }
99 bool IsBackgroundVideoPlaybackUnlocked() override { return false; } 103 bool IsBackgroundVideoPlaybackUnlocked() override { return false; }
100 104
101 void set_hidden(bool is_hidden) { is_hidden_ = is_hidden; } 105 void set_hidden(bool is_hidden) { is_hidden_ = is_hidden; }
102 106
103 private: 107 private:
104 int delegate_id_ = 1234; 108 int delegate_id_ = 1234;
105 Observer* observer_ = nullptr; 109 Observer* observer_ = nullptr;
106 bool playing_ = false; 110 bool playing_ = false;
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 // OnShown() should restart after a forced suspension. 961 // OnShown() should restart after a forced suspension.
958 player_->OnFrameShown(); 962 player_->OnFrameShown();
959 EXPECT_FALSE(player_->paused()); 963 EXPECT_FALSE(player_->paused());
960 EXPECT_CALL(*this, DoSetWebLayer(false)); 964 EXPECT_CALL(*this, DoSetWebLayer(false));
961 965
962 base::RunLoop().RunUntilIdle(); 966 base::RunLoop().RunUntilIdle();
963 } 967 }
964 #endif 968 #endif
965 969
966 } // namespace content 970 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698