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

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

Issue 1110683002: Plugin Power Saver: Add browsertest for poster attribute on object tag directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add size to embed tags 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 | no next file » | 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 38f71878eabb862aeae90f57fd37e189d23d0aeb..23709a370b96240ee4f78c6c9108b7e36323eba5 100644
--- a/chrome/browser/plugins/plugin_power_saver_browsertest.cc
+++ b/chrome/browser/plugins/plugin_power_saver_browsertest.cc
@@ -127,21 +127,37 @@ IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, LargeCrossOrigin) {
EXPECT_FALSE(IsPluginPeripheral("plugin"));
}
-IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, LargePluginsUsePosters) {
+IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest,
+ LargePluginsPeripheralWhenPosterSpecified) {
LoadHTML(
- "<object id='plugin' type='application/x-ppapi-tests' "
+ "<object id='plugin_src' type='application/x-ppapi-tests' "
+ " width='400' height='500'"
+ " poster='snapshot1x.png' />"
+ "<object id='plugin_srcset' type='application/x-ppapi-tests' "
+ " width='400' height='500'"
+ " poster='snapshot1x.png 1x, snapshot2x.png 2x' />"
+ "<object id='plugin_legacy_syntax' type='application/x-ppapi-tests' "
" width='400' height='500'>"
" <param name='poster' value='snapshot1x.png 1x, snapshot2x.png 2x' />"
- "</object>");
- EXPECT_TRUE(IsPluginPeripheral("plugin"));
+ "</object>"
+ "<embed id='plugin_embed_src' type='application/x-ppapi-tests' "
+ " width='400' height='500' poster='snapshot1x.png' />"
+ "<embed id='plugin_embed_srcset' type='application/x-ppapi-tests' "
+ " width='400' height='500'"
+ " poster='snapshot1x.png 1x, snapshot2x.png 2x' />");
+
+ EXPECT_TRUE(IsPluginPeripheral("plugin_src"));
+ EXPECT_TRUE(IsPluginPeripheral("plugin_srcset"));
+ EXPECT_TRUE(IsPluginPeripheral("plugin_legacy_syntax"));
+ EXPECT_TRUE(IsPluginPeripheral("plugin_embed_src"));
+ EXPECT_TRUE(IsPluginPeripheral("plugin_embed_srcset"));
}
-IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, SmallPluginWithPoster) {
+IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest,
+ PluginMarkedEssentialAfterPosterClicked) {
LoadHTML(
"<object id='plugin' type='application/x-ppapi-tests' "
- " width='400' height='100'>"
- " <param name='poster' value='snapshot1x.png 1x, snapshot2x.png 2x' />"
- "</object>");
+ " width='400' height='100' poster='snapshot1x.png' />");
EXPECT_TRUE(IsPluginPeripheral("plugin"));
SimulateClickAndAwaitMarkedEssential("plugin", gfx::Point(50, 50));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698