diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/components_tests.gyp | 14 | ||||
-rw-r--r-- | components/update_client.gypi | 12 | ||||
-rw-r--r-- | components/update_client/BUILD.gn | 26 | ||||
-rw-r--r-- | components/update_client/DEPS | 10 | ||||
-rw-r--r-- | components/update_client/component_patcher_unittest.cc (renamed from components/update_client/test/component_patcher_unittest.cc) | 4 | ||||
-rw-r--r-- | components/update_client/component_patcher_unittest.h (renamed from components/update_client/test/component_patcher_unittest.h) | 6 | ||||
-rw-r--r-- | components/update_client/crx_downloader_unittest.cc (renamed from components/update_client/test/crx_downloader_unittest.cc) | 0 | ||||
-rw-r--r-- | components/update_client/ping_manager_unittest.cc (renamed from components/update_client/test/ping_manager_unittest.cc) | 4 | ||||
-rw-r--r-- | components/update_client/request_sender_unittest.cc (renamed from components/update_client/test/request_sender_unittest.cc) | 4 | ||||
-rw-r--r-- | components/update_client/test/DEPS | 5 | ||||
-rw-r--r-- | components/update_client/test_configurator.cc (renamed from components/update_client/test/test_configurator.cc) | 2 | ||||
-rw-r--r-- | components/update_client/test_configurator.h (renamed from components/update_client/test/test_configurator.h) | 6 | ||||
-rw-r--r-- | components/update_client/test_installer.cc (renamed from components/update_client/test/test_installer.cc) | 2 | ||||
-rw-r--r-- | components/update_client/test_installer.h (renamed from components/update_client/test/test_installer.h) | 14 | ||||
-rw-r--r-- | components/update_client/update_checker_unittest.cc (renamed from components/update_client/test/update_checker_unittest.cc) | 4 | ||||
-rw-r--r-- | components/update_client/update_client_unittest.cc (renamed from components/update_client/test/update_client_unittest.cc) | 4 | ||||
-rw-r--r-- | components/update_client/update_response_unittest.cc (renamed from components/update_client/test/update_response_unittest.cc) | 0 | ||||
-rw-r--r-- | components/update_client/url_request_post_interceptor.cc (renamed from components/update_client/test/url_request_post_interceptor.cc) | 4 | ||||
-rw-r--r-- | components/update_client/url_request_post_interceptor.h (renamed from components/update_client/test/url_request_post_interceptor.h) | 6 |
19 files changed, 63 insertions, 64 deletions
diff --git a/components/components_tests.gyp b/components/components_tests.gyp index 9c3ea50..c9191c7 100644 --- a/components/components_tests.gyp +++ b/components/components_tests.gyp @@ -524,14 +524,14 @@ 'ui/zoom/page_zoom_unittests.cc', ], 'update_client_unittest_sources': [ - 'update_client/test/component_patcher_unittest.cc', - 'update_client/test/crx_downloader_unittest.cc', - 'update_client/test/ping_manager_unittest.cc', - 'update_client/test/request_sender_unittest.cc', - 'update_client/test/update_checker_unittest.cc', - 'update_client/test/update_client_unittest.cc', - 'update_client/test/update_response_unittest.cc', + 'update_client/component_patcher_unittest.cc', + 'update_client/crx_downloader_unittest.cc', + 'update_client/ping_manager_unittest.cc', + 'update_client/request_sender_unittest.cc', + 'update_client/update_checker_unittest.cc', + 'update_client/update_client_unittest.cc', 'update_client/update_query_params_unittest.cc', + 'update_client/update_response_unittest.cc', ], 'url_fixer_unittest_sources': [ 'url_fixer/url_fixer_unittest.cc', diff --git a/components/update_client.gypi b/components/update_client.gypi index d4870a8..c5759d0 100644 --- a/components/update_client.gypi +++ b/components/update_client.gypi @@ -83,12 +83,12 @@ '..', ], 'sources': [ - 'update_client/test/test_configurator.cc', - 'update_client/test/test_configurator.h', - 'update_client/test/test_installer.cc', - 'update_client/test/test_installer.h', - 'update_client/test/url_request_post_interceptor.cc', - 'update_client/test/url_request_post_interceptor.h', + 'update_client/test_configurator.cc', + 'update_client/test_configurator.h', + 'update_client/test_installer.cc', + 'update_client/test_installer.h', + 'update_client/url_request_post_interceptor.cc', + 'update_client/url_request_post_interceptor.h', ], }, ], diff --git a/components/update_client/BUILD.gn b/components/update_client/BUILD.gn index 17665721..d4e6125 100644 --- a/components/update_client/BUILD.gn +++ b/components/update_client/BUILD.gn @@ -65,12 +65,12 @@ source_set("update_client") { source_set("test_support") { testonly = true sources = [ - "test/test_configurator.cc", - "test/test_configurator.h", - "test/test_installer.cc", - "test/test_installer.h", - "test/url_request_post_interceptor.cc", - "test/url_request_post_interceptor.h", + "test_configurator.cc", + "test_configurator.h", + "test_installer.cc", + "test_installer.h", + "url_request_post_interceptor.cc", + "url_request_post_interceptor.h", ] deps = [ @@ -86,13 +86,13 @@ source_set("test_support") { source_set("unit_tests") { testonly = true sources = [ - "test/component_patcher_unittest.cc", - "test/crx_downloader_unittest.cc", - "test/ping_manager_unittest.cc", - "test/request_sender_unittest.cc", - "test/update_checker_unittest.cc", - "test/update_client_unittest.cc", - "test/update_response_unittest.cc", + "component_patcher_unittest.cc", + "crx_downloader_unittest.cc", + "ping_manager_unittest.cc", + "request_sender_unittest.cc", + "update_checker_unittest.cc", + "update_client_unittest.cc", + "update_response_unittest.cc", ] deps = [ diff --git a/components/update_client/DEPS b/components/update_client/DEPS index 79e0349..7fa7165 100644 --- a/components/update_client/DEPS +++ b/components/update_client/DEPS @@ -8,5 +8,13 @@ include_rules = [ "+ui/base/win", "+third_party/libxml", "+third_party/zlib", - "+testing", ] + +# Tests can use things in content. +# TODO(sorin): refactor to eliminate the dependency on content by using +# message loops directly. +specific_include_rules = { + ".*unittest\.cc": [ + "+content", + ] +}
\ No newline at end of file diff --git a/components/update_client/test/component_patcher_unittest.cc b/components/update_client/component_patcher_unittest.cc index 4f5e143..c398abc 100644 --- a/components/update_client/test/component_patcher_unittest.cc +++ b/components/update_client/component_patcher_unittest.cc @@ -15,8 +15,8 @@ #include "base/values.h" #include "components/update_client/component_patcher.h" #include "components/update_client/component_patcher_operation.h" -#include "components/update_client/test/component_patcher_unittest.h" -#include "components/update_client/test/test_installer.h" +#include "components/update_client/component_patcher_unittest.h" +#include "components/update_client/test_installer.h" #include "courgette/courgette.h" #include "courgette/third_party/bsdiff.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/update_client/test/component_patcher_unittest.h b/components/update_client/component_patcher_unittest.h index 2fcd5f5..8b3a797 100644 --- a/components/update_client/test/component_patcher_unittest.h +++ b/components/update_client/component_patcher_unittest.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_UPDATE_CLIENT_TEST_COMPONENT_PATCHER_UNITTEST_H_ -#define COMPONENTS_UPDATE_CLIENT_TEST_COMPONENT_PATCHER_UNITTEST_H_ +#ifndef COMPONENTS_UPDATE_CLIENT_COMPONENT_PATCHER_UNITTEST_H_ +#define COMPONENTS_UPDATE_CLIENT_COMPONENT_PATCHER_UNITTEST_H_ #include "base/files/file_path.h" #include "base/files/scoped_temp_dir.h" @@ -39,4 +39,4 @@ class ComponentPatcherOperationTest : public testing::Test { } // namespace update_client -#endif // COMPONENTS_UPDATE_CLIENT_TEST_COMPONENT_PATCHER_UNITTEST_H_ +#endif // COMPONENTS_UPDATE_CLIENT_COMPONENT_PATCHER_UNITTEST_H_ diff --git a/components/update_client/test/crx_downloader_unittest.cc b/components/update_client/crx_downloader_unittest.cc index 4b80f13..4b80f13 100644 --- a/components/update_client/test/crx_downloader_unittest.cc +++ b/components/update_client/crx_downloader_unittest.cc diff --git a/components/update_client/test/ping_manager_unittest.cc b/components/update_client/ping_manager_unittest.cc index 23308ac..cfd37e1 100644 --- a/components/update_client/test/ping_manager_unittest.cc +++ b/components/update_client/ping_manager_unittest.cc @@ -9,8 +9,8 @@ #include "base/version.h" #include "components/update_client/crx_update_item.h" #include "components/update_client/ping_manager.h" -#include "components/update_client/test/test_configurator.h" -#include "components/update_client/test/url_request_post_interceptor.h" +#include "components/update_client/test_configurator.h" +#include "components/update_client/url_request_post_interceptor.h" #include "net/url_request/url_request_test_util.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/update_client/test/request_sender_unittest.cc b/components/update_client/request_sender_unittest.cc index 35d4487..4c8e1db 100644 --- a/components/update_client/test/request_sender_unittest.cc +++ b/components/update_client/request_sender_unittest.cc @@ -9,8 +9,8 @@ #include "base/message_loop/message_loop.h" #include "base/run_loop.h" #include "components/update_client/request_sender.h" -#include "components/update_client/test/test_configurator.h" -#include "components/update_client/test/url_request_post_interceptor.h" +#include "components/update_client/test_configurator.h" +#include "components/update_client/url_request_post_interceptor.h" #include "net/url_request/url_fetcher.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/components/update_client/test/DEPS b/components/update_client/test/DEPS deleted file mode 100644 index d0c36c4..0000000 --- a/components/update_client/test/DEPS +++ /dev/null @@ -1,5 +0,0 @@ -include_rules = [ - "+content", - "+courgette", - "+net", -] diff --git a/components/update_client/test/test_configurator.cc b/components/update_client/test_configurator.cc index 23eaeff..9cd59e4 100644 --- a/components/update_client/test/test_configurator.cc +++ b/components/update_client/test_configurator.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/update_client/test/test_configurator.h" +#include "components/update_client/test_configurator.h" #include "base/run_loop.h" #include "base/version.h" diff --git a/components/update_client/test/test_configurator.h b/components/update_client/test_configurator.h index 6c2ed0e..6e441e7 100644 --- a/components/update_client/test/test_configurator.h +++ b/components/update_client/test_configurator.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_UPDATE_CLIENT_TEST_TEST_CONFIGURATOR_H_ -#define COMPONENTS_UPDATE_CLIENT_TEST_TEST_CONFIGURATOR_H_ +#ifndef COMPONENTS_UPDATE_CLIENT_TEST_CONFIGURATOR_H_ +#define COMPONENTS_UPDATE_CLIENT_TEST_CONFIGURATOR_H_ #include <string> #include <utility> @@ -108,4 +108,4 @@ class TestConfigurator : public Configurator { } // namespace update_client -#endif // COMPONENTS_UPDATE_CLIENT_TEST_TEST_CONFIGURATOR_H_ +#endif // COMPONENTS_UPDATE_CLIENT_TEST_CONFIGURATOR_H_ diff --git a/components/update_client/test/test_installer.cc b/components/update_client/test_installer.cc index 6c03f49..ad6015b 100644 --- a/components/update_client/test/test_installer.cc +++ b/components/update_client/test_installer.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/update_client/test/test_installer.h" +#include "components/update_client/test_installer.h" #include <string> diff --git a/components/update_client/test/test_installer.h b/components/update_client/test_installer.h index e15ae0a..44a6f28 100644 --- a/components/update_client/test/test_installer.h +++ b/components/update_client/test_installer.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_UPDATE_CLIENT_TEST_TEST_INSTALLER_H_ -#define COMPONENTS_UPDATE_CLIENT_TEST_TEST_INSTALLER_H_ +#ifndef COMPONENTS_UPDATE_CLIENT_TEST_INSTALLER_H_ +#define COMPONENTS_UPDATE_CLIENT_TEST_INSTALLER_H_ #include <string> @@ -34,13 +34,9 @@ class TestInstaller : public CrxInstaller { bool Uninstall() override; - int error() const { - return error_; - } + int error() const { return error_; } - int install_count() const { - return install_count_; - } + int install_count() const { return install_count_; } protected: ~TestInstaller() override; @@ -85,4 +81,4 @@ class VersionedTestInstaller : public TestInstaller { } // namespace update_client -#endif // COMPONENTS_UPDATE_CLIENT_TEST_TEST_INSTALLER_H_ +#endif // COMPONENTS_UPDATE_CLIENT_TEST_INSTALLER_H_ diff --git a/components/update_client/test/update_checker_unittest.cc b/components/update_client/update_checker_unittest.cc index ce6922a..01fd5ef 100644 --- a/components/update_client/test/update_checker_unittest.cc +++ b/components/update_client/update_checker_unittest.cc @@ -14,9 +14,9 @@ #include "base/run_loop.h" #include "base/version.h" #include "components/update_client/crx_update_item.h" -#include "components/update_client/test/test_configurator.h" -#include "components/update_client/test/url_request_post_interceptor.h" +#include "components/update_client/test_configurator.h" #include "components/update_client/update_checker.h" +#include "components/update_client/url_request_post_interceptor.h" #include "net/url_request/url_request_test_util.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" diff --git a/components/update_client/test/update_client_unittest.cc b/components/update_client/update_client_unittest.cc index 602fb96..3cc3c4f 100644 --- a/components/update_client/test/update_client_unittest.cc +++ b/components/update_client/update_client_unittest.cc @@ -17,8 +17,8 @@ #include "base/version.h" #include "components/update_client/crx_update_item.h" #include "components/update_client/ping_manager.h" -#include "components/update_client/test/test_configurator.h" -#include "components/update_client/test/test_installer.h" +#include "components/update_client/test_configurator.h" +#include "components/update_client/test_installer.h" #include "components/update_client/update_checker.h" #include "components/update_client/update_client_internal.h" #include "content/public/browser/browser_thread.h" diff --git a/components/update_client/test/update_response_unittest.cc b/components/update_client/update_response_unittest.cc index e106916..e106916 100644 --- a/components/update_client/test/update_response_unittest.cc +++ b/components/update_client/update_response_unittest.cc diff --git a/components/update_client/test/url_request_post_interceptor.cc b/components/update_client/url_request_post_interceptor.cc index 4aeb7a7..caf179a 100644 --- a/components/update_client/test/url_request_post_interceptor.cc +++ b/components/update_client/url_request_post_interceptor.cc @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/update_client/test/url_request_post_interceptor.h" +#include "components/update_client/url_request_post_interceptor.h" #include "base/files/file_util.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "base/strings/stringprintf.h" -#include "components/update_client/test/test_configurator.h" +#include "components/update_client/test_configurator.h" #include "net/base/upload_bytes_element_reader.h" #include "net/base/upload_data_stream.h" #include "net/url_request/url_request.h" diff --git a/components/update_client/test/url_request_post_interceptor.h b/components/update_client/url_request_post_interceptor.h index d261160..15672bc 100644 --- a/components/update_client/test/url_request_post_interceptor.h +++ b/components/update_client/url_request_post_interceptor.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_UPDATE_CLIENT_TEST_URL_REQUEST_POST_INTERCEPTOR_H_ -#define COMPONENTS_UPDATE_CLIENT_TEST_URL_REQUEST_POST_INTERCEPTOR_H_ +#ifndef COMPONENTS_UPDATE_CLIENT_URL_REQUEST_POST_INTERCEPTOR_H_ +#define COMPONENTS_UPDATE_CLIENT_URL_REQUEST_POST_INTERCEPTOR_H_ #include <stdint.h> #include <map> @@ -162,4 +162,4 @@ class PartialMatch : public URLRequestPostInterceptor::RequestMatcher { } // namespace update_client -#endif // COMPONENTS_UPDATE_CLIENT_TEST_URL_REQUEST_POST_INTERCEPTOR_H_ +#endif // COMPONENTS_UPDATE_CLIENT_URL_REQUEST_POST_INTERCEPTOR_H_ |