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

Unified Diff: content/browser/webrtc/webrtc_internals_unittest.cc

Issue 2886603003: Convert //content/browser/webrtc to be clients of WakeLock mojo service. (Closed)
Patch Set: Convert //content/browser/webrtc to be clients of WakeLock mojo service. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/webrtc/webrtc_internals_unittest.cc
diff --git a/content/browser/webrtc/webrtc_internals_unittest.cc b/content/browser/webrtc/webrtc_internals_unittest.cc
index bdadf0a0b5c2167a53b60842aef2c2c88242592a..494072969ee4bec1644791dd7bf5ee0996ef95f9 100644
--- a/content/browser/webrtc/webrtc_internals_unittest.cc
+++ b/content/browser/webrtc/webrtc_internals_unittest.cc
@@ -395,7 +395,7 @@ TEST_F(WebRtcInternalsTest, AudioDebugRecordingsFileSelectionCanceled) {
EXPECT_EQ(nullptr, observer.value());
}
-TEST_F(WebRtcInternalsTest, PowerSaveBlock) {
+TEST_F(WebRtcInternalsTest, WakeLock) {
int kRenderProcessId = 1;
const int pid = 1;
const int lid[] = {1, 2, 3};
@@ -404,44 +404,44 @@ TEST_F(WebRtcInternalsTest, PowerSaveBlock) {
// Add a few peer connections.
EXPECT_EQ(0, webrtc_internals.num_open_connections());
- EXPECT_FALSE(webrtc_internals.IsPowerSavingBlocked());
+ EXPECT_FALSE(webrtc_internals.HasWakeLockForTesting());
webrtc_internals.OnAddPeerConnection(kRenderProcessId, pid, lid[0], kUrl,
kRtcConfiguration, kContraints);
EXPECT_EQ(1, webrtc_internals.num_open_connections());
- EXPECT_TRUE(webrtc_internals.IsPowerSavingBlocked());
+ EXPECT_TRUE(webrtc_internals.HasWakeLockForTesting());
webrtc_internals.OnAddPeerConnection(kRenderProcessId, pid, lid[1], kUrl,
kRtcConfiguration, kContraints);
EXPECT_EQ(2, webrtc_internals.num_open_connections());
- EXPECT_TRUE(webrtc_internals.IsPowerSavingBlocked());
+ EXPECT_TRUE(webrtc_internals.HasWakeLockForTesting());
webrtc_internals.OnAddPeerConnection(kRenderProcessId, pid, lid[2], kUrl,
kRtcConfiguration, kContraints);
EXPECT_EQ(3, webrtc_internals.num_open_connections());
- EXPECT_TRUE(webrtc_internals.IsPowerSavingBlocked());
+ EXPECT_TRUE(webrtc_internals.HasWakeLockForTesting());
// Remove a peer connection without closing it first.
webrtc_internals.OnRemovePeerConnection(pid, lid[2]);
EXPECT_EQ(2, webrtc_internals.num_open_connections());
- EXPECT_TRUE(webrtc_internals.IsPowerSavingBlocked());
+ EXPECT_TRUE(webrtc_internals.HasWakeLockForTesting());
// Close the remaining peer connections.
webrtc_internals.OnUpdatePeerConnection(pid, lid[1], "stop", std::string());
EXPECT_EQ(1, webrtc_internals.num_open_connections());
- EXPECT_TRUE(webrtc_internals.IsPowerSavingBlocked());
+ EXPECT_TRUE(webrtc_internals.HasWakeLockForTesting());
webrtc_internals.OnUpdatePeerConnection(pid, lid[0], "stop", std::string());
EXPECT_EQ(0, webrtc_internals.num_open_connections());
- EXPECT_FALSE(webrtc_internals.IsPowerSavingBlocked());
+ EXPECT_FALSE(webrtc_internals.HasWakeLockForTesting());
// Remove the remaining peer connections.
webrtc_internals.OnRemovePeerConnection(pid, lid[1]);
EXPECT_EQ(0, webrtc_internals.num_open_connections());
- EXPECT_FALSE(webrtc_internals.IsPowerSavingBlocked());
+ EXPECT_FALSE(webrtc_internals.HasWakeLockForTesting());
webrtc_internals.OnRemovePeerConnection(pid, lid[0]);
EXPECT_EQ(0, webrtc_internals.num_open_connections());
- EXPECT_FALSE(webrtc_internals.IsPowerSavingBlocked());
+ EXPECT_FALSE(webrtc_internals.HasWakeLockForTesting());
}
} // namespace content
« content/browser/webrtc/webrtc_internals.h ('K') | « content/browser/webrtc/webrtc_internals.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698