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

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

Issue 2505483003: Plugin Power Saver: Re-enable OriginWhitelisting browser test on ASan. (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 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 " poster='click_me.png'></object>"); 595 " poster='click_me.png'></object>");
596 596
597 VerifyPluginIsPlaceholderOnly("poster_small"); 597 VerifyPluginIsPlaceholderOnly("poster_small");
598 VerifyPluginMarkedEssential(GetActiveWebContents(), 598 VerifyPluginMarkedEssential(GetActiveWebContents(),
599 "poster_whitelisted_origin"); 599 "poster_whitelisted_origin");
600 VerifyPluginMarkedEssential(GetActiveWebContents(), 600 VerifyPluginMarkedEssential(GetActiveWebContents(),
601 "plugin_whitelisted_origin"); 601 "plugin_whitelisted_origin");
602 VerifyPluginMarkedEssential(GetActiveWebContents(), "poster_large"); 602 VerifyPluginMarkedEssential(GetActiveWebContents(), "poster_large");
603 } 603 }
604 604
605 // Flaky on ASAN bots: crbug.com/560765. 605 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, OriginWhitelisting) {
606 #if defined(ADDRESS_SANITIZER)
607 #define MAYBE_OriginWhitelisting DISABLED_OriginWhitelisting
608 #else
609 #define MAYBE_OriginWhitelisting OriginWhitelisting
610 #endif
611 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, MAYBE_OriginWhitelisting) {
612 LoadHTML( 606 LoadHTML(
613 "<object id='plugin_small' data='http://a.com/fake1.swf' " 607 "<object id='plugin_small' data='http://a.com/fake1.swf' "
614 " type='application/x-shockwave-flash' width='100' height='100'>" 608 " type='application/x-shockwave-flash' width='100' height='100'>"
615 "</object>" 609 "</object>"
616 "<object id='plugin_small_poster' data='http://a.com/fake1.swf' " 610 "<object id='plugin_small_poster' data='http://a.com/fake1.swf' "
617 " type='application/x-shockwave-flash' width='100' height='100' " 611 " type='application/x-shockwave-flash' width='100' height='100' "
618 " poster='click_me.png'></object>" 612 " poster='click_me.png'></object>"
619 "<object id='plugin_large' data='http://a.com/fake2.swf' " 613 "<object id='plugin_large' data='http://a.com/fake2.swf' "
620 " type='application/x-shockwave-flash' width='400' height='500'>" 614 " type='application/x-shockwave-flash' width='400' height='500'>"
621 "</object>"); 615 "</object>");
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 IN_PROC_BROWSER_TEST_F(PluginPowerSaverPreferHtmlBrowserTest, 774 IN_PROC_BROWSER_TEST_F(PluginPowerSaverPreferHtmlBrowserTest,
781 ThrottlePluginsOnAllowContentSetting) { 775 ThrottlePluginsOnAllowContentSetting) {
782 HostContentSettingsMap* content_settings_map = 776 HostContentSettingsMap* content_settings_map =
783 HostContentSettingsMapFactory::GetForProfile(browser()->profile()); 777 HostContentSettingsMapFactory::GetForProfile(browser()->profile());
784 778
785 content_settings_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS, 779 content_settings_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS,
786 CONTENT_SETTING_ALLOW); 780 CONTENT_SETTING_ALLOW);
787 LoadPeripheralPlugin(); 781 LoadPeripheralPlugin();
788 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); 782 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin");
789 } 783 }
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