diff options
-rw-r--r-- | chrome/browser/sync/notifier/listener/listener_unittest.cc | 10 | ||||
-rw-r--r-- | chrome/browser/sync/syncable/syncable_unittest.cc | 21 | ||||
-rw-r--r-- | chrome/browser/sync/util/event_sys_unittest.cc | 4 | ||||
-rw-r--r-- | chrome/chrome.gyp | 67 | ||||
-rw-r--r-- | chrome/test/sync/engine/test_directory_setter_upper.cc | 2 | ||||
-rw-r--r-- | third_party/libjingle/libjingle.gyp | 10 |
6 files changed, 75 insertions, 39 deletions
diff --git a/chrome/browser/sync/notifier/listener/listener_unittest.cc b/chrome/browser/sync/notifier/listener/listener_unittest.cc deleted file mode 100644 index 26697d6..0000000 --- a/chrome/browser/sync/notifier/listener/listener_unittest.cc +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2009 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 "testing/gtest/include/gtest/gtest.h" - -int main(int argc, char **argv) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/chrome/browser/sync/syncable/syncable_unittest.cc b/chrome/browser/sync/syncable/syncable_unittest.cc index 49424f9..41ad4d5 100644 --- a/chrome/browser/sync/syncable/syncable_unittest.cc +++ b/chrome/browser/sync/syncable/syncable_unittest.cc @@ -1533,24 +1533,3 @@ TEST_F(SyncableDirectoryTest, Bug1509232) { } } // namespace syncable - -#ifdef OS_WIN -class LocalModule : public CAtlExeModuleT<LocalModule> { }; -LocalModule module_; - -int main(int argc, char* argv[]) { - testing::InitGoogleTest(&argc, argv); - - // TODO(chron) Add method to change random seed. - const int32 test_random_seed = time(NULL); - cout << "Random seed: " << test_random_seed << endl; - LOG(INFO) << "Random seed: " << test_random_seed << endl; - srand(test_random_seed); - - // Necessary for NewCallback, scoped to main - base::AtExitManager at_exit_manager; - - int result = RUN_ALL_TESTS(); - return result; -} -#endif diff --git a/chrome/browser/sync/util/event_sys_unittest.cc b/chrome/browser/sync/util/event_sys_unittest.cc index 0e1b112..99ee408 100644 --- a/chrome/browser/sync/util/event_sys_unittest.cc +++ b/chrome/browser/sync/util/event_sys_unittest.cc @@ -152,7 +152,7 @@ class ThreadTester : public EventListener<TestEvent> { } ~ThreadTester() { pair_->event_channel()->RemoveListener(this); - for (int i = 0; i < threads_.size(); i++) { + for (size_t i = 0; i < threads_.size(); i++) { CHECK(pthread_join(threads_[i].thread, NULL) == 0); delete threads_[i].completed; } @@ -229,7 +229,7 @@ class ThreadTester : public EventListener<TestEvent> { sleep(1); #endif - for (int i = 0; i < threads_.size(); i++) { + for (size_t i = 0; i < threads_.size(); i++) { if (*(threads_[i].completed)) LOG(FATAL) << "A test thread exited too early."; } diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 1d8ca1b9..a5a02fe 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -6316,6 +6316,73 @@ }], ], }, + + { + 'target_name': 'sync_unit_tests', + 'type': 'executable', + 'sources': [ + 'browser/sync/engine/all_status_unittest.cc', + 'browser/sync/engine/apply_updates_command_unittest.cc', + 'browser/sync/engine/net/gaia_authenticator_unittest.cc', + 'browser/sync/engine/syncer_proto_util_unittest.cc', + 'browser/sync/engine/syncer_thread_unittest.cc', + 'browser/sync/engine/syncer_unittest.cc', + 'browser/sync/engine/syncproto_unittest.cc', + 'browser/sync/notifier/listener/talk_mediator_unittest.cc', + 'browser/sync/syncable/syncable_id_unittest.cc', + 'browser/sync/syncable/syncable_unittest.cc', + 'browser/sync/util/character_set_converters_unittest.cc', + 'browser/sync/util/crypto_helpers_unittest.cc', + 'browser/sync/util/data_encryption_unittest.cc', + 'browser/sync/util/event_sys_unittest.cc', + 'browser/sync/util/highres_timer_unittest.cc', + 'browser/sync/util/path_helpers_unittest.cc', + 'browser/sync/util/query_helpers_unittest.cc', + 'browser/sync/util/user_settings_unittest.cc', + 'test/sync/engine/mock_gaia_authenticator.cc', + 'test/sync/engine/mock_gaia_authenticator.h', + 'test/sync/engine/mock_gaia_authenticator_unittest.cc', + 'test/sync/engine/mock_server_connection.cc', + 'test/sync/engine/mock_server_connection.h', + 'test/sync/engine/test_directory_setter_upper.cc', + 'test/sync/engine/test_directory_setter_upper.h', + 'test/sync/engine/test_id_factory.h', + ], + 'include_dirs': [ + '..', + '<(protoc_out_dir)', + ], + 'defines' : [ + 'COMPILER_MSVC', + 'COMPILING_SYNCAPI_LIBRARY', + 'SYNC_ENGINE_VERSION_STRING="Unknown"', + '_CRT_SECURE_NO_WARNINGS', + '_USE_32BIT_TIME_T', + ], + 'dependencies': [ + '../testing/gtest.gyp:gtest', + '../third_party/libjingle/libjingle.gyp:libjingle', + '../third_party/protobuf2/protobuf.gyp:protobuf', + '../third_party/tcmalloc/tcmalloc.gyp:tcmalloc', + 'notifier', + 'sync', + 'test_support_unit', + ], + 'conditions': [ + ['OS=="win"', { + 'dependencies': [ + '../third_party/pthreads-win32/pthreads.gyp:pthreads', + ], + 'link_settings': { + 'libraries': [ + '-lcrypt32.lib', + '-lws2_32.lib', + '-lsecur32.lib', + ], + }, + }], + ], + }, { 'target_name': 'sync', 'type': '<(library)', diff --git a/chrome/test/sync/engine/test_directory_setter_upper.cc b/chrome/test/sync/engine/test_directory_setter_upper.cc index 4608ddc..468875a 100644 --- a/chrome/test/sync/engine/test_directory_setter_upper.cc +++ b/chrome/test/sync/engine/test_directory_setter_upper.cc @@ -6,7 +6,7 @@ #include "chrome/browser/sync/syncable/directory_manager.h" #include "chrome/browser/sync/syncable/syncable.h" -#include "chrome/browser/sync/util/compat-file.h" +#include "chrome/browser/sync/util/compat_file.h" #include "chrome/browser/sync/util/event_sys-inl.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/third_party/libjingle/libjingle.gyp b/third_party/libjingle/libjingle.gyp index 80d529f..cbe9e59 100644 --- a/third_party/libjingle/libjingle.gyp +++ b/third_party/libjingle/libjingle.gyp @@ -41,10 +41,11 @@ # 'files/talk/p2p/client/socketmonitor.cc', # unneeded # 'files/talk/p2p/client/socketmonitor.h', # unneeded - #'files/talk/base/Equifax_Secure_Global_eBusiness_CA-1.h', # openssl - #'files/talk/base/basictypes.h', # overridden - #'files/talk/base/openssladapter.cc', # openssl - #'files/talk/base/openssladapter.h', # openssl + # 'files/talk/base/Equifax_Secure_Global_eBusiness_CA-1.h', # openssl + # 'files/talk/base/basictypes.h', # overridden + # 'files/talk/base/natserver_main.cc', # has a main() + # 'files/talk/base/openssladapter.cc', # openssl + # 'files/talk/base/openssladapter.h', # openssl 'files/talk/base/asynchttprequest.cc', 'files/talk/base/asynchttprequest.h', 'files/talk/base/asyncpacketsocket.cc', @@ -95,7 +96,6 @@ 'files/talk/base/messagequeue.h', 'files/talk/base/natserver.cc', 'files/talk/base/natserver.h', - 'files/talk/base/natserver_main.cc', 'files/talk/base/natsocketfactory.cc', 'files/talk/base/natsocketfactory.h', 'files/talk/base/nattypes.cc', |