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

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

Issue 2952163002: Remove InProcessBrowserTest::SetUpOnMainThread() calls. (Closed)
Patch Set: rebase Created 3 years, 5 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 unified diff | Download patch
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/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 class PluginPowerSaverBrowserTest : public InProcessBrowserTest { 252 class PluginPowerSaverBrowserTest : public InProcessBrowserTest {
253 public: 253 public:
254 void SetUp() override { 254 void SetUp() override {
255 if (PixelTestsEnabled()) 255 if (PixelTestsEnabled())
256 EnablePixelOutput(); 256 EnablePixelOutput();
257 257
258 InProcessBrowserTest::SetUp(); 258 InProcessBrowserTest::SetUp();
259 } 259 }
260 260
261 void SetUpOnMainThread() override { 261 void SetUpOnMainThread() override {
262 InProcessBrowserTest::SetUpOnMainThread();
263
264 embedded_test_server()->ServeFilesFromDirectory( 262 embedded_test_server()->ServeFilesFromDirectory(
265 ui_test_utils::GetTestFilePath( 263 ui_test_utils::GetTestFilePath(
266 base::FilePath(FILE_PATH_LITERAL("plugin_power_saver")), 264 base::FilePath(FILE_PATH_LITERAL("plugin_power_saver")),
267 base::FilePath())); 265 base::FilePath()));
268 ASSERT_TRUE(embedded_test_server()->Start()); 266 ASSERT_TRUE(embedded_test_server()->Start());
269 } 267 }
270 268
271 void SetUpCommandLine(base::CommandLine* command_line) override { 269 void SetUpCommandLine(base::CommandLine* command_line) override {
272 command_line->AppendSwitch(switches::kEnablePluginPlaceholderTesting); 270 command_line->AppendSwitch(switches::kEnablePluginPlaceholderTesting);
273 ASSERT_TRUE(ppapi::RegisterFlashTestPlugin(command_line)); 271 ASSERT_TRUE(ppapi::RegisterFlashTestPlugin(command_line));
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 IN_PROC_BROWSER_TEST_F(PluginPowerSaverPreferHtmlBrowserTest, 635 IN_PROC_BROWSER_TEST_F(PluginPowerSaverPreferHtmlBrowserTest,
638 ThrottlePluginsOnAllowContentSetting) { 636 ThrottlePluginsOnAllowContentSetting) {
639 HostContentSettingsMap* content_settings_map = 637 HostContentSettingsMap* content_settings_map =
640 HostContentSettingsMapFactory::GetForProfile(browser()->profile()); 638 HostContentSettingsMapFactory::GetForProfile(browser()->profile());
641 639
642 content_settings_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS, 640 content_settings_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PLUGINS,
643 CONTENT_SETTING_ALLOW); 641 CONTENT_SETTING_ALLOW);
644 LoadPeripheralPlugin(); 642 LoadPeripheralPlugin();
645 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); 643 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin");
646 } 644 }
OLDNEW
« no previous file with comments | « chrome/browser/permissions/permissions_browsertest.cc ('k') | chrome/browser/prefetch/prefetch_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698