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

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

Issue 2681863005: [Video] MediaSession API event handlers can resume background video. (Closed)
Patch Set: Updated the comment in ComputePlayState 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool IsFrameHidden() override { return is_hidden_; } 97 bool IsFrameHidden() override { return is_hidden_; }
98 bool IsFrameClosed() override { return false; } 98 bool IsFrameClosed() override { return false; }
99 bool IsBackgroundVideoPlaybackUnlocked() override { return false; }
100 99
101 void set_hidden(bool is_hidden) { is_hidden_ = is_hidden; } 100 void set_hidden(bool is_hidden) { is_hidden_ = is_hidden; }
102 101
103 private: 102 private:
104 int delegate_id_ = 1234; 103 int delegate_id_ = 1234;
105 Observer* observer_ = nullptr; 104 Observer* observer_ = nullptr;
106 bool playing_ = false; 105 bool playing_ = false;
107 bool has_video_ = false; 106 bool has_video_ = false;
108 bool is_hidden_ = false; 107 bool is_hidden_ = false;
109 bool is_gone_ = true; 108 bool is_gone_ = true;
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 // OnShown() should restart after a forced suspension. 956 // OnShown() should restart after a forced suspension.
958 player_->OnFrameShown(); 957 player_->OnFrameShown();
959 EXPECT_FALSE(player_->paused()); 958 EXPECT_FALSE(player_->paused());
960 EXPECT_CALL(*this, DoSetWebLayer(false)); 959 EXPECT_CALL(*this, DoSetWebLayer(false));
961 960
962 base::RunLoop().RunUntilIdle(); 961 base::RunLoop().RunUntilIdle();
963 } 962 }
964 #endif 963 #endif
965 964
966 } // namespace content 965 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/renderer_webmediaplayer_delegate_browsertest.cc ('k') | media/blink/webmediaplayer_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698