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

Unified Diff: content/renderer/pepper/plugin_power_saver_helper_browsertest.cc

Issue 2211753002: Plugin Power Saver Tiny: Fix Plugin.PowerSaver.PeripheralHeuristic UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/renderer/pepper/plugin_power_saver_helper_browsertest.cc
diff --git a/content/renderer/pepper/plugin_power_saver_helper_browsertest.cc b/content/renderer/pepper/plugin_power_saver_helper_browsertest.cc
index 35b8388f88cd2f8d5bdc111104a26b196ae5cf55..43950968df25516f6c8d8a4dec854e346636ef7d 100644
--- a/content/renderer/pepper/plugin_power_saver_helper_browsertest.cc
+++ b/content/renderer/pepper/plugin_power_saver_helper_browsertest.cc
@@ -44,20 +44,22 @@ class PluginPowerSaverHelperTest : public RenderViewTest {
};
TEST_F(PluginPowerSaverHelperTest, TemporaryOriginWhitelist) {
- EXPECT_EQ(RenderFrame::CONTENT_STATUS_PERIPHERAL,
- frame()->GetPeripheralContentStatus(
- url::Origin(GURL("http://same.com")),
- url::Origin(GURL("http://other.com")), gfx::Size(100, 100)));
+ EXPECT_EQ(
+ RenderFrame::CONTENT_STATUS_PERIPHERAL,
+ frame()->GetPeripheralContentStatus(url::Origin(GURL("http://same.com")),
+ url::Origin(GURL("http://other.com")),
+ gfx::Size(100, 100), false));
// Clear out other messages so we find just the plugin power saver IPCs.
sink_->ClearMessages();
frame()->WhitelistContentOrigin(url::Origin(GURL("http://other.com")));
- EXPECT_EQ(RenderFrame::CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_WHITELISTED,
- frame()->GetPeripheralContentStatus(
- url::Origin(GURL("http://same.com")),
- url::Origin(GURL("http://other.com")), gfx::Size(100, 100)));
+ EXPECT_EQ(
+ RenderFrame::CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_WHITELISTED,
+ frame()->GetPeripheralContentStatus(url::Origin(GURL("http://same.com")),
+ url::Origin(GURL("http://other.com")),
+ gfx::Size(100, 100), false));
// Test that we've sent an IPC to the browser.
ASSERT_EQ(1u, sink_->message_count());
@@ -86,17 +88,19 @@ TEST_F(PluginPowerSaverHelperTest, UnthrottleOnExPostFactoWhitelist) {
TEST_F(PluginPowerSaverHelperTest, ClearWhitelistOnNavigate) {
frame()->WhitelistContentOrigin(url::Origin(GURL("http://other.com")));
- EXPECT_EQ(RenderFrame::CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_WHITELISTED,
- frame()->GetPeripheralContentStatus(
- url::Origin(GURL("http://same.com")),
- url::Origin(GURL("http://other.com")), gfx::Size(100, 100)));
+ EXPECT_EQ(
+ RenderFrame::CONTENT_STATUS_ESSENTIAL_CROSS_ORIGIN_WHITELISTED,
+ frame()->GetPeripheralContentStatus(url::Origin(GURL("http://same.com")),
+ url::Origin(GURL("http://other.com")),
+ gfx::Size(100, 100), false));
LoadHTML("<html></html>");
- EXPECT_EQ(RenderFrame::CONTENT_STATUS_PERIPHERAL,
- frame()->GetPeripheralContentStatus(
- url::Origin(GURL("http://same.com")),
- url::Origin(GURL("http://other.com")), gfx::Size(100, 100)));
+ EXPECT_EQ(
+ RenderFrame::CONTENT_STATUS_PERIPHERAL,
+ frame()->GetPeripheralContentStatus(url::Origin(GURL("http://same.com")),
+ url::Origin(GURL("http://other.com")),
+ gfx::Size(100, 100), false));
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698