Index: webkit/tools/test_shell/test_webview_delegate.cc |
=================================================================== |
--- webkit/tools/test_shell/test_webview_delegate.cc (revision 58881) |
+++ webkit/tools/test_shell/test_webview_delegate.cc (working copy) |
@@ -1051,6 +1051,16 @@ |
GetResourceDescription(identifier).c_str(), |
GetResponseDescription(response).c_str()); |
} |
+ if (shell_->ShouldDumpResourceResponseMIMETypes()) { |
+ GURL url = response.url(); |
+ WebString mimeType = response.mimeType(); |
+ printf("%s has MIME type %s\n", |
+ url.ExtractFileName().c_str(), |
+ // Simulate NSURLResponse's mapping of empty/unknown MIME types to |
+ // application/octet-stream. |
+ mimeType.isEmpty() ? |
+ "application/octet-stream" : mimeType.utf8().data()); |
tony
2010/09/09 18:36:29
Is mimeType.utf8().data() null terminated (looking
|
+ } |
} |
void TestWebViewDelegate::didFinishResourceLoad( |