diff options
author | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-03 00:41:43 +0000 |
---|---|---|
committer | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-03 00:41:43 +0000 |
commit | 236c3feac542f868d7f2ddc7f62e98f9bc3196c3 (patch) | |
tree | 7e09550da9e4854816d369d564b36bb353ec03df /views | |
parent | 7f05552488f8f9ea5000512fd1972894aee7ee82 (diff) | |
download | chromium_src-236c3feac542f868d7f2ddc7f62e98f9bc3196c3.zip chromium_src-236c3feac542f868d7f2ddc7f62e98f9bc3196c3.tar.gz chromium_src-236c3feac542f868d7f2ddc7f62e98f9bc3196c3.tar.bz2 |
Factoring out views related unit-tests in their own exe.
BUG=None
TEST=Run view_unit_tests should run successfully on Windows and Linux toolkit views.
Review URL: http://codereview.chromium.org/3256008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58439 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/run_all_unittests.cc | 23 | ||||
-rw-r--r-- | views/views.gyp | 67 |
2 files changed, 90 insertions, 0 deletions
diff --git a/views/run_all_unittests.cc b/views/run_all_unittests.cc new file mode 100644 index 0000000..78ae07a --- /dev/null +++ b/views/run_all_unittests.cc @@ -0,0 +1,23 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "app/app_paths.h" +#include "app/resource_bundle.h" +#include "base/test/test_suite.h" + +class ViewTestSuite : public base::TestSuite { + public: + ViewTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {} + + protected: + virtual void Initialize() { + app::RegisterPathProvider(); + base::TestSuite::Initialize(); + ResourceBundle::InitSharedInstance("en-US"); + } +}; + +int main(int argc, char **argv) { + return ViewTestSuite(argc, argv).Run(); +} diff --git a/views/views.gyp b/views/views.gyp index 9e56eef..8c437a6 100644 --- a/views/views.gyp +++ b/views/views.gyp @@ -372,6 +372,73 @@ ], }, { + 'target_name': 'view_unit_tests', + 'type': 'executable', + 'dependencies': [ + '../app/app.gyp:app_resources', + '../app/app.gyp:app_strings', + '../base/base.gyp:base', + '../base/base.gyp:test_support_base', + '../skia/skia.gyp:skia', + '../testing/gmock.gyp:gmock', + '../testing/gtest.gyp:gtest', + '../third_party/icu/icu.gyp:icui18n', + '../third_party/icu/icu.gyp:icuuc', + 'views', + ], + 'include_dirs': [ + '..', + ], + 'sources': [ + 'animation/bounds_animator_unittest.cc', + 'box_layout_unittest.cc', + 'controls/label_unittest.cc', + 'controls/progress_bar_unittest.cc', + 'controls/tabbed_pane/tabbed_pane_unittest.cc', + 'controls/table/table_view_unittest.cc', + 'focus/accelerator_handler_gtk_unittest.cc', + 'focus/focus_manager_unittest.cc', + 'grid_layout_unittest.cc', + 'run_all_unittests.cc', + 'view_unittest.cc', + + '<(SHARED_INTERMEDIATE_DIR)/app/app_resources/app_resources.rc', + ], + 'conditions': [ + ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { + 'dependencies': [ + '../build/linux/system.gyp:gtk', + '../chrome/chrome.gyp:packed_resources', + ], + 'conditions': [ + ['linux_use_tcmalloc==1', { + 'dependencies': [ + '../base/allocator/allocator.gyp:allocator', + ], + }], + ], + }, + ], + ['OS=="win"', { + 'dependencies': [ + # TODO(jcivelli): ideally the resource needed by views would be + # factored out. (for some reason it pulls in a bunch + # unrelated things like v8, sqlite nss...). + '../chrome/app/locales/locales.gyp:en-US', + ], + 'link_settings': { + 'libraries': [ + '-limm32.lib', + '-loleacc.lib', + ] + }, + 'include_dirs': [ + '<(DEPTH)/third_party/wtl/include', + ], + }], + ], + }, + { 'target_name': 'view_examples', 'type': 'executable', 'dependencies': [ |