| 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;
|
|
|