Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: webkit/tools/test_shell/test_webview_delegate.cc

Issue 3317016: Implement layoutTestController.dumpResourceResponseMIMETypes in test_shell... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/test_shell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « webkit/tools/test_shell/test_shell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698