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

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

Issue 4705007: Don't restrict supported media types in test_shell when running interactively (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
Index: webkit/tools/test_shell/test_shell_webmimeregistry_impl.cc
===================================================================
--- webkit/tools/test_shell/test_shell_webmimeregistry_impl.cc (revision 65789)
+++ webkit/tools/test_shell/test_shell_webmimeregistry_impl.cc (working copy)
@@ -23,18 +23,28 @@
} // namespace
-TestShellWebMimeRegistryImpl::TestShellWebMimeRegistryImpl() {
- media_map_.insert("video/ogg");
- media_map_.insert("audio/ogg");
- media_map_.insert("application/ogg");
+TestShellWebMimeRegistryImpl::TestShellWebMimeRegistryImpl(
+ bool layout_test_mode) {
+ if (layout_test_mode) {
+ // Restrict the set of supported media types when in layout test mode.
+ media_map_.insert("video/ogg");
+ media_map_.insert("audio/ogg");
+ media_map_.insert("application/ogg");
- codecs_map_.insert("theora");
- codecs_map_.insert("vorbis");
+ codecs_map_.insert("theora");
+ codecs_map_.insert("vorbis");
+ }
}
WebMimeRegistry::SupportsType
TestShellWebMimeRegistryImpl::supportsMediaMIMEType(
const WebString& mime_type, const WebString& codecs) {
+ if (media_map_.empty()) {
+ // Don't restrict the supported media types.
+ return webkit_glue::SimpleWebMimeRegistryImpl::supportsMediaMIMEType(
+ mime_type, codecs);
+ }
+
// Not supporting the container is a flat-out no.
if (!IsSupportedMediaMimeType(ToASCIIOrEmpty(mime_type).c_str()))
return IsNotSupported;

Powered by Google App Engine
This is Rietveld 408576698