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 "base/logging.h" | 9 #include "base/logging.h" |
10 #include "content/shell/renderer/test_runner/event_sender.h" | 10 #include "content/shell/renderer/test_runner/event_sender.h" |
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 GURL url = response.url(); | 1210 GURL url = response.url(); |
1211 WebString mimeType = response.mimeType(); | 1211 WebString mimeType = response.mimeType(); |
1212 m_delegate->printMessage(url.ExtractFileName()); | 1212 m_delegate->printMessage(url.ExtractFileName()); |
1213 m_delegate->printMessage(" has MIME type "); | 1213 m_delegate->printMessage(" has MIME type "); |
1214 // Simulate NSURLResponse's mapping of empty/unknown MIME types to appli
cation/octet-stream | 1214 // Simulate NSURLResponse's mapping of empty/unknown MIME types to appli
cation/octet-stream |
1215 m_delegate->printMessage(mimeType.isEmpty() ? "application/octet-stream"
: mimeType.utf8().data()); | 1215 m_delegate->printMessage(mimeType.isEmpty() ? "application/octet-stream"
: mimeType.utf8().data()); |
1216 m_delegate->printMessage("\n"); | 1216 m_delegate->printMessage("\n"); |
1217 } | 1217 } |
1218 } | 1218 } |
1219 | 1219 |
1220 void WebTestProxyBase::didChangeResourcePriority(WebLocalFrame*, unsigned identi
fier, const blink::WebURLRequest::Priority& priority) | 1220 void WebTestProxyBase::didChangeResourcePriority(WebLocalFrame*, unsigned identi
fier, const blink::WebURLRequest::Priority& priority, int intra_priority_value) |
1221 { | 1221 { |
1222 if (m_testInterfaces->testRunner()->shouldDumpResourcePriorities()) { | 1222 if (m_testInterfaces->testRunner()->shouldDumpResourcePriorities()) { |
1223 if (m_resourceIdentifierMap.find(identifier) == m_resourceIdentifierMap.
end()) | 1223 if (m_resourceIdentifierMap.find(identifier) == m_resourceIdentifierMap.
end()) |
1224 m_delegate->printMessage("<unknown>"); | 1224 m_delegate->printMessage("<unknown>"); |
1225 else | 1225 else |
1226 m_delegate->printMessage(m_resourceIdentifierMap[identifier]); | 1226 m_delegate->printMessage(m_resourceIdentifierMap[identifier]); |
1227 m_delegate->printMessage(" changed priority to "); | 1227 m_delegate->printMessage(" changed priority to "); |
1228 m_delegate->printMessage(PriorityDescription(priority)); | 1228 m_delegate->printMessage(PriorityDescription(priority)); |
| 1229 char buffer[64]; |
| 1230 snprintf(buffer, sizeof(buffer), ", intra_priority %d", intra_priority_v
alue); |
| 1231 m_delegate->printMessage(buffer); |
1229 m_delegate->printMessage("\n"); | 1232 m_delegate->printMessage("\n"); |
1230 } | 1233 } |
1231 } | 1234 } |
1232 | 1235 |
1233 void WebTestProxyBase::didFinishResourceLoad(WebLocalFrame*, unsigned identifier
) | 1236 void WebTestProxyBase::didFinishResourceLoad(WebLocalFrame*, unsigned identifier
) |
1234 { | 1237 { |
1235 if (m_testInterfaces->testRunner()->shouldDumpResourceLoadCallbacks()) { | 1238 if (m_testInterfaces->testRunner()->shouldDumpResourceLoadCallbacks()) { |
1236 if (m_resourceIdentifierMap.find(identifier) == m_resourceIdentifierMap.
end()) | 1239 if (m_resourceIdentifierMap.find(identifier) == m_resourceIdentifierMap.
end()) |
1237 m_delegate->printMessage("<unknown>"); | 1240 m_delegate->printMessage("<unknown>"); |
1238 else | 1241 else |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1350 | 1353 |
1351 void WebTestProxyBase::resetInputMethod() | 1354 void WebTestProxyBase::resetInputMethod() |
1352 { | 1355 { |
1353 // If a composition text exists, then we need to let the browser process | 1356 // If a composition text exists, then we need to let the browser process |
1354 // to cancel the input method's ongoing composition session. | 1357 // to cancel the input method's ongoing composition session. |
1355 if (m_webWidget) | 1358 if (m_webWidget) |
1356 m_webWidget->confirmComposition(); | 1359 m_webWidget->confirmComposition(); |
1357 } | 1360 } |
1358 | 1361 |
1359 } | 1362 } |
OLD | NEW |