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

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

Issue 2940863005: Move loading methods from WebFrame to WebLocalFrame. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.h » ('j') | 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 "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 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 current_entry_indexes_ = current_entry_indexes; 1020 current_entry_indexes_ = current_entry_indexes;
1021 CaptureDump(); 1021 CaptureDump();
1022 } 1022 }
1023 1023
1024 void BlinkTestRunner::OnReset() { 1024 void BlinkTestRunner::OnReset() {
1025 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces()->ResetAll(); 1025 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces()->ResetAll();
1026 Reset(true /* for_new_test */); 1026 Reset(true /* for_new_test */);
1027 // Navigating to about:blank will make sure that no new loads are initiated 1027 // Navigating to about:blank will make sure that no new loads are initiated
1028 // by the renderer. 1028 // by the renderer.
1029 WebURLRequest request = WebURLRequest(GURL(url::kAboutBlankURL)); 1029 WebURLRequest request = WebURLRequest(GURL(url::kAboutBlankURL));
1030 render_view()->GetWebView()->MainFrame()->LoadRequest(request); 1030 if (render_view()->GetWebView()->MainFrame()->IsWebLocalFrame()) {
dcheng 2017/06/16 23:54:13 Hmm... seems racy for OOPIFs then... about:blank c
Łukasz Anforowicz 2017/06/19 22:30:42 I looked closer and it seems that the ShellViewMsg
1031 render_view()->GetWebView()->MainFrame()->ToWebLocalFrame()->LoadRequest(
1032 request);
1033 }
1031 Send(new ShellViewHostMsg_ResetDone(routing_id())); 1034 Send(new ShellViewHostMsg_ResetDone(routing_id()));
1032 } 1035 }
1033 1036
1034 void BlinkTestRunner::OnTestFinishedInSecondaryRenderer() { 1037 void BlinkTestRunner::OnTestFinishedInSecondaryRenderer() {
1035 DCHECK(is_main_window_ && render_view()->GetMainRenderFrame()); 1038 DCHECK(is_main_window_ && render_view()->GetMainRenderFrame());
1036 1039
1037 // Avoid a situation where TestFinished is called twice, because 1040 // Avoid a situation where TestFinished is called twice, because
1038 // of a racey test finish in 2 secondary renderers. 1041 // of a racey test finish in 2 secondary renderers.
1039 test_runner::WebTestInterfaces* interfaces = 1042 test_runner::WebTestInterfaces* interfaces =
1040 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); 1043 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces();
(...skipping 23 matching lines...) Expand all
1064 void BlinkTestRunner::ReportLeakDetectionResult( 1067 void BlinkTestRunner::ReportLeakDetectionResult(
1065 const LeakDetectionResult& report) { 1068 const LeakDetectionResult& report) {
1066 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 1069 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
1067 } 1070 }
1068 1071
1069 void BlinkTestRunner::OnDestruct() { 1072 void BlinkTestRunner::OnDestruct() {
1070 delete this; 1073 delete this;
1071 } 1074 }
1072 1075
1073 } // namespace content 1076 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698