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