| 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 <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/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 VerifyPluginMarkedEssential(GetActiveWebContents(), "small_same_origin"); | 404 VerifyPluginMarkedEssential(GetActiveWebContents(), "small_same_origin"); |
| 405 VerifyPluginMarkedEssential(GetActiveWebContents(), | 405 VerifyPluginMarkedEssential(GetActiveWebContents(), |
| 406 "small_same_origin_poster"); | 406 "small_same_origin_poster"); |
| 407 VerifyPluginMarkedEssential(GetActiveWebContents(), "tiny_cross_origin_1"); | 407 VerifyPluginMarkedEssential(GetActiveWebContents(), "tiny_cross_origin_1"); |
| 408 VerifyPluginMarkedEssential(GetActiveWebContents(), "tiny_cross_origin_2"); | 408 VerifyPluginMarkedEssential(GetActiveWebContents(), "tiny_cross_origin_2"); |
| 409 VerifyPluginMarkedEssential(GetActiveWebContents(), "large_cross_origin"); | 409 VerifyPluginMarkedEssential(GetActiveWebContents(), "large_cross_origin"); |
| 410 VerifyPluginMarkedEssential(GetActiveWebContents(), | 410 VerifyPluginMarkedEssential(GetActiveWebContents(), |
| 411 "medium_16_9_cross_origin"); | 411 "medium_16_9_cross_origin"); |
| 412 } | 412 } |
| 413 | 413 |
| 414 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, SmallCrossOrigin) { | 414 // Flaky on WebKit Mac dbg bots: crbug.com/599484. |
| 415 #if defined(OS_MACOSX) |
| 416 #define MAYBE_SmallCrossOrigin DISABLED_SmallCrossOrigin |
| 417 #else |
| 418 #define MAYBE_SmallCrossOrigin SmallCrossOrigin |
| 419 #endif |
| 420 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, MAYBE_SmallCrossOrigin) { |
| 415 LoadHTML( | 421 LoadHTML( |
| 416 "<object id='plugin' data='http://otherorigin.com/fake.swf' " | 422 "<object id='plugin' data='http://otherorigin.com/fake.swf' " |
| 417 " type='application/x-ppapi-tests' width='400' height='100'>" | 423 " type='application/x-ppapi-tests' width='400' height='100'>" |
| 418 "</object>" | 424 "</object>" |
| 419 "<br>" | 425 "<br>" |
| 420 "<object id='plugin_poster' data='http://otherorigin.com/fake.swf' " | 426 "<object id='plugin_poster' data='http://otherorigin.com/fake.swf' " |
| 421 " type='application/x-ppapi-tests' width='400' height='100' " | 427 " type='application/x-ppapi-tests' width='400' height='100' " |
| 422 " poster='click_me.png'>" | 428 " poster='click_me.png'>" |
| 423 "</object>"); | 429 "</object>"); |
| 424 | 430 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 445 | 451 |
| 446 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin_16"); | 452 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin_16"); |
| 447 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin_32"); | 453 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin_32"); |
| 448 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin_16_64"); | 454 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin_16_64"); |
| 449 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin_64_16"); | 455 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin_64_16"); |
| 450 | 456 |
| 451 EXPECT_TRUE( | 457 EXPECT_TRUE( |
| 452 VerifySnapshot(FILE_PATH_LITERAL("smaller_than_play_icon_expected.png"))); | 458 VerifySnapshot(FILE_PATH_LITERAL("smaller_than_play_icon_expected.png"))); |
| 453 } | 459 } |
| 454 | 460 |
| 455 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, PosterTests) { | 461 // Flaky on WebKit Mac dbg bots: crbug.com/599484. |
| 462 #if defined(OS_MACOSX) |
| 463 #define MAYBE_PosterTests DISABLED_PosterTests |
| 464 #else |
| 465 #define MAYBE_PosterTests PosterTests |
| 466 #endif |
| 467 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, MAYBE_PosterTests) { |
| 456 // This test simultaneously verifies the varied supported poster syntaxes, | 468 // This test simultaneously verifies the varied supported poster syntaxes, |
| 457 // as well as verifies that the poster is rendered correctly with various | 469 // as well as verifies that the poster is rendered correctly with various |
| 458 // mismatched aspect ratios and sizes, following the same rules as VIDEO. | 470 // mismatched aspect ratios and sizes, following the same rules as VIDEO. |
| 459 LoadHTML( | 471 LoadHTML( |
| 460 "<object id='plugin_src' type='application/x-ppapi-tests' " | 472 "<object id='plugin_src' type='application/x-ppapi-tests' " |
| 461 " width='100' height='100' poster='click_me.png'></object>" | 473 " width='100' height='100' poster='click_me.png'></object>" |
| 462 "<object id='plugin_srcset' type='application/x-ppapi-tests' " | 474 "<object id='plugin_srcset' type='application/x-ppapi-tests' " |
| 463 " width='100' height='100' " | 475 " width='100' height='100' " |
| 464 " poster='click_me.png 1x, click_me.png 2x'></object>" | 476 " poster='click_me.png 1x, click_me.png 2x'></object>" |
| 465 "<br>" | 477 "<br>" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 | 645 |
| 634 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) { | 646 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) { |
| 635 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents()) | 647 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents()) |
| 636 ->SetZoomLevel(4.0); | 648 ->SetZoomLevel(4.0); |
| 637 LoadHTML( | 649 LoadHTML( |
| 638 "<object id='plugin' data='http://otherorigin.com/fake.swf' " | 650 "<object id='plugin' data='http://otherorigin.com/fake.swf' " |
| 639 " type='application/x-ppapi-tests' width='400' height='200'>" | 651 " type='application/x-ppapi-tests' width='400' height='200'>" |
| 640 "</object>"); | 652 "</object>"); |
| 641 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); | 653 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); |
| 642 } | 654 } |
| OLD | NEW |