Commit 0896904a authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

[iOS] Move block swizzler from ios/chrome to ios/testing

This is needed to be able to use this file from ios/web.

Bug: 901082
Change-Id: I893360bab6226212780ebf7d4eb186737936db92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1911742
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Auto-Submit: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714491}
parent 28beda6b
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
"app": "net_unittests" "app": "net_unittests"
}, },
{ {
"app": "ocmock_support_unittests" "app": "ios_testing_unittests"
}, },
{ {
"app": "services_unittests" "app": "services_unittests"
......
...@@ -61,11 +61,11 @@ source_set("unit_tests") { ...@@ -61,11 +61,11 @@ source_set("unit_tests") {
"//ios/chrome/browser/tabs", "//ios/chrome/browser/tabs",
"//ios/chrome/common/app_group", "//ios/chrome/common/app_group",
"//ios/chrome/test:test_support", "//ios/chrome/test:test_support",
"//ios/chrome/test/base",
"//ios/public/provider/chrome/browser:browser", "//ios/public/provider/chrome/browser:browser",
"//ios/public/provider/chrome/browser:test_support", "//ios/public/provider/chrome/browser:test_support",
"//ios/public/provider/chrome/browser/distribution", "//ios/public/provider/chrome/browser/distribution",
"//ios/public/provider/chrome/browser/distribution:test_support", "//ios/public/provider/chrome/browser/distribution:test_support",
"//ios/testing:block_swizzler",
"//ios/web/public/test:test", "//ios/web/public/test:test",
"//testing/gtest", "//testing/gtest",
"//third_party/ocmock", "//third_party/ocmock",
......
...@@ -63,11 +63,11 @@ source_set("unit_tests") { ...@@ -63,11 +63,11 @@ source_set("unit_tests") {
"//ios/chrome/browser/web_state_list", "//ios/chrome/browser/web_state_list",
"//ios/chrome/browser/web_state_list:test_support", "//ios/chrome/browser/web_state_list:test_support",
"//ios/chrome/test:test_support", "//ios/chrome/test:test_support",
"//ios/chrome/test/base",
"//ios/chrome/test/ocmock", "//ios/chrome/test/ocmock",
"//ios/public/provider/chrome/browser:test_support", "//ios/public/provider/chrome/browser:test_support",
"//ios/public/provider/chrome/browser/distribution", "//ios/public/provider/chrome/browser/distribution",
"//ios/public/provider/chrome/browser/user_feedback:test_support", "//ios/public/provider/chrome/browser/user_feedback:test_support",
"//ios/testing:block_swizzler",
"//ios/testing:ocmock_support", "//ios/testing:ocmock_support",
"//ios/web", "//ios/web",
"//ios/web/public/test", "//ios/web/public/test",
......
...@@ -42,13 +42,13 @@ ...@@ -42,13 +42,13 @@
#import "ios/chrome/browser/ui/main/test/stub_browser_interface_provider.h" #import "ios/chrome/browser/ui/main/test/stub_browser_interface_provider.h"
#import "ios/chrome/browser/ui/safe_mode/safe_mode_coordinator.h" #import "ios/chrome/browser/ui/safe_mode/safe_mode_coordinator.h"
#import "ios/chrome/browser/ui/settings/settings_navigation_controller.h" #import "ios/chrome/browser/ui/settings/settings_navigation_controller.h"
#import "ios/chrome/test/base/scoped_block_swizzler.h"
#include "ios/chrome/test/block_cleanup_test.h" #include "ios/chrome/test/block_cleanup_test.h"
#include "ios/chrome/test/ios_chrome_scoped_testing_chrome_browser_provider.h" #include "ios/chrome/test/ios_chrome_scoped_testing_chrome_browser_provider.h"
#include "ios/public/provider/chrome/browser/distribution/app_distribution_provider.h" #include "ios/public/provider/chrome/browser/distribution/app_distribution_provider.h"
#include "ios/public/provider/chrome/browser/test_chrome_browser_provider.h" #include "ios/public/provider/chrome/browser/test_chrome_browser_provider.h"
#include "ios/public/provider/chrome/browser/user_feedback/test_user_feedback_provider.h" #include "ios/public/provider/chrome/browser/user_feedback/test_user_feedback_provider.h"
#import "ios/testing/ocmock_complex_type_helper.h" #import "ios/testing/ocmock_complex_type_helper.h"
#import "ios/testing/scoped_block_swizzler.h"
#include "ios/web/public/test/web_task_environment.h" #include "ios/web/public/test/web_task_environment.h"
#include "ios/web/public/thread/web_task_traits.h" #include "ios/web/public/thread/web_task_traits.h"
#import "third_party/ocmock/OCMock/OCMock.h" #import "third_party/ocmock/OCMock/OCMock.h"
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
#import "ios/chrome/browser/ui/main/test/stub_browser_interface_provider.h" #import "ios/chrome/browser/ui/main/test/stub_browser_interface_provider.h"
#import "ios/chrome/browser/web_state_list/fake_web_state_list_delegate.h" #import "ios/chrome/browser/web_state_list/fake_web_state_list_delegate.h"
#import "ios/chrome/browser/web_state_list/web_state_list.h" #import "ios/chrome/browser/web_state_list/web_state_list.h"
#import "ios/chrome/test/base/scoped_block_swizzler.h"
#import "ios/chrome/test/ocmock/OCMockObject+BreakpadControllerTesting.h" #import "ios/chrome/test/ocmock/OCMockObject+BreakpadControllerTesting.h"
#import "ios/testing/scoped_block_swizzler.h"
#include "net/base/network_change_notifier.h" #include "net/base/network_change_notifier.h"
#include "testing/platform_test.h" #include "testing/platform_test.h"
#import "third_party/breakpad/breakpad/src/client/ios/BreakpadController.h" #import "third_party/breakpad/breakpad/src/client/ios/BreakpadController.h"
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#import "ios/chrome/browser/ui/main/test/stub_browser_interface_provider.h" #import "ios/chrome/browser/ui/main/test/stub_browser_interface_provider.h"
#import "ios/chrome/browser/url_loading/url_loading_params.h" #import "ios/chrome/browser/url_loading/url_loading_params.h"
#import "ios/chrome/browser/web_state_list/web_state_list.h" #import "ios/chrome/browser/web_state_list/web_state_list.h"
#import "ios/chrome/test/base/scoped_block_swizzler.h" #import "ios/testing/scoped_block_swizzler.h"
#include "ios/web/public/test/web_task_environment.h" #include "ios/web/public/test/web_task_environment.h"
#include "testing/gtest_mac.h" #include "testing/gtest_mac.h"
#include "testing/platform_test.h" #include "testing/platform_test.h"
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#import "ios/chrome/browser/web_state_list/fake_web_state_list_delegate.h" #import "ios/chrome/browser/web_state_list/fake_web_state_list_delegate.h"
#import "ios/chrome/browser/web_state_list/web_state_list.h" #import "ios/chrome/browser/web_state_list/web_state_list.h"
#import "ios/chrome/browser/web_state_list/web_state_opener.h" #import "ios/chrome/browser/web_state_list/web_state_opener.h"
#import "ios/chrome/test/base/scoped_block_swizzler.h" #import "ios/testing/scoped_block_swizzler.h"
#import "ios/web/public/test/fakes/test_web_state.h" #import "ios/web/public/test/fakes/test_web_state.h"
#import "net/base/mac/url_conversions.h" #import "net/base/mac/url_conversions.h"
#include "net/test/gtest_util.h" #include "net/test/gtest_util.h"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#import "ios/chrome/app/application_delegate/url_opener.h" #import "ios/chrome/app/application_delegate/url_opener.h"
#include "ios/chrome/app/main_controller_private.h" #include "ios/chrome/app/main_controller_private.h"
#import "ios/chrome/browser/tabs/tab_model.h" #import "ios/chrome/browser/tabs/tab_model.h"
#import "ios/chrome/test/base/scoped_block_swizzler.h" #import "ios/testing/scoped_block_swizzler.h"
#include "testing/platform_test.h" #include "testing/platform_test.h"
#import "third_party/ocmock/OCMock/OCMock.h" #import "third_party/ocmock/OCMock/OCMock.h"
......
...@@ -176,7 +176,7 @@ source_set("unit_tests") { ...@@ -176,7 +176,7 @@ source_set("unit_tests") {
"//ios/chrome/browser/web:test_support", "//ios/chrome/browser/web:test_support",
"//ios/chrome/browser/web:web_internal", "//ios/chrome/browser/web:web_internal",
"//ios/chrome/browser/webdata_services", "//ios/chrome/browser/webdata_services",
"//ios/chrome/test/base", "//ios/testing:block_swizzler",
"//ios/web/public/deprecated", "//ios/web/public/deprecated",
"//ios/web/public/js_messaging", "//ios/web/public/js_messaging",
"//ios/web/public/test", "//ios/web/public/test",
......
...@@ -88,8 +88,8 @@ source_set("unit_tests") { ...@@ -88,8 +88,8 @@ source_set("unit_tests") {
"//ios/chrome/browser/browser_state", "//ios/chrome/browser/browser_state",
"//ios/chrome/browser/browser_state:test_support", "//ios/chrome/browser/browser_state:test_support",
"//ios/chrome/browser/sessions:serialisation", "//ios/chrome/browser/sessions:serialisation",
"//ios/chrome/test/base",
"//ios/chrome/test/ocmock", "//ios/chrome/test/ocmock",
"//ios/testing:block_swizzler",
"//ios/web/public/test", "//ios/web/public/test",
"//testing/gmock", "//testing/gmock",
"//testing/gtest", "//testing/gtest",
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
#import "ios/chrome/browser/crash_report/breakpad_helper.h" #import "ios/chrome/browser/crash_report/breakpad_helper.h"
#import "base/test/ios/wait_util.h" #import "base/test/ios/wait_util.h"
#include "ios/chrome/browser/crash_report/main_thread_freeze_detector.h" #include "ios/chrome/browser/crash_report/main_thread_freeze_detector.h"
#import "ios/chrome/test/base/scoped_block_swizzler.h"
#import "ios/chrome/test/ocmock/OCMockObject+BreakpadControllerTesting.h" #import "ios/chrome/test/ocmock/OCMockObject+BreakpadControllerTesting.h"
#import "ios/testing/scoped_block_swizzler.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h" #include "testing/platform_test.h"
#import "third_party/breakpad/breakpad/src/client/ios/BreakpadController.h" #import "third_party/breakpad/breakpad/src/client/ios/BreakpadController.h"
......
...@@ -51,7 +51,7 @@ source_set("unit_tests") { ...@@ -51,7 +51,7 @@ source_set("unit_tests") {
"//base", "//base",
"//ios/chrome/browser/ui/collection_view/cells", "//ios/chrome/browser/ui/collection_view/cells",
"//ios/chrome/test:test_support", "//ios/chrome/test:test_support",
"//ios/chrome/test/base", "//ios/testing:block_swizzler",
"//ios/third_party/material_components_ios", "//ios/third_party/material_components_ios",
"//testing/gtest", "//testing/gtest",
] ]
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
#import "ios/chrome/browser/ui/collection_view/collection_view_model.h" #import "ios/chrome/browser/ui/collection_view/collection_view_model.h"
#import "ios/chrome/test/base/scoped_block_swizzler.h"
#include "ios/chrome/test/block_cleanup_test.h" #include "ios/chrome/test/block_cleanup_test.h"
#import "ios/testing/scoped_block_swizzler.h"
#import "ios/third_party/material_components_ios/src/components/CollectionCells/src/MaterialCollectionCells.h" #import "ios/third_party/material_components_ios/src/components/CollectionCells/src/MaterialCollectionCells.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
......
...@@ -226,8 +226,8 @@ source_set("unit_tests") { ...@@ -226,8 +226,8 @@ source_set("unit_tests") {
"//ios/chrome/browser/url_loading", "//ios/chrome/browser/url_loading",
"//ios/chrome/browser/web_state_list", "//ios/chrome/browser/web_state_list",
"//ios/chrome/browser/web_state_list:test_support", "//ios/chrome/browser/web_state_list:test_support",
"//ios/chrome/test/base",
"//ios/public/provider/chrome/browser/ui", "//ios/public/provider/chrome/browser/ui",
"//ios/testing:block_swizzler",
"//ios/web/public/test", "//ios/web/public/test",
"//ios/web/public/test/fakes", "//ios/web/public/test/fakes",
"//testing/gtest", "//testing/gtest",
...@@ -259,7 +259,6 @@ source_set("eg2_tests") { ...@@ -259,7 +259,6 @@ source_set("eg2_tests") {
"//ios/chrome/app/strings", "//ios/chrome/app/strings",
"//ios/chrome/browser/ui/toolbar/public:constants", "//ios/chrome/browser/ui/toolbar/public:constants",
"//ios/chrome/test:eg_test_support+eg2", "//ios/chrome/test:eg_test_support+eg2",
"//ios/chrome/test/base",
"//ios/chrome/test/earl_grey:eg_test_support+eg2", "//ios/chrome/test/earl_grey:eg_test_support+eg2",
"//ios/testing/earl_grey:eg_test_support+eg2", "//ios/testing/earl_grey:eg_test_support+eg2",
"//ios/third_party/earl_grey2:test_lib", "//ios/third_party/earl_grey2:test_lib",
...@@ -306,7 +305,6 @@ source_set("eg_tests") { ...@@ -306,7 +305,6 @@ source_set("eg_tests") {
"//ios/chrome/test:eg_test_support", "//ios/chrome/test:eg_test_support",
"//ios/chrome/test:test_support", "//ios/chrome/test:test_support",
"//ios/chrome/test/app:test_support", "//ios/chrome/test/app:test_support",
"//ios/chrome/test/base:base",
"//ios/chrome/test/earl_grey:test_support", "//ios/chrome/test/earl_grey:test_support",
"//ios/testing/earl_grey:earl_grey_support", "//ios/testing/earl_grey:earl_grey_support",
"//ios/third_party/earl_grey:earl_grey+link", "//ios/third_party/earl_grey:earl_grey+link",
...@@ -373,7 +371,7 @@ source_set("eg_app_support+eg2") { ...@@ -373,7 +371,7 @@ source_set("eg_app_support+eg2") {
"//ios/chrome/browser/search_engines", "//ios/chrome/browser/search_engines",
"//ios/chrome/browser/ui/util", "//ios/chrome/browser/ui/util",
"//ios/chrome/test/app:test_support", "//ios/chrome/test/app:test_support",
"//ios/chrome/test/base", "//ios/testing:block_swizzler",
"//ios/testing/earl_grey:eg_app_support+eg2", "//ios/testing/earl_grey:eg_app_support+eg2",
"//ios/third_party/earl_grey2:app_framework+link", "//ios/third_party/earl_grey2:app_framework+link",
"//testing/gmock", "//testing/gmock",
...@@ -409,7 +407,7 @@ source_set("test_support") { ...@@ -409,7 +407,7 @@ source_set("test_support") {
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui", "//ios/chrome/browser/ui/content_suggestions:content_suggestions_ui",
"//ios/chrome/browser/ui/util", "//ios/chrome/browser/ui/util",
"//ios/chrome/test/app:test_support", "//ios/chrome/test/app:test_support",
"//ios/chrome/test/base", "//ios/testing:block_swizzler",
"//ios/testing/earl_grey:earl_grey_support", "//ios/testing/earl_grey:earl_grey_support",
"//ios/third_party/earl_grey:earl_grey+link", "//ios/third_party/earl_grey:earl_grey+link",
"//ios/web", "//ios/web",
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <memory> #include <memory>
#include "ios/chrome/browser/ui/util/ui_util.h" #include "ios/chrome/browser/ui/util/ui_util.h"
#import "ios/chrome/test/base/scoped_block_swizzler.h" #import "ios/testing/scoped_block_swizzler.h"
#include "testing/platform_test.h" #include "testing/platform_test.h"
#import "third_party/ocmock/OCMock/OCMock.h" #import "third_party/ocmock/OCMock/OCMock.h"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_controlling.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_collection_controlling.h"
#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_header_controlling.h" #import "ios/chrome/browser/ui/content_suggestions/content_suggestions_header_controlling.h"
#import "ios/chrome/test/base/scoped_block_swizzler.h" #import "ios/testing/scoped_block_swizzler.h"
#include "testing/platform_test.h" #include "testing/platform_test.h"
#import "third_party/ocmock/OCMock/OCMock.h" #import "third_party/ocmock/OCMock/OCMock.h"
#import "third_party/ocmock/gtest_support.h" #import "third_party/ocmock/gtest_support.h"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "components/ntp_snippets/content_suggestion.h" #include "components/ntp_snippets/content_suggestion.h"
#import "ios/chrome/browser/ui/content_suggestions/ntp_home_test_utils.h" #import "ios/chrome/browser/ui/content_suggestions/ntp_home_test_utils.h"
#include "ios/chrome/test/base/scoped_block_swizzler.h" #include "ios/testing/scoped_block_swizzler.h"
#if !defined(__has_feature) || !__has_feature(objc_arc) #if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support." #error "This file requires ARC support."
......
...@@ -28,7 +28,6 @@ source_set("unit_tests") { ...@@ -28,7 +28,6 @@ source_set("unit_tests") {
":list_model", ":list_model",
"//base", "//base",
"//ios/chrome/test:test_support", "//ios/chrome/test:test_support",
"//ios/chrome/test/base",
"//testing/gtest", "//testing/gtest",
] ]
} }
...@@ -62,7 +62,6 @@ source_set("unit_tests") { ...@@ -62,7 +62,6 @@ source_set("unit_tests") {
"//ios/chrome/browser/ui/main_content/test", "//ios/chrome/browser/ui/main_content/test",
"//ios/chrome/browser/ui/util", "//ios/chrome/browser/ui/util",
"//ios/chrome/browser/web_state_list", "//ios/chrome/browser/web_state_list",
"//ios/chrome/test/base",
"//ios/web/public/test", "//ios/web/public/test",
"//ios/web/public/test/fakes", "//ios/web/public/test/fakes",
"//testing/gtest", "//testing/gtest",
......
...@@ -87,7 +87,6 @@ source_set("eg_tests") { ...@@ -87,7 +87,6 @@ source_set("eg_tests") {
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant", "//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
"//ios/chrome/browser/ui/omnibox:omnibox_popup_shared", "//ios/chrome/browser/ui/omnibox:omnibox_popup_shared",
"//ios/chrome/test/app:test_support", "//ios/chrome/test/app:test_support",
"//ios/chrome/test/base:base",
"//ios/chrome/test/earl_grey:test_support", "//ios/chrome/test/earl_grey:test_support",
"//ios/testing/earl_grey:earl_grey_support", "//ios/testing/earl_grey:earl_grey_support",
"//ios/third_party/earl_grey:earl_grey+link", "//ios/third_party/earl_grey:earl_grey+link",
...@@ -118,7 +117,6 @@ source_set("eg2_tests") { ...@@ -118,7 +117,6 @@ source_set("eg2_tests") {
"//ios/chrome/browser/ui:feature_flags", "//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant", "//ios/chrome/browser/ui/content_suggestions:content_suggestions_constant",
"//ios/chrome/browser/ui/omnibox:omnibox_popup_shared", "//ios/chrome/browser/ui/omnibox:omnibox_popup_shared",
"//ios/chrome/test/base",
"//ios/chrome/test/earl_grey:eg_test_support+eg2", "//ios/chrome/test/earl_grey:eg_test_support+eg2",
"//ios/testing/earl_grey:eg_test_support+eg2", "//ios/testing/earl_grey:eg_test_support+eg2",
"//ios/third_party/earl_grey2:test_lib", "//ios/third_party/earl_grey2:test_lib",
......
...@@ -30,7 +30,6 @@ source_set("unit_tests") { ...@@ -30,7 +30,6 @@ source_set("unit_tests") {
":presenters", ":presenters",
"//base", "//base",
"//base/test:test_support", "//base/test:test_support",
"//ios/chrome/test/base",
"//testing/gtest", "//testing/gtest",
] ]
} }
...@@ -44,8 +44,8 @@ source_set("eg_tests") { ...@@ -44,8 +44,8 @@ source_set("eg_tests") {
"//ios/chrome/browser/ui/main", "//ios/chrome/browser/ui/main",
"//ios/chrome/browser/ui/util", "//ios/chrome/browser/ui/util",
"//ios/chrome/test/app:test_support", "//ios/chrome/test/app:test_support",
"//ios/chrome/test/base",
"//ios/chrome/test/earl_grey:test_support", "//ios/chrome/test/earl_grey:test_support",
"//ios/testing:block_swizzler",
"//ios/testing/earl_grey:earl_grey_support", "//ios/testing/earl_grey:earl_grey_support",
"//ios/third_party/earl_grey:earl_grey+link", "//ios/third_party/earl_grey:earl_grey+link",
] ]
...@@ -109,8 +109,8 @@ source_set("eg2_tests") { ...@@ -109,8 +109,8 @@ source_set("eg2_tests") {
":eg_test_support+eg2", ":eg_test_support+eg2",
"//base:base", "//base:base",
"//ios/chrome/app/strings:ios_chromium_strings_grit", "//ios/chrome/app/strings:ios_chromium_strings_grit",
"//ios/chrome/test/base:base",
"//ios/chrome/test/earl_grey:eg_test_support+eg2", "//ios/chrome/test/earl_grey:eg_test_support+eg2",
"//ios/testing:block_swizzler",
"//ios/testing/earl_grey:eg_test_support+eg2", "//ios/testing/earl_grey:eg_test_support+eg2",
"//ios/third_party/earl_grey2:test_lib", "//ios/third_party/earl_grey2:test_lib",
] ]
...@@ -129,8 +129,8 @@ source_set("unit_tests") { ...@@ -129,8 +129,8 @@ source_set("unit_tests") {
"//base", "//base",
"//base/test:test_support", "//base/test:test_support",
"//ios/chrome/browser/crash_report", "//ios/chrome/browser/crash_report",
"//ios/chrome/test/base",
"//ios/chrome/test/ocmock", "//ios/chrome/test/ocmock",
"//ios/testing:block_swizzler",
"//testing/gtest", "//testing/gtest",
"//third_party/breakpad:client", "//third_party/breakpad:client",
"//third_party/ocmock", "//third_party/ocmock",
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "base/mac/foundation_util.h" #include "base/mac/foundation_util.h"
#include "ios/chrome/browser/ui/safe_mode/safe_mode_app_interface.h" #include "ios/chrome/browser/ui/safe_mode/safe_mode_app_interface.h"
#include "ios/chrome/grit/ios_chromium_strings.h" #include "ios/chrome/grit/ios_chromium_strings.h"
#import "ios/chrome/test/base/scoped_block_swizzler.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey.h"
#import "ios/chrome/test/earl_grey/chrome_earl_grey_app_interface.h" #import "ios/chrome/test/earl_grey/chrome_earl_grey_app_interface.h"
#import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers.h"
...@@ -16,6 +15,7 @@ ...@@ -16,6 +15,7 @@
#import "ios/chrome/test/earl_grey/earl_grey_scoped_block_swizzler.h" #import "ios/chrome/test/earl_grey/earl_grey_scoped_block_swizzler.h"
#import "ios/testing/earl_grey/app_launch_manager.h" #import "ios/testing/earl_grey/app_launch_manager.h"
#import "ios/testing/earl_grey/earl_grey_test.h" #import "ios/testing/earl_grey/earl_grey_test.h"
#import "ios/testing/scoped_block_swizzler.h"
#if !defined(__has_feature) || !__has_feature(objc_arc) #if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support." #error "This file requires ARC support."
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
#import "base/test/ios/wait_util.h" #import "base/test/ios/wait_util.h"
#import "ios/chrome/browser/crash_report/breakpad_helper.h" #import "ios/chrome/browser/crash_report/breakpad_helper.h"
#import "ios/chrome/browser/crash_report/main_thread_freeze_detector.h" #import "ios/chrome/browser/crash_report/main_thread_freeze_detector.h"
#import "ios/chrome/test/base/scoped_block_swizzler.h"
#import "ios/chrome/test/ocmock/OCMockObject+BreakpadControllerTesting.h" #import "ios/chrome/test/ocmock/OCMockObject+BreakpadControllerTesting.h"
#import "ios/testing/scoped_block_swizzler.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h" #include "testing/platform_test.h"
#import "third_party/breakpad/breakpad/src/client/ios/BreakpadController.h" #import "third_party/breakpad/breakpad/src/client/ios/BreakpadController.h"
......
...@@ -295,7 +295,6 @@ test("ios_chrome_unittests") { ...@@ -295,7 +295,6 @@ test("ios_chrome_unittests") {
"//ios/chrome/common:unit_tests", "//ios/chrome/common:unit_tests",
"//ios/chrome/content_widget_extension:unit_tests", "//ios/chrome/content_widget_extension:unit_tests",
"//ios/chrome/search_widget_extension:unit_tests", "//ios/chrome/search_widget_extension:unit_tests",
"//ios/chrome/test/base:unit_tests",
"//ios/testing:http_server_bundle_data", "//ios/testing:http_server_bundle_data",
] ]
if (ios_enable_firebase_sdk) { if (ios_enable_firebase_sdk) {
......
...@@ -5,25 +5,9 @@ ...@@ -5,25 +5,9 @@
source_set("base") { source_set("base") {
configs += [ "//build/config/compiler:enable_arc" ] configs += [ "//build/config/compiler:enable_arc" ]
testonly = true testonly = true
sources = [ sources = []
"scoped_block_swizzler.h", public_deps = [
"scoped_block_swizzler.mm", "//ios/testing:block_swizzler",
]
deps = [
"//base",
]
}
source_set("unit_tests") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"scoped_block_swizzler_unittest.mm",
]
deps = [
":base",
"//base",
"//testing/gtest",
] ]
} }
......
...@@ -282,7 +282,7 @@ source_set("test_support") { ...@@ -282,7 +282,7 @@ source_set("test_support") {
"//ios/chrome/browser/ui/util", "//ios/chrome/browser/ui/util",
"//ios/chrome/browser/web:tab_id_tab_helper", "//ios/chrome/browser/web:tab_id_tab_helper",
"//ios/chrome/test/app:test_support", "//ios/chrome/test/app:test_support",
"//ios/chrome/test/base", "//ios/testing:block_swizzler",
"//ios/testing:verify_custom_webkit", "//ios/testing:verify_custom_webkit",
"//ios/testing/earl_grey:earl_grey_support", "//ios/testing/earl_grey:earl_grey_support",
"//ios/third_party/material_components_ios", "//ios/third_party/material_components_ios",
...@@ -416,7 +416,7 @@ source_set("eg_app_support+eg2") { ...@@ -416,7 +416,7 @@ source_set("eg_app_support+eg2") {
"//ios/chrome/browser/ui/util:eg_app_support+eg2", "//ios/chrome/browser/ui/util:eg_app_support+eg2",
"//ios/chrome/browser/web:tab_id_tab_helper", "//ios/chrome/browser/web:tab_id_tab_helper",
"//ios/chrome/test/app:test_support", "//ios/chrome/test/app:test_support",
"//ios/chrome/test/base", "//ios/testing:block_swizzler",
"//ios/testing:nserror_support", "//ios/testing:nserror_support",
"//ios/testing:verify_custom_webkit", "//ios/testing:verify_custom_webkit",
"//ios/testing/earl_grey:eg_app_support+eg2", "//ios/testing/earl_grey:eg_app_support+eg2",
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <map> #include <map>
#include "base/logging.h" #include "base/logging.h"
#include "ios/chrome/test/base/scoped_block_swizzler.h" #include "ios/testing/scoped_block_swizzler.h"
#if !defined(__has_feature) || !__has_feature(objc_arc) #if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support." #error "This file requires ARC support."
......
...@@ -8,7 +8,7 @@ import("//testing/test.gni") ...@@ -8,7 +8,7 @@ import("//testing/test.gni")
group("all_tests") { group("all_tests") {
testonly = true testonly = true
deps = [ deps = [
":ocmock_support_unittests", ":ios_testing_unittests",
] ]
} }
...@@ -36,6 +36,18 @@ source_set("hardware_keyboarr_support") { ...@@ -36,6 +36,18 @@ source_set("hardware_keyboarr_support") {
] ]
} }
source_set("block_swizzler") {
configs += [ "//build/config/compiler:enable_arc" ]
testonly = true
sources = [
"scoped_block_swizzler.h",
"scoped_block_swizzler.mm",
]
deps = [
"//base",
]
}
source_set("nserror_support") { source_set("nserror_support") {
configs += [ "//build/config/compiler:enable_arc" ] configs += [ "//build/config/compiler:enable_arc" ]
testonly = true testonly = true
...@@ -76,9 +88,10 @@ source_set("ocmock_support") { ...@@ -76,9 +88,10 @@ source_set("ocmock_support") {
] ]
} }
test("ocmock_support_unittests") { test("ios_testing_unittests") {
configs += [ "//build/config/compiler:enable_arc" ] configs += [ "//build/config/compiler:enable_arc" ]
deps = [ deps = [
":block_swizzler",
":ocmock_support", ":ocmock_support",
"//base/test:run_all_unittests", "//base/test:run_all_unittests",
"//base/test:test_support", "//base/test:test_support",
...@@ -89,6 +102,7 @@ test("ocmock_support_unittests") { ...@@ -89,6 +102,7 @@ test("ocmock_support_unittests") {
sources = [ sources = [
"ocmock_complex_type_helper_unittest.mm", "ocmock_complex_type_helper_unittest.mm",
"scoped_block_swizzler_unittest.mm",
] ]
assert_no_deps = ios_assert_no_deps assert_no_deps = ios_assert_no_deps
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
#ifndef IOS_CHROME_TEST_BASE_SCOPED_BLOCK_SWIZZLER_H_ #ifndef IOS_TESTING_SCOPED_BLOCK_SWIZZLER_H_
#define IOS_CHROME_TEST_BASE_SCOPED_BLOCK_SWIZZLER_H_ #define IOS_TESTING_SCOPED_BLOCK_SWIZZLER_H_
#include <objc/runtime.h> #include <objc/runtime.h>
...@@ -37,4 +37,4 @@ class ScopedBlockSwizzler { ...@@ -37,4 +37,4 @@ class ScopedBlockSwizzler {
DISALLOW_COPY_AND_ASSIGN(ScopedBlockSwizzler); DISALLOW_COPY_AND_ASSIGN(ScopedBlockSwizzler);
}; };
#endif // IOS_CHROME_TEST_BASE_SCOPED_BLOCK_SWIZZLER_H_ #endif // IOS_TESTING_SCOPED_BLOCK_SWIZZLER_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "ios/chrome/test/base/scoped_block_swizzler.h" #include "ios/testing/scoped_block_swizzler.h"
#include "base/logging.h" #include "base/logging.h"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "ios/chrome/test/base/scoped_block_swizzler.h" #include "ios/testing/scoped_block_swizzler.h"
#include "base/mac/foundation_util.h" #include "base/mac/foundation_util.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#import "testing/gtest_mac.h" #import "testing/gtest_mac.h"
......
...@@ -2124,9 +2124,9 @@ ...@@ -2124,9 +2124,9 @@
"label": "//third_party/opus:opus_tests", "label": "//third_party/opus:opus_tests",
"type": "console_test_launcher", "type": "console_test_launcher",
}, },
"ocmock_support_unittests": { "ios_testing_unittests": {
"args": [], "args": [],
"label": "//ios/testing:ocmock_support_unittests", "label": "//ios/testing:ios_testing_unittests",
"type": "raw", "type": "raw",
}, },
"origin_policy_parser_fuzzer": { "origin_policy_parser_fuzzer": {
......
...@@ -115,7 +115,7 @@ SKIP_GN_ISOLATE_MAP_TARGETS = { ...@@ -115,7 +115,7 @@ SKIP_GN_ISOLATE_MAP_TARGETS = {
'ios_web_unittests', 'ios_web_unittests',
'ios_web_view_inttests', 'ios_web_view_inttests',
'ios_web_view_unittests', 'ios_web_view_unittests',
'ocmock_support_unittests', 'ios_testing_unittests',
# These are listed in Builders that are skipped for other reasons. # These are listed in Builders that are skipped for other reasons.
'chrome_junit_tests', 'chrome_junit_tests',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment