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

Unified Diff: chrome/browser/plugins/plugin_power_saver_browsertest.cc

Issue 1085993003: Plugin Power Saver: Make posters work right when image is 404 Not Found. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@0263-plugin-power-saver-heuristic-tests
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | chrome/renderer/resources/plugin_placeholders.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_power_saver_browsertest.cc
diff --git a/chrome/browser/plugins/plugin_power_saver_browsertest.cc b/chrome/browser/plugins/plugin_power_saver_browsertest.cc
index 0d77e0df4a8c3273dfc51b3c1d486664a8541672..87eb77a12a1d8b2643f96876cf78e04bb21069fb 100644
--- a/chrome/browser/plugins/plugin_power_saver_browsertest.cc
+++ b/chrome/browser/plugins/plugin_power_saver_browsertest.cc
@@ -79,7 +79,7 @@ IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, LargeCrossOrigin) {
EXPECT_FALSE(IsPluginPeripheral("plugin"));
}
-IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, LargeWithPoster) {
+IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, LargePluginsUsePosters) {
Lei Zhang 2015/04/15 07:39:07 Just name this correctly in the CL that adds it.
tommycli 2015/04/17 00:12:15 Done.
LoadHTML(
"<object id='plugin' type='application/x-ppapi-tests' "
" width='400' height='500'>"
@@ -88,6 +88,23 @@ IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, LargeWithPoster) {
EXPECT_TRUE(IsPluginPeripheral("plugin"));
}
+IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, SmallPluginWithPoster) {
+ LoadHTML(
+ "<object id='plugin' type='application/x-ppapi-tests' "
+ " width='400' height='100'>"
+ " <param name='poster' value='snapshot1x.png 1x, snapshot2x.png 2x' />"
+ "</object>");
+ EXPECT_TRUE(IsPluginPeripheral("plugin"));
+
+ // Test that the small plugin is essential after clicking on poster.
+ content::SimulateMouseClickAt(GetActiveWebContents(), 0 /* modifiers */,
+ blink::WebMouseEvent::ButtonLeft,
+ gfx::Point(50, 50));
+ content::RunAllBlockingPoolTasksUntilIdle();
+
+ EXPECT_FALSE(IsPluginPeripheral("plugin"));
+}
+
IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, OriginWhitelisting) {
LoadHTML(
"<object id='plugin1' data='http://otherorigin.com/fake1.swf' "
« no previous file with comments | « no previous file | chrome/renderer/resources/plugin_placeholders.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698