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

Unified Diff: chrome/browser/translate/translate_manager_browsertest.cc

Issue 8790012: Fix TabRestoreServiceTest and TranslateManagerTest when using use_webkit_compositor=1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nits Created 9 years 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
« no previous file with comments | « chrome/browser/sessions/tab_restore_service_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/translate_manager_browsertest.cc
diff --git a/chrome/browser/translate/translate_manager_browsertest.cc b/chrome/browser/translate/translate_manager_browsertest.cc
index 29a2582a2fad31bde80a622d6a8b96c975bf3f13..6447cf3e4e3f5a94b85e9d1716d3155878b92f69 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.
« no previous file with comments | « chrome/browser/sessions/tab_restore_service_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698