Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / ui / base / test / run_all_unittests.cc
index 8573da0..26885c8 100644 (file)
@@ -10,7 +10,6 @@
 #include "build/build_config.h"
 #include "ui/base/resource/resource_bundle.h"
 #include "ui/base/ui_base_paths.h"
-#include "ui/gfx/gfx_paths.h"
 
 #if defined(OS_ANDROID)
 #include "base/android/jni_android.h"
 #include "base/mac/bundle_locations.h"
 #endif
 
+#if defined(OS_WIN)
+#include "ui/gfx/win/dpi.h"
+#endif
+
 namespace {
 
 class UIBaseTestSuite : public base::TestSuite {
@@ -43,6 +46,10 @@ UIBaseTestSuite::UIBaseTestSuite(int argc, char** argv)
 void UIBaseTestSuite::Initialize() {
   base::TestSuite::Initialize();
 
+#if defined(OS_WIN)
+  gfx::ForceHighDPISupportForTesting(1.0);
+#endif
+
 #if defined(OS_ANDROID)
   // Register JNI bindings for android.
   gfx::android::RegisterJni(base::android::AttachCurrentThread());
@@ -50,7 +57,6 @@ void UIBaseTestSuite::Initialize() {
 #endif
 
   ui::RegisterPathProvider();
-  gfx::RegisterPathProvider();
 
   base::FilePath exe_path;
   PathService::Get(base::DIR_EXE, &exe_path);
@@ -60,12 +66,14 @@ void UIBaseTestSuite::Initialize() {
   // chrome_100_percent.pak at the appropriate places to ui_test.pak.
   base::mac::SetOverrideFrameworkBundlePath(
       exe_path.AppendASCII("ui_unittests Framework.framework"));
-  ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
+  ui::ResourceBundle::InitSharedInstanceWithLocale(
+      "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
 
 #elif defined(OS_IOS) || defined(OS_ANDROID)
   // On iOS, the ui_unittests binary is itself a mini bundle, with resources
   // built in. On Android, ui_unittests_apk provides the necessary framework.
-  ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
+  ui::ResourceBundle::InitSharedInstanceWithLocale(
+      "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
 
 #else
   // On other platforms, the (hardcoded) paths for chrome_100_percent.pak and