| 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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 #else | 378 #else |
| 379 return true; | 379 return true; |
| 380 #endif | 380 #endif |
| 381 } | 381 } |
| 382 }; | 382 }; |
| 383 | 383 |
| 384 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, SmallSameOrigin) { | 384 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, SmallSameOrigin) { |
| 385 LoadHTML( | 385 LoadHTML( |
| 386 "<object id='plugin' data='fake.swf' " | 386 "<object id='plugin' data='fake.swf' " |
| 387 " type='application/x-ppapi-tests' width='400' height='100'>" | 387 " type='application/x-ppapi-tests' width='400' height='100'>" |
| 388 "</object>" |
| 389 "<object id='plugin_poster' data='fake.swf' poster='click_me.png' " |
| 390 " type='application/x-ppapi-tests' width='400' height='100'>" |
| 388 "</object>"); | 391 "</object>"); |
| 389 VerifyPluginMarkedEssential(GetActiveWebContents(), "plugin"); | 392 VerifyPluginMarkedEssential(GetActiveWebContents(), "plugin"); |
| 393 VerifyPluginMarkedEssential(GetActiveWebContents(), "plugin_poster"); |
| 390 } | 394 } |
| 391 | 395 |
| 392 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, SmallCrossOrigin) { | 396 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, SmallCrossOrigin) { |
| 393 LoadHTML( | 397 LoadHTML( |
| 394 "<object id='plugin' data='http://otherorigin.com/fake.swf' " | 398 "<object id='plugin' data='http://otherorigin.com/fake.swf' " |
| 395 " type='application/x-ppapi-tests' width='400' height='100'>" | 399 " type='application/x-ppapi-tests' width='400' height='100'>" |
| 396 "</object>" | 400 "</object>" |
| 397 "<br>" | 401 "<br>" |
| 398 "<object id='plugin_poster' data='http://otherorigin.com/fake.swf' " | 402 "<object id='plugin_poster' data='http://otherorigin.com/fake.swf' " |
| 399 " type='application/x-ppapi-tests' width='400' height='100' " | 403 " type='application/x-ppapi-tests' width='400' height='100' " |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 630 | 634 |
| 631 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) { | 635 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) { |
| 632 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents()) | 636 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents()) |
| 633 ->SetZoomLevel(4.0); | 637 ->SetZoomLevel(4.0); |
| 634 LoadHTML( | 638 LoadHTML( |
| 635 "<object id='plugin' data='http://otherorigin.com/fake.swf' " | 639 "<object id='plugin' data='http://otherorigin.com/fake.swf' " |
| 636 " type='application/x-ppapi-tests' width='400' height='200'>" | 640 " type='application/x-ppapi-tests' width='400' height='200'>" |
| 637 "</object>"); | 641 "</object>"); |
| 638 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); | 642 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); |
| 639 } | 643 } |
| OLD | NEW |