Chromium Code Reviews| 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 "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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |