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

Side by Side Diff: chrome/browser/plugins/plugin_power_saver_browsertest.cc

Issue 2504113002: Disable PluginPowerSaverBrowserTest.BackgroundTabPlugins (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdint.h> 5 #include <stdint.h>
6 #include <string> 6 #include <string>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 650
651 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ExpandingSmallPlugin) { 651 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ExpandingSmallPlugin) {
652 LoadPeripheralPlugin(); 652 LoadPeripheralPlugin();
653 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); 653 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin");
654 654
655 std::string script = "window.document.getElementById('plugin').height = 400;"; 655 std::string script = "window.document.getElementById('plugin').height = 400;";
656 ASSERT_TRUE(content::ExecuteScript(GetActiveWebContents(), script)); 656 ASSERT_TRUE(content::ExecuteScript(GetActiveWebContents(), script));
657 VerifyPluginMarkedEssential(GetActiveWebContents(), "plugin"); 657 VerifyPluginMarkedEssential(GetActiveWebContents(), "plugin");
658 } 658 }
659 659
660 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, BackgroundTabPlugins) { 660 // Flaky on all bots. crbug.com/665706
661 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest,
662 DISABLED_BackgroundTabPlugins) {
661 content::WebContents* background_contents = LoadHTMLInBackgroundTab( 663 content::WebContents* background_contents = LoadHTMLInBackgroundTab(
662 "<object id='same_origin' data='fake.swf' " 664 "<object id='same_origin' data='fake.swf' "
663 " type='application/x-shockwave-flash'></object>" 665 " type='application/x-shockwave-flash'></object>"
664 "<object id='small_cross_origin' data='http://otherorigin.com/fake1.swf' " 666 "<object id='small_cross_origin' data='http://otherorigin.com/fake1.swf' "
665 " type='application/x-shockwave-flash' width='400' height='80'>" 667 " type='application/x-shockwave-flash' width='400' height='80'>"
666 "</object>"); 668 "</object>");
667 669
668 EXPECT_FALSE(PluginLoaded(background_contents, "same_origin")); 670 EXPECT_FALSE(PluginLoaded(background_contents, "same_origin"));
669 EXPECT_FALSE(PluginLoaded(background_contents, "small_cross_origin")); 671 EXPECT_FALSE(PluginLoaded(background_contents, "small_cross_origin"));
670 672
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 IN_PROC_BROWSER_TEST_F(PluginPowerSaverPreferHtmlBrowserTest, 783 IN_PROC_BROWSER_TEST_F(PluginPowerSaverPreferHtmlBrowserTest,
782 ThrottlePluginsOnAllowContentSetting) { 784 ThrottlePluginsOnAllowContentSetting) {
783 HostContentSettingsMap* content_settings_map = 785 HostContentSettingsMap* content_settings_map =
784 HostContentSettingsMapFactory::GetForProfile(browser()->profile()); 786 HostContentSettingsMapFactory::GetForProfile(browser()->profile());
785 787
786 content_settings_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS, 788 content_settings_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS,
787 CONTENT_SETTING_ALLOW); 789 CONTENT_SETTING_ALLOW);
788 LoadPeripheralPlugin(); 790 LoadPeripheralPlugin();
789 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); 791 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin");
790 } 792 }
OLDNEW
« 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