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/AccessibilityController.h" | 9 #include "content/shell/renderer/test_runner/AccessibilityController.h" |
10 #include "content/shell/renderer/test_runner/EventSender.h" | 10 #include "content/shell/renderer/test_runner/EventSender.h" |
(...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
889 { | 889 { |
890 if (!m_testInterfaces->testRunner()->canOpenWindows()) | 890 if (!m_testInterfaces->testRunner()->canOpenWindows()) |
891 return false; | 891 return false; |
892 if (m_testInterfaces->testRunner()->shouldDumpCreateView()) | 892 if (m_testInterfaces->testRunner()->shouldDumpCreateView()) |
893 m_delegate->printMessage(string("createView(") + URLDescription(request.
url()) + ")\n"); | 893 m_delegate->printMessage(string("createView(") + URLDescription(request.
url()) + ")\n"); |
894 return true; | 894 return true; |
895 } | 895 } |
896 | 896 |
897 WebPlugin* WebTestProxyBase::createPlugin(WebFrame* frame, const WebPluginParams
& params) | 897 WebPlugin* WebTestProxyBase::createPlugin(WebFrame* frame, const WebPluginParams
& params) |
898 { | 898 { |
899 if (params.mimeType == TestPlugin::mimeType()) | 899 if (TestPlugin::isSupportedMimeType(params.mimeType)) |
900 return TestPlugin::create(frame, params, m_delegate); | 900 return TestPlugin::create(frame, params, m_delegate); |
901 return 0; | 901 return 0; |
902 } | 902 } |
903 | 903 |
904 void WebTestProxyBase::setStatusText(const WebString& text) | 904 void WebTestProxyBase::setStatusText(const WebString& text) |
905 { | 905 { |
906 if (!m_testInterfaces->testRunner()->shouldDumpStatusCallbacks()) | 906 if (!m_testInterfaces->testRunner()->shouldDumpStatusCallbacks()) |
907 return; | 907 return; |
908 m_delegate->printMessage(string("UI DELEGATE STATUS CALLBACK: setStatusText:
") + text.utf8().data() + "\n"); | 908 m_delegate->printMessage(string("UI DELEGATE STATUS CALLBACK: setStatusText:
") + text.utf8().data() + "\n"); |
909 } | 909 } |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1347 | 1347 |
1348 void WebTestProxyBase::resetInputMethod() | 1348 void WebTestProxyBase::resetInputMethod() |
1349 { | 1349 { |
1350 // If a composition text exists, then we need to let the browser process | 1350 // If a composition text exists, then we need to let the browser process |
1351 // to cancel the input method's ongoing composition session. | 1351 // to cancel the input method's ongoing composition session. |
1352 if (m_webWidget) | 1352 if (m_webWidget) |
1353 m_webWidget->confirmComposition(); | 1353 m_webWidget->confirmComposition(); |
1354 } | 1354 } |
1355 | 1355 |
1356 } | 1356 } |
OLD | NEW |