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

Unified Diff: content/test/webkit_support.cc

Issue 317323003: content: No need to initialize ResourceBundle with ui_test.pak. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 months 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 | « content/test/content_test_suite.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/webkit_support.cc
diff --git a/content/test/webkit_support.cc b/content/test/webkit_support.cc
index 0ef980a57ad864e2362416767fca6ef90ea0683c..a3e48edd92ccef80ae475fd56ae83df2d7c19a42 100644
--- a/content/test/webkit_support.cc
+++ b/content/test/webkit_support.cc
@@ -8,7 +8,6 @@
#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
-#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/strings/string_tokenizer.h"
#include "content/public/common/content_switches.h"
@@ -17,9 +16,12 @@
#include "third_party/WebKit/public/web/WebCache.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
-#include "ui/base/resource/resource_bundle.h"
#include "url/url_util.h"
+#if defined(OS_WIN)
+#include "ui/gfx/win/dpi.h"
+#endif
+
#if defined(OS_ANDROID)
#include "base/android/jni_android.h"
#include "net/android/network_library.h"
@@ -61,19 +63,9 @@ class TestEnvironment {
// TestWebKitPlatformSupport must be instantiated after MessageLoopType.
webkit_platform_support_.reset(new TestWebKitPlatformSupport);
-
-#if defined(OS_WIN)
- base::FilePath pak_file;
- PathService::Get(base::DIR_MODULE, &pak_file);
- pak_file = pak_file.AppendASCII("ui_test.pak");
- ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
-#endif
}
~TestEnvironment() {
-#if defined(OS_WIN)
- ui::ResourceBundle::CleanupSharedInstance();
-#endif
}
TestWebKitPlatformSupport* webkit_platform_support() const {
@@ -104,6 +96,10 @@ void SetUpTestEnvironmentForUnitTests() {
mock_cr_app::RegisterMockCrApp();
#endif
+#if defined(OS_WIN)
+ gfx::InitDeviceScaleFactor(1.0f);
+#endif
+
// Explicitly initialize the GURL library before spawning any threads.
// Otherwise crash may happend when different threads try to create a GURL
// at same time.
« no previous file with comments | « content/test/content_test_suite.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698