OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/test_runner/web_test_proxy.h" | 5 #include "content/shell/renderer/test_runner/web_test_proxy.h" |
6 | 6 |
7 #include <cctype> | 7 #include <cctype> |
8 | 8 |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 | 1019 |
1020 void WebTestProxyBase::DidReceiveServerRedirectForProvisionalLoad( | 1020 void WebTestProxyBase::DidReceiveServerRedirectForProvisionalLoad( |
1021 blink::WebLocalFrame* frame) { | 1021 blink::WebLocalFrame* frame) { |
1022 if (test_interfaces_->GetTestRunner()->shouldDumpFrameLoadCallbacks()) { | 1022 if (test_interfaces_->GetTestRunner()->shouldDumpFrameLoadCallbacks()) { |
1023 PrintFrameDescription(delegate_, frame); | 1023 PrintFrameDescription(delegate_, frame); |
1024 delegate_->PrintMessage( | 1024 delegate_->PrintMessage( |
1025 " - didReceiveServerRedirectForProvisionalLoadForFrame\n"); | 1025 " - didReceiveServerRedirectForProvisionalLoadForFrame\n"); |
1026 } | 1026 } |
1027 } | 1027 } |
1028 | 1028 |
1029 bool WebTestProxyBase::DidFailProvisionalLoad(blink::WebLocalFrame* frame, | 1029 bool WebTestProxyBase::DidFailProvisionalLoad( |
1030 const blink::WebURLError& error) { | 1030 blink::WebLocalFrame* frame, |
| 1031 const blink::WebURLError& error, |
| 1032 blink::WebHistoryCommitType commit_type) { |
1031 if (test_interfaces_->GetTestRunner()->shouldDumpFrameLoadCallbacks()) { | 1033 if (test_interfaces_->GetTestRunner()->shouldDumpFrameLoadCallbacks()) { |
1032 PrintFrameDescription(delegate_, frame); | 1034 PrintFrameDescription(delegate_, frame); |
1033 delegate_->PrintMessage(" - didFailProvisionalLoadWithError\n"); | 1035 delegate_->PrintMessage(" - didFailProvisionalLoadWithError\n"); |
1034 } | 1036 } |
1035 CheckDone(frame, MainResourceLoadFailed); | 1037 CheckDone(frame, MainResourceLoadFailed); |
1036 return !frame->provisionalDataSource(); | 1038 return !frame->provisionalDataSource(); |
1037 } | 1039 } |
1038 | 1040 |
1039 void WebTestProxyBase::DidCommitProvisionalLoad( | 1041 void WebTestProxyBase::DidCommitProvisionalLoad( |
1040 blink::WebLocalFrame* frame, | 1042 blink::WebLocalFrame* frame, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 } | 1087 } |
1086 | 1088 |
1087 void WebTestProxyBase::DidHandleOnloadEvents(blink::WebLocalFrame* frame) { | 1089 void WebTestProxyBase::DidHandleOnloadEvents(blink::WebLocalFrame* frame) { |
1088 if (test_interfaces_->GetTestRunner()->shouldDumpFrameLoadCallbacks()) { | 1090 if (test_interfaces_->GetTestRunner()->shouldDumpFrameLoadCallbacks()) { |
1089 PrintFrameDescription(delegate_, frame); | 1091 PrintFrameDescription(delegate_, frame); |
1090 delegate_->PrintMessage(" - didHandleOnloadEventsForFrame\n"); | 1092 delegate_->PrintMessage(" - didHandleOnloadEventsForFrame\n"); |
1091 } | 1093 } |
1092 } | 1094 } |
1093 | 1095 |
1094 void WebTestProxyBase::DidFailLoad(blink::WebLocalFrame* frame, | 1096 void WebTestProxyBase::DidFailLoad(blink::WebLocalFrame* frame, |
1095 const blink::WebURLError& error) { | 1097 const blink::WebURLError& error, |
| 1098 blink::WebHistoryCommitType commit_type) { |
1096 if (test_interfaces_->GetTestRunner()->shouldDumpFrameLoadCallbacks()) { | 1099 if (test_interfaces_->GetTestRunner()->shouldDumpFrameLoadCallbacks()) { |
1097 PrintFrameDescription(delegate_, frame); | 1100 PrintFrameDescription(delegate_, frame); |
1098 delegate_->PrintMessage(" - didFailLoadWithError\n"); | 1101 delegate_->PrintMessage(" - didFailLoadWithError\n"); |
1099 } | 1102 } |
1100 CheckDone(frame, MainResourceLoadFailed); | 1103 CheckDone(frame, MainResourceLoadFailed); |
1101 } | 1104 } |
1102 | 1105 |
1103 void WebTestProxyBase::DidFinishLoad(blink::WebLocalFrame* frame) { | 1106 void WebTestProxyBase::DidFinishLoad(blink::WebLocalFrame* frame) { |
1104 if (test_interfaces_->GetTestRunner()->shouldDumpFrameLoadCallbacks()) { | 1107 if (test_interfaces_->GetTestRunner()->shouldDumpFrameLoadCallbacks()) { |
1105 PrintFrameDescription(delegate_, frame); | 1108 PrintFrameDescription(delegate_, frame); |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 // to cancel the input method's ongoing composition session. | 1377 // to cancel the input method's ongoing composition session. |
1375 if (web_widget_) | 1378 if (web_widget_) |
1376 web_widget_->confirmComposition(); | 1379 web_widget_->confirmComposition(); |
1377 } | 1380 } |
1378 | 1381 |
1379 blink::WebString WebTestProxyBase::acceptLanguages() { | 1382 blink::WebString WebTestProxyBase::acceptLanguages() { |
1380 return blink::WebString::fromUTF8(accept_languages_); | 1383 return blink::WebString::fromUTF8(accept_languages_); |
1381 } | 1384 } |
1382 | 1385 |
1383 } // namespace content | 1386 } // namespace content |
OLD | NEW |