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

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

Issue 1417213010: Plugin Power Saver: remove dead flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more GN fixes Created 5 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 | « chrome/browser/about_flags.cc ('k') | chrome/chrome_browser.gypi » ('j') | 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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_piece.h" 9 #include "base/strings/string_piece.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 InProcessBrowserTest::SetUpOnMainThread(); 261 InProcessBrowserTest::SetUpOnMainThread();
262 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 262 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
263 263
264 embedded_test_server()->ServeFilesFromDirectory( 264 embedded_test_server()->ServeFilesFromDirectory(
265 ui_test_utils::GetTestFilePath( 265 ui_test_utils::GetTestFilePath(
266 base::FilePath(FILE_PATH_LITERAL("plugin_power_saver")), 266 base::FilePath(FILE_PATH_LITERAL("plugin_power_saver")),
267 base::FilePath())); 267 base::FilePath()));
268 } 268 }
269 269
270 void SetUpCommandLine(base::CommandLine* command_line) override { 270 void SetUpCommandLine(base::CommandLine* command_line) override {
271 command_line->AppendSwitch(switches::kEnablePluginPowerSaver);
272 command_line->AppendSwitch(switches::kEnablePepperTesting); 271 command_line->AppendSwitch(switches::kEnablePepperTesting);
273 command_line->AppendSwitch(switches::kEnablePluginPlaceholderTesting); 272 command_line->AppendSwitch(switches::kEnablePluginPlaceholderTesting);
274 command_line->AppendSwitchASCII( 273 command_line->AppendSwitchASCII(
275 switches::kOverridePluginPowerSaverForTesting, "ignore-list"); 274 switches::kOverridePluginPowerSaverForTesting, "ignore-list");
276 275
277 ASSERT_TRUE(ppapi::RegisterPowerSaverTestPlugin(command_line)); 276 ASSERT_TRUE(ppapi::RegisterPowerSaverTestPlugin(command_line));
278 } 277 }
279 278
280 protected: 279 protected:
281 void LoadHTML(const std::string& html) { 280 void LoadHTML(const std::string& html) {
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 594
596 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) { 595 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) {
597 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents()) 596 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents())
598 ->SetZoomLevel(4.0); 597 ->SetZoomLevel(4.0);
599 LoadHTML( 598 LoadHTML(
600 "<object id='plugin' data='http://otherorigin.com/fake.swf' " 599 "<object id='plugin' data='http://otherorigin.com/fake.swf' "
601 " type='application/x-ppapi-tests' width='400' height='200'>" 600 " type='application/x-ppapi-tests' width='400' height='200'>"
602 "</object>"); 601 "</object>");
603 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); 602 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin");
604 } 603 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698