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

Unified Diff: athena/test/athena_unittests.cc

Issue 301593004: Athena unittests framework (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix deps Created 6 years, 7 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 | « athena/test/athena_test_helper.cc ('k') | athena/wm/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)));
}
« no previous file with comments | « athena/test/athena_test_helper.cc ('k') | athena/wm/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698