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

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

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 10 months 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
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 <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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // However, ChromeOS does not support software compositing. 288 // However, ChromeOS does not support software compositing.
289 command_line->AppendSwitch(switches::kDisableGpu); 289 command_line->AppendSwitch(switches::kDisableGpu);
290 #endif 290 #endif
291 } 291 }
292 292
293 protected: 293 protected:
294 void LoadHTML(const std::string& html) { 294 void LoadHTML(const std::string& html) {
295 if (PixelTestsEnabled()) { 295 if (PixelTestsEnabled()) {
296 gfx::Rect bounds(gfx::Rect(0, 0, kBrowserWidth, kBrowserHeight)); 296 gfx::Rect bounds(gfx::Rect(0, 0, kBrowserWidth, kBrowserHeight));
297 gfx::Rect screen_bounds = 297 gfx::Rect screen_bounds =
298 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay().bounds(); 298 gfx::Screen::GetScreen()->GetPrimaryDisplay().bounds();
299 ASSERT_GT(screen_bounds.width(), kBrowserWidth); 299 ASSERT_GT(screen_bounds.width(), kBrowserWidth);
300 ASSERT_GT(screen_bounds.height(), kBrowserHeight); 300 ASSERT_GT(screen_bounds.height(), kBrowserHeight);
301 browser()->window()->SetBounds(bounds); 301 browser()->window()->SetBounds(bounds);
302 } 302 }
303 303
304 ASSERT_TRUE(embedded_test_server()->Started()); 304 ASSERT_TRUE(embedded_test_server()->Started());
305 embedded_test_server()->RegisterRequestHandler( 305 embedded_test_server()->RegisterRequestHandler(
306 base::Bind(&RespondWithHTML, html)); 306 base::Bind(&RespondWithHTML, html));
307 ui_test_utils::NavigateToURL(browser(), embedded_test_server()->base_url()); 307 ui_test_utils::NavigateToURL(browser(), embedded_test_server()->base_url());
308 EXPECT_TRUE(content::WaitForRenderFrameReady( 308 EXPECT_TRUE(content::WaitForRenderFrameReady(
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 637
638 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) { 638 IN_PROC_BROWSER_TEST_F(PluginPowerSaverBrowserTest, ZoomIndependent) {
639 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents()) 639 ui_zoom::ZoomController::FromWebContents(GetActiveWebContents())
640 ->SetZoomLevel(4.0); 640 ->SetZoomLevel(4.0);
641 LoadHTML( 641 LoadHTML(
642 "<object id='plugin' data='http://otherorigin.com/fake.swf' " 642 "<object id='plugin' data='http://otherorigin.com/fake.swf' "
643 " type='application/x-ppapi-tests' width='400' height='200'>" 643 " type='application/x-ppapi-tests' width='400' height='200'>"
644 "</object>"); 644 "</object>");
645 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin"); 645 VerifyPluginIsThrottled(GetActiveWebContents(), "plugin");
646 } 646 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698