diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-21 17:55:55 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-21 17:55:55 +0000 |
commit | f0c25f02bcf2690ca6a24e7be72fd7be87c7198c (patch) | |
tree | d3a7d693c468aaac53616381006985b905f22221 /content/shell/webkit_test_helpers.cc | |
parent | 390f837febccbc849abad049f013678ed87cbf66 (diff) | |
download | chromium_src-f0c25f02bcf2690ca6a24e7be72fd7be87c7198c.zip chromium_src-f0c25f02bcf2690ca6a24e7be72fd7be87c7198c.tar.gz chromium_src-f0c25f02bcf2690ca6a24e7be72fd7be87c7198c.tar.bz2 |
[content shell] don't use WebTestRunner::WebPreferences in the browser process
Instead, I've added a function that applies the differing defaults, and we
only override the entire WebPreferences when a renderer asks us to.
BUG=111316
TEST=running layout tests in single process mode shouldn't crash immediately
Review URL: https://chromiumcodereview.appspot.com/11666008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174410 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/webkit_test_helpers.cc')
-rw-r--r-- | content/shell/webkit_test_helpers.cc | 45 |
1 files changed, 16 insertions, 29 deletions
diff --git a/content/shell/webkit_test_helpers.cc b/content/shell/webkit_test_helpers.cc index 00fc233..0ca1d17 100644 --- a/content/shell/webkit_test_helpers.cc +++ b/content/shell/webkit_test_helpers.cc @@ -44,35 +44,22 @@ void ExportLayoutTestSpecificPreferences(const WebPreferences& from, to->should_respect_image_orientation = from.shouldRespectImageOrientation; } -void CopyLayoutTestSpecificPreferences(const webkit_glue::WebPreferences& from, - webkit_glue::WebPreferences* to) { - to->allow_universal_access_from_file_urls = - from.allow_universal_access_from_file_urls; - to->dom_paste_enabled = from.dom_paste_enabled; - to->javascript_can_access_clipboard = from.javascript_can_access_clipboard; - to->xss_auditor_enabled = from.xss_auditor_enabled; - to->editing_behavior = from.editing_behavior; - to->default_font_size = from.default_font_size; - to->minimum_font_size = from.minimum_font_size; - to->default_encoding = from.default_encoding; - to->javascript_enabled = from.javascript_enabled; - to->supports_multiple_windows = from.supports_multiple_windows; - to->loads_images_automatically = from.loads_images_automatically; - to->plugins_enabled = from.plugins_enabled; - to->java_enabled = from.java_enabled; - to->uses_page_cache = from.uses_page_cache; - to->page_cache_supports_plugins = from.page_cache_supports_plugins; - to->application_cache_enabled = from.application_cache_enabled; - to->tabs_to_links = from.tabs_to_links; - to->experimental_webgl_enabled = from.experimental_webgl_enabled; - to->css_grid_layout_enabled = from.css_grid_layout_enabled; - to->hyperlink_auditing_enabled = from.hyperlink_auditing_enabled; - to->caret_browsing_enabled = from.caret_browsing_enabled; - to->allow_displaying_insecure_content = - from.allow_displaying_insecure_content; - to->allow_running_insecure_content = from.allow_running_insecure_content; - to->css_shaders_enabled = from.css_shaders_enabled; - to->should_respect_image_orientation = from.should_respect_image_orientation; +void ApplyLayoutTestDefaultPreferences(webkit_glue::WebPreferences* prefs) { + prefs->allow_universal_access_from_file_urls = true; + prefs->dom_paste_enabled = true; + prefs->javascript_can_access_clipboard = true; + prefs->xss_auditor_enabled = false; +#if defined(OS_MACOSX) + prefs->editing_behavior = webkit_glue::WebPreferences::EDITING_BEHAVIOR_MAC; +#else + prefs->editing_behavior = webkit_glue::WebPreferences::EDITING_BEHAVIOR_WIN; +#endif + prefs->java_enabled = false; + prefs->application_cache_enabled = true; + prefs->tabs_to_links = false; + prefs->hyperlink_auditing_enabled = false; + prefs->allow_displaying_insecure_content = true; + prefs->allow_running_insecure_content = true; } } // namespace content |