| OLD | NEW |
| 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 #include <tuple> | 7 #include <tuple> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 // DoSetUp(), to allow tests to perform command line modifications | 509 // DoSetUp(), to allow tests to perform command line modifications |
| 510 // before RenderViewImplTest::SetUp is run. Each test must invoke | 510 // before RenderViewImplTest::SetUp is run. Each test must invoke |
| 511 // DoSetUp manually once pre-SetUp configuration is complete. | 511 // DoSetUp manually once pre-SetUp configuration is complete. |
| 512 void SetUp() override {} | 512 void SetUp() override {} |
| 513 }; | 513 }; |
| 514 | 514 |
| 515 class RenderViewImplScaleFactorTest : public RenderViewImplBlinkSettingsTest { | 515 class RenderViewImplScaleFactorTest : public RenderViewImplBlinkSettingsTest { |
| 516 protected: | 516 protected: |
| 517 void SetDeviceScaleFactor(float dsf) { | 517 void SetDeviceScaleFactor(float dsf) { |
| 518 ResizeParams params; | 518 ResizeParams params; |
| 519 params.screen_info.deviceScaleFactor = dsf; | 519 params.screen_info.device_scale_factor = dsf; |
| 520 params.new_size = gfx::Size(100, 100); | 520 params.new_size = gfx::Size(100, 100); |
| 521 params.physical_backing_size = gfx::Size(200, 200); | 521 params.physical_backing_size = gfx::Size(200, 200); |
| 522 params.visible_viewport_size = params.new_size; | 522 params.visible_viewport_size = params.new_size; |
| 523 params.needs_resize_ack = false; | 523 params.needs_resize_ack = false; |
| 524 view()->OnResize(params); | 524 view()->OnResize(params); |
| 525 ASSERT_EQ(dsf, view()->device_scale_factor_); | 525 ASSERT_EQ(dsf, view()->device_scale_factor_); |
| 526 } | 526 } |
| 527 | 527 |
| 528 void TestEmulatedSizeDprDsf(int width, int height, float dpr, | 528 void TestEmulatedSizeDprDsf(int width, int height, float dpr, |
| 529 float compositor_dsf) { | 529 float compositor_dsf) { |
| (...skipping 2026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2556 ExpectPauseAndResume(3); | 2556 ExpectPauseAndResume(3); |
| 2557 blink::WebScriptSource source2( | 2557 blink::WebScriptSource source2( |
| 2558 WebString::fromUTF8("function func2() { func1(); }; func2();")); | 2558 WebString::fromUTF8("function func2() { func1(); }; func2();")); |
| 2559 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); | 2559 frame()->GetWebFrame()->executeScriptInIsolatedWorld(17, &source2, 1, 1); |
| 2560 | 2560 |
| 2561 EXPECT_FALSE(IsPaused()); | 2561 EXPECT_FALSE(IsPaused()); |
| 2562 Detach(); | 2562 Detach(); |
| 2563 } | 2563 } |
| 2564 | 2564 |
| 2565 } // namespace content | 2565 } // namespace content |
| OLD | NEW |