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

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

Issue 1896623002: Setting TestRunner's main window from BlinkTestRunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replicate-across-all-renderers
Patch Set: Rebasing... Created 4 years, 8 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 874 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 885
886 test_runner::WebTestInterfaces* interfaces = 886 test_runner::WebTestInterfaces* interfaces =
887 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); 887 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces();
888 interfaces->SetTestIsRunning(true); 888 interfaces->SetTestIsRunning(true);
889 interfaces->ConfigureForTestWithURL(GURL(), false); 889 interfaces->ConfigureForTestWithURL(GURL(), false);
890 ForceResizeRenderView(render_view(), WebSize(800, 600)); 890 ForceResizeRenderView(render_view(), WebSize(800, 600));
891 } 891 }
892 892
893 void BlinkTestRunner::OnReplicateTestConfiguration( 893 void BlinkTestRunner::OnReplicateTestConfiguration(
894 const ShellTestConfiguration& params) { 894 const ShellTestConfiguration& params) {
895 test_config_ = params;
896 is_main_window_ = true;
897
898 test_runner::WebTestInterfaces* interfaces = 895 test_runner::WebTestInterfaces* interfaces =
899 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); 896 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces();
897
898 test_config_ = params;
899
900 is_main_window_ = true;
901 interfaces->SetMainView(render_view()->GetWebView());
902
900 interfaces->SetTestIsRunning(true); 903 interfaces->SetTestIsRunning(true);
901 interfaces->ConfigureForTestWithURL(params.test_url, 904 interfaces->ConfigureForTestWithURL(params.test_url,
902 params.enable_pixel_dumping); 905 params.enable_pixel_dumping);
903 } 906 }
904 907
905 void BlinkTestRunner::OnSetTestConfiguration( 908 void BlinkTestRunner::OnSetTestConfiguration(
906 const ShellTestConfiguration& params) { 909 const ShellTestConfiguration& params) {
907 OnReplicateTestConfiguration(params); 910 OnReplicateTestConfiguration(params);
908 911
909 ForceResizeRenderView( 912 ForceResizeRenderView(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 get_bluetooth_events_callbacks_.pop_front(); 960 get_bluetooth_events_callbacks_.pop_front();
958 callback.Run(events); 961 callback.Run(events);
959 } 962 }
960 963
961 void BlinkTestRunner::ReportLeakDetectionResult( 964 void BlinkTestRunner::ReportLeakDetectionResult(
962 const LeakDetectionResult& report) { 965 const LeakDetectionResult& report) {
963 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 966 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
964 } 967 }
965 968
966 } // namespace content 969 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698