summaryrefslogtreecommitdiffstats
path: root/athena
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-25 22:05:50 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-25 22:05:50 +0000
commitf5d93c0e87fe96ca9f4fa99ae6d20c03cbcbc768 (patch)
treecd81b20483daf3262cef16bc30d9eb45718f5f9f /athena
parentd38a0110942f0024e1420868324dd69bf32d0108 (diff)
downloadchromium_src-f5d93c0e87fe96ca9f4fa99ae6d20c03cbcbc768.zip
chromium_src-f5d93c0e87fe96ca9f4fa99ae6d20c03cbcbc768.tar.gz
chromium_src-f5d93c0e87fe96ca9f4fa99ae6d20c03cbcbc768.tar.bz2
Make athena_unittests pass if the chrome executable is not built
BUG=None TEST=None Review URL: https://codereview.chromium.org/420663004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285703 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'athena')
-rw-r--r--athena/main/athena_main.gyp2
-rw-r--r--athena/main/athena_shell.cc10
-rw-r--r--athena/test/athena_unittests.cc9
3 files changed, 12 insertions, 9 deletions
diff --git a/athena/main/athena_main.gyp b/athena/main/athena_main.gyp
index 7366e5b..9e8f836 100644
--- a/athena/main/athena_main.gyp
+++ b/athena/main/athena_main.gyp
@@ -62,9 +62,9 @@
'../../ui/aura/aura.gyp:aura',
'../../ui/compositor/compositor.gyp:compositor_test_support',
'../../ui/gfx/gfx.gyp:gfx',
- '../../ui/resources/ui_resources.gyp:ui_test_pak',
'../athena.gyp:athena_lib',
'../athena.gyp:athena_test_support',
+ '../resources/athena_resources.gyp:athena_pak',
],
'sources': [
'athena_shell.cc',
diff --git a/athena/main/athena_shell.cc b/athena/main/athena_shell.cc
index cd017ed..b4dd4a4 100644
--- a/athena/main/athena_shell.cc
+++ b/athena/main/athena_shell.cc
@@ -6,6 +6,7 @@
#include "athena/activity/public/activity_manager.h"
#include "athena/test/athena_test_helper.h"
#include "base/at_exit.h"
+#include "base/base_paths.h"
#include "base/command_line.h"
#include "base/i18n/icu_util.h"
#include "base/message_loop/message_loop.h"
@@ -13,7 +14,6 @@
#include "base/run_loop.h"
#include "ui/aura/window_tree_host.h"
#include "ui/base/resource/resource_bundle.h"
-#include "ui/base/ui_base_paths.h"
#include "ui/compositor/test/context_factories_for_test.h"
#include "ui/gl/gl_surface.h"
@@ -46,14 +46,14 @@ int main(int argc, const char **argv) {
setlocale(LC_ALL, "");
base::AtExitManager exit_manager;
- ui::RegisterPathProvider();
base::CommandLine::Init(argc, argv);
base::i18n::InitializeICU();
gfx::GLSurface::InitializeOneOffForTests();
- base::FilePath ui_test_pak_path;
- DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
- ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
+ base::FilePath test_pak_path;
+ CHECK(PathService::Get(base::DIR_MODULE, &test_pak_path));
+ test_pak_path = test_pak_path.AppendASCII("athena_resources.pak");
+ ui::ResourceBundle::InitSharedInstanceWithPakPath(test_pak_path);
base::MessageLoopForUI message_loop;
UIShell shell(&message_loop);
diff --git a/athena/test/athena_unittests.cc b/athena/test/athena_unittests.cc
index bdb6b73..4c5108b 100644
--- a/athena/test/athena_unittests.cc
+++ b/athena/test/athena_unittests.cc
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/base_paths.h"
#include "base/bind.h"
#include "base/macros.h"
+#include "base/path_service.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -27,9 +29,10 @@ class AthenaTestSuite : public base::TestSuite {
gfx::RegisterPathProvider();
ui::RegisterPathProvider();
- // Force unittests to run using en-US so if we test against string
- // output, it'll pass regardless of the system language.
- ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
+ base::FilePath test_pak_path;
+ ASSERT_TRUE(PathService::Get(base::DIR_MODULE, &test_pak_path));
+ test_pak_path = test_pak_path.AppendASCII("athena_resources.pak");
+ ui::ResourceBundle::InitSharedInstanceWithPakPath(test_pak_path);
}
virtual void Shutdown() OVERRIDE {
ui::ResourceBundle::CleanupSharedInstance();