summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webkit/tools/test_shell/test_shell_webkit_init.cc6
-rw-r--r--webkit/tools/test_shell/test_shell_webkit_init.h4
2 files changed, 8 insertions, 2 deletions
diff --git a/webkit/tools/test_shell/test_shell_webkit_init.cc b/webkit/tools/test_shell/test_shell_webkit_init.cc
index 1d93416..ba56202 100644
--- a/webkit/tools/test_shell/test_shell_webkit_init.cc
+++ b/webkit/tools/test_shell/test_shell_webkit_init.cc
@@ -72,6 +72,12 @@ TestShellWebKitInit::TestShellWebKitInit(bool layout_test_mode) {
file_utilities_.set_sandbox_enabled(false);
+ // Restrict the supported media types when running in layout test mode.
+ if (layout_test_mode)
+ mime_registry_.reset(new TestShellWebMimeRegistryImpl());
+ else
+ mime_registry_.reset(new webkit_glue::SimpleWebMimeRegistryImpl());
+
#if defined(OS_WIN)
// Ensure we pick up the default theme engine.
SetThemeEngine(NULL);
diff --git a/webkit/tools/test_shell/test_shell_webkit_init.h b/webkit/tools/test_shell/test_shell_webkit_init.h
index 08468c9..7b1f196 100644
--- a/webkit/tools/test_shell/test_shell_webkit_init.h
+++ b/webkit/tools/test_shell/test_shell_webkit_init.h
@@ -35,7 +35,7 @@ class TestShellWebKitInit : public webkit_glue::WebKitClientImpl {
~TestShellWebKitInit();
virtual WebKit::WebMimeRegistry* mimeRegistry() {
- return &mime_registry_;
+ return mime_registry_.get();
}
WebKit::WebClipboard* clipboard();
@@ -158,7 +158,7 @@ class TestShellWebKitInit : public webkit_glue::WebKitClientImpl {
}
private:
- TestShellWebMimeRegistryImpl mime_registry_;
+ scoped_ptr<webkit_glue::SimpleWebMimeRegistryImpl> mime_registry_;
MockWebClipboardImpl mock_clipboard_;
webkit_glue::WebClipboardImpl real_clipboard_;
webkit_glue::WebFileUtilitiesImpl file_utilities_;