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

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

Issue 1528653002: Revert of Plugin Power Saver: Improve Poster behavior for essential plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 | « no previous file | chrome/chrome_renderer.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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
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'>"
391 "</object>"); 388 "</object>");
392 VerifyPluginMarkedEssential(GetActiveWebContents(), "plugin"); 389 VerifyPluginMarkedEssential(GetActiveWebContents(), "plugin");
393 VerifyPluginMarkedEssential(GetActiveWebContents(), "plugin_poster");
394 } 390 }
395 391
396 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, SmallCrossOrigin) { 392 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, SmallCrossOrigin) {
397 LoadHTML( 393 LoadHTML(
398 "<object id='plugin' data='http://otherorigin.com/fake.swf' " 394 "<object id='plugin' data='http://otherorigin.com/fake.swf' "
399 " type='application/x-ppapi-tests' width='400' height='100'>" 395 " type='application/x-ppapi-tests' width='400' height='100'>"
400 "</object>" 396 "</object>"
401 "<br>" 397 "<br>"
402 "<object id='plugin_poster' data='http://otherorigin.com/fake.swf' " 398 "<object id='plugin_poster' data='http://otherorigin.com/fake.swf' "
403 " type='application/x-ppapi-tests' width='400' height='100' " 399 " type='application/x-ppapi-tests' width='400' height='100' "
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 630
635 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) { 631 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) {
636 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents()) 632 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents())
637 ->SetZoomLevel(4.0); 633 ->SetZoomLevel(4.0);
638 LoadHTML( 634 LoadHTML(
639 "<object id='plugin' data='http://otherorigin.com/fake.swf' " 635 "<object id='plugin' data='http://otherorigin.com/fake.swf' "
640 " type='application/x-ppapi-tests' width='400' height='200'>" 636 " type='application/x-ppapi-tests' width='400' height='200'>"
641 "</object>"); 637 "</object>");
642 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); 638 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin");
643 } 639 }
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome_renderer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698