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

Side by Side Diff: content/renderer/render_view_browsertest.cc

Issue 1729233003: Enable use-zoom-for-dsf by default on chromeos (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « content/common/content_switches_internal.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 2640 matching lines...) Expand 10 before | Expand all | Expand 10 after
2651 2651
2652 TEST_F(RenderViewImplBlinkSettingsTest, Negative) { 2652 TEST_F(RenderViewImplBlinkSettingsTest, Negative) {
2653 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( 2653 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
2654 switches::kBlinkSettings, 2654 switches::kBlinkSettings,
2655 "multiTargetTapNotificationEnabled=false,viewportEnabled=true"); 2655 "multiTargetTapNotificationEnabled=false,viewportEnabled=true");
2656 DoSetUp(); 2656 DoSetUp();
2657 EXPECT_FALSE(settings()->multiTargetTapNotificationEnabled()); 2657 EXPECT_FALSE(settings()->multiTargetTapNotificationEnabled());
2658 EXPECT_TRUE(settings()->viewportEnabled()); 2658 EXPECT_TRUE(settings()->viewportEnabled());
2659 } 2659 }
2660 2660
2661 #if !defined(OS_CHROMEOS)
2662 // UseZoomForDSF is enabled on ChromeOS.
2661 TEST_F(RenderViewImplScaleFactorTest, ConverViewportToWindowWithoutZoomForDSF) { 2663 TEST_F(RenderViewImplScaleFactorTest, ConverViewportToWindowWithoutZoomForDSF) {
2662 DoSetUp(); 2664 DoSetUp();
2663 SetDeviceScaleFactor(2.f); 2665 SetDeviceScaleFactor(2.f);
2664 blink::WebRect rect(20, 10, 200, 100); 2666 blink::WebRect rect(20, 10, 200, 100);
2665 view()->convertViewportToWindow(&rect); 2667 view()->convertViewportToWindow(&rect);
2666 EXPECT_EQ(20, rect.x); 2668 EXPECT_EQ(20, rect.x);
2667 EXPECT_EQ(10, rect.y); 2669 EXPECT_EQ(10, rect.y);
2668 EXPECT_EQ(200, rect.width); 2670 EXPECT_EQ(200, rect.width);
2669 EXPECT_EQ(100, rect.height); 2671 EXPECT_EQ(100, rect.height);
2670 } 2672 }
2673 #endif
2671 2674
2672 TEST_F(RenderViewImplScaleFactorTest, ConverViewportToWindowWithZoomForDSF) { 2675 TEST_F(RenderViewImplScaleFactorTest, ConverViewportToWindowWithZoomForDSF) {
2673 base::CommandLine::ForCurrentProcess()->AppendSwitch( 2676 base::CommandLine::ForCurrentProcess()->AppendSwitch(
2674 switches::kEnableUseZoomForDSF); 2677 switches::kEnableUseZoomForDSF);
2675 DoSetUp(); 2678 DoSetUp();
2676 SetDeviceScaleFactor(1.f); 2679 SetDeviceScaleFactor(1.f);
2677 { 2680 {
2678 blink::WebRect rect(20, 10, 200, 100); 2681 blink::WebRect rect(20, 10, 200, 100);
2679 view()->convertViewportToWindow(&rect); 2682 view()->convertViewportToWindow(&rect);
2680 EXPECT_EQ(20, rect.x); 2683 EXPECT_EQ(20, rect.x);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2793 FROM_HERE, 2796 FROM_HERE,
2794 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this))); 2797 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this)));
2795 ExecuteJavaScriptForTests("debugger;"); 2798 ExecuteJavaScriptForTests("debugger;");
2796 2799
2797 // CloseWhilePaused should resume execution and continue here. 2800 // CloseWhilePaused should resume execution and continue here.
2798 EXPECT_FALSE(IsPaused()); 2801 EXPECT_FALSE(IsPaused());
2799 Detach(); 2802 Detach();
2800 } 2803 }
2801 2804
2802 } // namespace content 2805 } // namespace content
OLDNEW
« no previous file with comments | « content/common/content_switches_internal.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698