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

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 2085153002: Adjust test expectations for infinite-size images. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 years, 6 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 (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 "content/shell/renderer/layout_test/blink_test_runner.h" 5 #include "content/shell/renderer/layout_test/blink_test_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <clocale> 10 #include <clocale>
(...skipping 19 matching lines...) Expand all
30 #include "base/time/time.h" 30 #include "base/time/time.h"
31 #include "base/values.h" 31 #include "base/values.h"
32 #include "build/build_config.h" 32 #include "build/build_config.h"
33 #include "components/plugins/renderer/plugin_placeholder.h" 33 #include "components/plugins/renderer/plugin_placeholder.h"
34 #include "components/test_runner/gamepad_controller.h" 34 #include "components/test_runner/gamepad_controller.h"
35 #include "components/test_runner/layout_and_paint_async_then.h" 35 #include "components/test_runner/layout_and_paint_async_then.h"
36 #include "components/test_runner/pixel_dump.h" 36 #include "components/test_runner/pixel_dump.h"
37 #include "components/test_runner/web_test_interfaces.h" 37 #include "components/test_runner/web_test_interfaces.h"
38 #include "components/test_runner/web_test_proxy.h" 38 #include "components/test_runner/web_test_proxy.h"
39 #include "components/test_runner/web_test_runner.h" 39 #include "components/test_runner/web_test_runner.h"
40 #include "content/common/content_switches_internal.h"
40 #include "content/public/common/content_switches.h" 41 #include "content/public/common/content_switches.h"
41 #include "content/public/common/service_registry.h" 42 #include "content/public/common/service_registry.h"
42 #include "content/public/common/url_constants.h" 43 #include "content/public/common/url_constants.h"
43 #include "content/public/common/web_preferences.h" 44 #include "content/public/common/web_preferences.h"
44 #include "content/public/renderer/media_stream_utils.h" 45 #include "content/public/renderer/media_stream_utils.h"
45 #include "content/public/renderer/render_frame.h" 46 #include "content/public/renderer/render_frame.h"
46 #include "content/public/renderer/render_view.h" 47 #include "content/public/renderer/render_view.h"
47 #include "content/public/renderer/render_view_visitor.h" 48 #include "content/public/renderer/render_view_visitor.h"
48 #include "content/public/renderer/renderer_gamepad_provider.h" 49 #include "content/public/renderer/renderer_gamepad_provider.h"
49 #include "content/public/test/layouttest_support.h" 50 #include "content/public/test/layouttest_support.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 Send(new LayoutTestHostMsg_SimulateWebNotificationClick(routing_id(), title, 495 Send(new LayoutTestHostMsg_SimulateWebNotificationClick(routing_id(), title,
495 action_index)); 496 action_index));
496 } 497 }
497 498
498 void BlinkTestRunner::SimulateWebNotificationClose(const std::string& title, 499 void BlinkTestRunner::SimulateWebNotificationClose(const std::string& title,
499 bool by_user) { 500 bool by_user) {
500 Send(new LayoutTestHostMsg_SimulateWebNotificationClose(routing_id(), title, 501 Send(new LayoutTestHostMsg_SimulateWebNotificationClose(routing_id(), title,
501 by_user)); 502 by_user));
502 } 503 }
503 504
504 void BlinkTestRunner::SetDeviceScaleFactor(float factor) { 505 bool BlinkTestRunner::SetDeviceScaleFactor(float factor) {
505 content::SetDeviceScaleFactor(render_view(), factor); 506 RenderView* rv = render_view();
507 content::SetDeviceScaleFactor(rv, factor);
508 return IsUseZoomForDSFEnabled();
506 } 509 }
507 510
508 void BlinkTestRunner::EnableUseZoomForDSF() { 511 void BlinkTestRunner::EnableUseZoomForDSF() {
509 base::CommandLine::ForCurrentProcess()-> 512 base::CommandLine::ForCurrentProcess()->
510 AppendSwitch(switches::kEnableUseZoomForDSF); 513 AppendSwitch(switches::kEnableUseZoomForDSF);
511 } 514 }
512 515
513 void BlinkTestRunner::SetDeviceColorProfile(const std::string& name) { 516 void BlinkTestRunner::SetDeviceColorProfile(const std::string& name) {
514 content::SetDeviceColorProfile(render_view(), name); 517 content::SetDeviceColorProfile(render_view(), name);
515 } 518 }
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 void BlinkTestRunner::ReportLeakDetectionResult( 1021 void BlinkTestRunner::ReportLeakDetectionResult(
1019 const LeakDetectionResult& report) { 1022 const LeakDetectionResult& report) {
1020 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 1023 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
1021 } 1024 }
1022 1025
1023 void BlinkTestRunner::OnDestruct() { 1026 void BlinkTestRunner::OnDestruct() {
1024 delete this; 1027 delete this;
1025 } 1028 }
1026 1029
1027 } // namespace content 1030 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698