OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/WebTestProxy.h" | 5 #include "content/shell/renderer/test_runner/WebTestProxy.h" |
6 | 6 |
7 #include <cctype> | 7 #include <cctype> |
8 | 8 |
9 #include "content/shell/renderer/test_runner/EventSender.h" | 9 #include "content/shell/renderer/test_runner/EventSender.h" |
10 #include "content/shell/renderer/test_runner/MockColorChooser.h" | 10 #include "content/shell/renderer/test_runner/MockColorChooser.h" |
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 void WebTestProxyBase::didCloseChooser() | 1012 void WebTestProxyBase::didCloseChooser() |
1013 { | 1013 { |
1014 m_chooserCount--; | 1014 m_chooserCount--; |
1015 } | 1015 } |
1016 | 1016 |
1017 bool WebTestProxyBase::isChooserShown() | 1017 bool WebTestProxyBase::isChooserShown() |
1018 { | 1018 { |
1019 return 0 < m_chooserCount; | 1019 return 0 < m_chooserCount; |
1020 } | 1020 } |
1021 | 1021 |
| 1022 void WebTestProxyBase::loadURLExternally(WebFrame* frame, const WebURLRequest& r
equest, WebNavigationPolicy policy, const WebString& suggested_name) |
| 1023 { |
| 1024 if (m_testInterfaces->testRunner()->shouldWaitUntilExternURLLoad()) { |
| 1025 if (policy == WebNavigationPolicyDownload) { |
| 1026 m_delegate->printMessage(string("Downloading URL with suggested file
name \"") + suggested_name.utf8() + "\"\n"); |
| 1027 } else { |
| 1028 m_delegate->printMessage(string("Loading URL externally - \"") + URL
Description(request.url()) + "\"\n"); |
| 1029 } |
| 1030 m_delegate->testFinished(); |
| 1031 } |
| 1032 } |
| 1033 |
1022 void WebTestProxyBase::didStartProvisionalLoad(WebFrame* frame) | 1034 void WebTestProxyBase::didStartProvisionalLoad(WebFrame* frame) |
1023 { | 1035 { |
1024 if (!m_testInterfaces->testRunner()->topLoadingFrame()) | 1036 if (!m_testInterfaces->testRunner()->topLoadingFrame()) |
1025 m_testInterfaces->testRunner()->setTopLoadingFrame(frame, false); | 1037 m_testInterfaces->testRunner()->setTopLoadingFrame(frame, false); |
1026 | 1038 |
1027 if (m_testInterfaces->testRunner()->shouldDumpFrameLoadCallbacks()) { | 1039 if (m_testInterfaces->testRunner()->shouldDumpFrameLoadCallbacks()) { |
1028 printFrameDescription(m_delegate, frame); | 1040 printFrameDescription(m_delegate, frame); |
1029 m_delegate->printMessage(" - didStartProvisionalLoadForFrame\n"); | 1041 m_delegate->printMessage(" - didStartProvisionalLoadForFrame\n"); |
1030 } | 1042 } |
1031 | 1043 |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1355 | 1367 |
1356 void WebTestProxyBase::resetInputMethod() | 1368 void WebTestProxyBase::resetInputMethod() |
1357 { | 1369 { |
1358 // If a composition text exists, then we need to let the browser process | 1370 // If a composition text exists, then we need to let the browser process |
1359 // to cancel the input method's ongoing composition session. | 1371 // to cancel the input method's ongoing composition session. |
1360 if (m_webWidget) | 1372 if (m_webWidget) |
1361 m_webWidget->confirmComposition(); | 1373 m_webWidget->confirmComposition(); |
1362 } | 1374 } |
1363 | 1375 |
1364 } | 1376 } |
OLD | NEW |