| 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, | 540 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, |
| 541 PluginMarkedEssentialAfterPosterClicked) { | 541 PluginMarkedEssentialAfterPosterClicked) { |
| 542 LoadHTML( | 542 LoadHTML( |
| 543 "<object id='plugin' type='application/x-ppapi-tests' " | 543 "<object id='plugin' type='application/x-ppapi-tests' " |
| 544 " width='400' height='100' poster='snapshot1x.png'></object>"); | 544 " width='400' height='100' poster='snapshot1x.png'></object>"); |
| 545 VerifyPluginIsPosterOnly("plugin"); | 545 VerifyPluginIsPosterOnly("plugin"); |
| 546 | 546 |
| 547 SimulateClickAndAwaitMarkedEssential("plugin", gfx::Point(50, 50)); | 547 SimulateClickAndAwaitMarkedEssential("plugin", gfx::Point(50, 50)); |
| 548 } | 548 } |
| 549 | 549 |
| 550 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, OriginWhitelisting) { | 550 // Flaky on ASAN bots: crbug.com/560765. |
| 551 #if defined(ADDRESS_SANITIZER) |
| 552 #define MAYBE_OriginWhitelisting DISABLED_OriginWhitelisting |
| 553 #else |
| 554 #define MAYBE_OriginWhitelisting OriginWhitelisting |
| 555 #endif |
| 556 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, MAYBE_OriginWhitelisting) { |
| 551 LoadHTML( | 557 LoadHTML( |
| 552 "<object id='plugin_small' data='http://a.com/fake1.swf' " | 558 "<object id='plugin_small' data='http://a.com/fake1.swf' " |
| 553 " type='application/x-ppapi-tests' width='100' height='100'></object>" | 559 " type='application/x-ppapi-tests' width='100' height='100'></object>" |
| 554 "<object id='plugin_small_poster' data='http://a.com/fake1.swf' " | 560 "<object id='plugin_small_poster' data='http://a.com/fake1.swf' " |
| 555 " type='application/x-ppapi-tests' width='100' height='100' " | 561 " type='application/x-ppapi-tests' width='100' height='100' " |
| 556 " poster='click_me.png'></object>" | 562 " poster='click_me.png'></object>" |
| 557 "<object id='plugin_large' data='http://a.com/fake2.swf' " | 563 "<object id='plugin_large' data='http://a.com/fake2.swf' " |
| 558 " type='application/x-ppapi-tests' width='400' height='500'>" | 564 " type='application/x-ppapi-tests' width='400' height='500'>" |
| 559 "</object>"); | 565 "</object>"); |
| 560 VerifyPluginMarkedEssential(GetActiveWebContents(), "plugin_small"); | 566 VerifyPluginMarkedEssential(GetActiveWebContents(), "plugin_small"); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 | 630 |
| 625 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) { | 631 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) { |
| 626 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents()) | 632 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents()) |
| 627 ->SetZoomLevel(4.0); | 633 ->SetZoomLevel(4.0); |
| 628 LoadHTML( | 634 LoadHTML( |
| 629 "<object id='plugin' data='http://otherorigin.com/fake.swf' " | 635 "<object id='plugin' data='http://otherorigin.com/fake.swf' " |
| 630 " type='application/x-ppapi-tests' width='400' height='200'>" | 636 " type='application/x-ppapi-tests' width='400' height='200'>" |
| 631 "</object>"); | 637 "</object>"); |
| 632 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); | 638 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); |
| 633 } | 639 } |
| OLD | NEW |