| 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 "components/test_runner/web_test_proxy.h" | 5 #include "components/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 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 if (test_interfaces_->GetTestRunner()->shouldDumpIconChanges()) { | 1081 if (test_interfaces_->GetTestRunner()->shouldDumpIconChanges()) { |
| 1082 PrintFrameDescription(delegate_, frame); | 1082 PrintFrameDescription(delegate_, frame); |
| 1083 delegate_->PrintMessage(std::string(" - didChangeIcons\n")); | 1083 delegate_->PrintMessage(std::string(" - didChangeIcons\n")); |
| 1084 } | 1084 } |
| 1085 } | 1085 } |
| 1086 | 1086 |
| 1087 void WebTestProxyBase::DidFinishDocumentLoad(blink::WebLocalFrame* frame) { | 1087 void WebTestProxyBase::DidFinishDocumentLoad(blink::WebLocalFrame* frame) { |
| 1088 if (test_interfaces_->GetTestRunner()->shouldDumpFrameLoadCallbacks()) { | 1088 if (test_interfaces_->GetTestRunner()->shouldDumpFrameLoadCallbacks()) { |
| 1089 PrintFrameDescription(delegate_, frame); | 1089 PrintFrameDescription(delegate_, frame); |
| 1090 delegate_->PrintMessage(" - didFinishDocumentLoadForFrame\n"); | 1090 delegate_->PrintMessage(" - didFinishDocumentLoadForFrame\n"); |
| 1091 } else { | |
| 1092 unsigned pendingUnloadEvents = frame->unloadListenerCount(); | |
| 1093 if (pendingUnloadEvents) { | |
| 1094 PrintFrameDescription(delegate_, frame); | |
| 1095 delegate_->PrintMessage(base::StringPrintf( | |
| 1096 " - has %u onunload handler(s)\n", pendingUnloadEvents)); | |
| 1097 } | |
| 1098 } | 1091 } |
| 1099 } | 1092 } |
| 1100 | 1093 |
| 1101 void WebTestProxyBase::DidHandleOnloadEvents(blink::WebLocalFrame* frame) { | 1094 void WebTestProxyBase::DidHandleOnloadEvents(blink::WebLocalFrame* frame) { |
| 1102 if (test_interfaces_->GetTestRunner()->shouldDumpFrameLoadCallbacks()) { | 1095 if (test_interfaces_->GetTestRunner()->shouldDumpFrameLoadCallbacks()) { |
| 1103 PrintFrameDescription(delegate_, frame); | 1096 PrintFrameDescription(delegate_, frame); |
| 1104 delegate_->PrintMessage(" - didHandleOnloadEventsForFrame\n"); | 1097 delegate_->PrintMessage(" - didHandleOnloadEventsForFrame\n"); |
| 1105 } | 1098 } |
| 1106 } | 1099 } |
| 1107 | 1100 |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1394 // to cancel the input method's ongoing composition session. | 1387 // to cancel the input method's ongoing composition session. |
| 1395 if (web_widget_) | 1388 if (web_widget_) |
| 1396 web_widget_->confirmComposition(); | 1389 web_widget_->confirmComposition(); |
| 1397 } | 1390 } |
| 1398 | 1391 |
| 1399 blink::WebString WebTestProxyBase::acceptLanguages() { | 1392 blink::WebString WebTestProxyBase::acceptLanguages() { |
| 1400 return blink::WebString::fromUTF8(accept_languages_); | 1393 return blink::WebString::fromUTF8(accept_languages_); |
| 1401 } | 1394 } |
| 1402 | 1395 |
| 1403 } // namespace content | 1396 } // namespace content |
| OLD | NEW |