| OLD | NEW |
| 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 public: | 254 public: |
| 255 void SetUp() override { | 255 void SetUp() override { |
| 256 if (PixelTestsEnabled()) | 256 if (PixelTestsEnabled()) |
| 257 EnablePixelOutput(); | 257 EnablePixelOutput(); |
| 258 | 258 |
| 259 InProcessBrowserTest::SetUp(); | 259 InProcessBrowserTest::SetUp(); |
| 260 } | 260 } |
| 261 | 261 |
| 262 void SetUpOnMainThread() override { | 262 void SetUpOnMainThread() override { |
| 263 InProcessBrowserTest::SetUpOnMainThread(); | 263 InProcessBrowserTest::SetUpOnMainThread(); |
| 264 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 264 ASSERT_TRUE(embedded_test_server()->Start()); |
| 265 | 265 |
| 266 embedded_test_server()->ServeFilesFromDirectory( | 266 embedded_test_server()->ServeFilesFromDirectory( |
| 267 ui_test_utils::GetTestFilePath( | 267 ui_test_utils::GetTestFilePath( |
| 268 base::FilePath(FILE_PATH_LITERAL("plugin_power_saver")), | 268 base::FilePath(FILE_PATH_LITERAL("plugin_power_saver")), |
| 269 base::FilePath())); | 269 base::FilePath())); |
| 270 } | 270 } |
| 271 | 271 |
| 272 void SetUpCommandLine(base::CommandLine* command_line) override { | 272 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 273 command_line->AppendSwitch(switches::kEnablePepperTesting); | 273 command_line->AppendSwitch(switches::kEnablePepperTesting); |
| 274 command_line->AppendSwitch(switches::kEnablePluginPlaceholderTesting); | 274 command_line->AppendSwitch(switches::kEnablePluginPlaceholderTesting); |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 | 624 |
| 625 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) { | 625 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) { |
| 626 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents()) | 626 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents()) |
| 627 ->SetZoomLevel(4.0); | 627 ->SetZoomLevel(4.0); |
| 628 LoadHTML( | 628 LoadHTML( |
| 629 "<object id='plugin' data='http://otherorigin.com/fake.swf' " | 629 "<object id='plugin' data='http://otherorigin.com/fake.swf' " |
| 630 " type='application/x-ppapi-tests' width='400' height='200'>" | 630 " type='application/x-ppapi-tests' width='400' height='200'>" |
| 631 "</object>"); | 631 "</object>"); |
| 632 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); | 632 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); |
| 633 } | 633 } |
| OLD | NEW |