From edd41c5c3443318af2c793458c985c2118d188d8 Mon Sep 17 00:00:00 2001 From: "thestig@chromium.org" Date: Sat, 16 May 2009 08:21:40 +0000 Subject: Add a temporary hack to not resolve the mime type for .pl files to fix a layout test. Remove a NOTIMPLEMENTED that was breaking layout tests. TBR=estade Review URL: http://codereview.chromium.org/113500 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16233 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/platform_mime_util_linux.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'net') diff --git a/net/base/platform_mime_util_linux.cc b/net/base/platform_mime_util_linux.cc index 2afdc47..105048d 100644 --- a/net/base/platform_mime_util_linux.cc +++ b/net/base/platform_mime_util_linux.cc @@ -4,7 +4,6 @@ #include -#include "base/logging.h" #include "base/mime_util.h" #include "net/base/platform_mime_util.h" @@ -12,6 +11,13 @@ namespace net { bool PlatformMimeUtil::GetPlatformMimeTypeFromExtension( const FilePath::StringType& ext, std::string* result) const { + // TODO(thestig) This is a temporary hack until we can fix this + // properly in test shell / webkit. + // We have to play dumb and not return application/x-perl here + // to make the reload-subframe-object layout test happy. + if (ext == "pl") + return false; + FilePath::StringType dummy_path = "foo." + ext; std::string out = mime_util::GetFileMimeType(dummy_path); @@ -43,7 +49,6 @@ bool PlatformMimeUtil::GetPreferredExtensionForMimeType( // (image/gif). We look up the "heaviest" glob for a certain mime type and // then then try to chop off "*.". - NOTIMPLEMENTED(); return false; } -- cgit v1.1