diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-06 23:41:27 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-06 23:41:27 +0000 |
commit | ea29f15e3f53728ed35a02be5a200e37eb0f3f63 (patch) | |
tree | eb3b2c3275622b797587c539771f20f8717fbadf /chrome/browser | |
parent | 8027e74b77efdfc1a64c7a8744b79eab779853c8 (diff) | |
download | chromium_src-ea29f15e3f53728ed35a02be5a200e37eb0f3f63.zip chromium_src-ea29f15e3f53728ed35a02be5a200e37eb0f3f63.tar.gz chromium_src-ea29f15e3f53728ed35a02be5a200e37eb0f3f63.tar.bz2 |
Fix TabRestoreServiceTest and TranslateManagerTest when using use_webkit_compositor=1
BUG=106157
TEST=browser_tests
Review URL: http://codereview.chromium.org/8790012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113288 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/sessions/tab_restore_service_browsertest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/translate/translate_manager_browsertest.cc | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/chrome/browser/sessions/tab_restore_service_browsertest.cc b/chrome/browser/sessions/tab_restore_service_browsertest.cc index c495361..bc60bb3 100644 --- a/chrome/browser/sessions/tab_restore_service_browsertest.cc +++ b/chrome/browser/sessions/tab_restore_service_browsertest.cc @@ -51,10 +51,10 @@ class TabRestoreServiceTest : public ChromeRenderViewHostTestHarness { protected: // testing::Test overrides virtual void SetUp() { + WebKit::initialize(&webkit_platform_support_); ChromeRenderViewHostTestHarness::SetUp(); time_factory_ = new TabRestoreTimeFactory(); service_.reset(new TabRestoreService(profile(), time_factory_)); - WebKit::initialize(&webkit_platform_support_); } virtual void TearDown() { diff --git a/chrome/browser/translate/translate_manager_browsertest.cc b/chrome/browser/translate/translate_manager_browsertest.cc index 29a2582..6447cf3 100644 --- a/chrome/browser/translate/translate_manager_browsertest.cc +++ b/chrome/browser/translate/translate_manager_browsertest.cc @@ -39,6 +39,11 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" #include "third_party/cld/languages/public/languages.h" +#if defined(USE_WEBKIT_COMPOSITOR) +#include "content/test/render_view_test.h" +#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" +#endif + using content::BrowserThread; using testing::_; using testing::Pointee; @@ -153,6 +158,9 @@ class TranslateManagerTest : public TabContentsWrapperTestHarness, protected: virtual void SetUp() { +#if defined(USE_WEBKIT_COMPOSITOR) + WebKit::initialize(&webkit_platform_support_); +#endif // Access the TranslateManager singleton so it is created before we call // TabContentsWrapperTestHarness::SetUp() to match what's done in Chrome, // where the TranslateManager is created before the TabContents. This @@ -182,6 +190,9 @@ class TranslateManagerTest : public TabContentsWrapperTestHarness, contents_wrapper()->infobar_tab_helper())); TabContentsWrapperTestHarness::TearDown(); +#if defined(USE_WEBKIT_COMPOSITOR) + WebKit::shutdown(); +#endif } void SimulateTranslateScriptURLFetch(bool success) { @@ -239,6 +250,10 @@ class TranslateManagerTest : public TabContentsWrapperTestHarness, content::NotificationRegistrar notification_registrar_; TestURLFetcherFactory url_fetcher_factory_; content::TestBrowserThread ui_thread_; +#if defined(USE_WEBKIT_COMPOSITOR) + content::RenderViewTest::RendererWebKitPlatformSupportImplNoSandbox + webkit_platform_support_; +#endif // The infobars that have been removed. // WARNING: the pointers point to deleted objects, use only for comparison. |