Chromium Code Reviews| Index: athena/test/athena_unittests.cc |
| diff --git a/ui/keyboard/test/run_all_unittests.cc b/athena/test/athena_unittests.cc |
| similarity index 56% |
| copy from ui/keyboard/test/run_all_unittests.cc |
| copy to athena/test/athena_unittests.cc |
| index 9ecd0c603f12d986cfba8bad33e44430e02f1c54..bdb6b73506e45eeb31d00149e68cf57f918c760d 100644 |
| --- a/ui/keyboard/test/run_all_unittests.cc |
| +++ b/athena/test/athena_unittests.cc |
| @@ -2,50 +2,51 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "base/basictypes.h" |
| #include "base/bind.h" |
| -#include "base/compiler_specific.h" |
| -#include "base/path_service.h" |
| +#include "base/macros.h" |
| #include "base/test/launcher/unit_test_launcher.h" |
| #include "base/test/test_suite.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/base/ui_base_paths.h" |
| +#include "ui/gfx/gfx_paths.h" |
| #include "ui/gl/gl_surface.h" |
| namespace { |
| -class KeyboardTestSuite : public base::TestSuite { |
| +class AthenaTestSuite : public base::TestSuite { |
| public: |
| - KeyboardTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} |
| + AthenaTestSuite(int argc, char** argv) : TestSuite(argc, argv) {} |
| + virtual ~AthenaTestSuite() {} |
| protected: |
| + // base::TestSuite: |
| virtual void Initialize() OVERRIDE { |
| base::TestSuite::Initialize(); |
| gfx::GLSurface::InitializeOneOffForTests(); |
| + gfx::RegisterPathProvider(); |
|
tfarina
2014/09/01 16:47:33
did you need this? if yes, what was the error you
|
| ui::RegisterPathProvider(); |
| - base::FilePath ui_test_pak_path; |
| - ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); |
| - ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); |
| + // 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); |
|
tfarina
2014/05/29 02:17:16
Do you plan to provide your own pak file?
|
| } |
| - |
| virtual void Shutdown() OVERRIDE { |
| ui::ResourceBundle::CleanupSharedInstance(); |
| base::TestSuite::Shutdown(); |
| } |
| private: |
| - DISALLOW_COPY_AND_ASSIGN(KeyboardTestSuite); |
| + DISALLOW_COPY_AND_ASSIGN(AthenaTestSuite); |
| }; |
| } // namespace |
| int main(int argc, char** argv) { |
| - KeyboardTestSuite test_suite(argc, argv); |
| + AthenaTestSuite test_suite(argc, argv); |
| - return base::LaunchUnitTests( |
| + return base::LaunchUnitTestsSerially( |
| argc, |
| argv, |
| - base::Bind(&KeyboardTestSuite::Run, base::Unretained(&test_suite))); |
| + base::Bind(&AthenaTestSuite::Run, base::Unretained(&test_suite))); |
| } |