From a289707ca3726217915fb7cac34dcdeeaba1e3cc Mon Sep 17 00:00:00 2001 From: msramek Date: Wed, 3 May 2017 03:55:36 -0700 Subject: [PATCH] Revert of Roll googletest to 1.8.0. (patchset #3 id:40001 of https://codereview.chromium.org/2852613002/ ) Reason for revert: Seems to have caused all content_browsertests on ChromiumOS to crash. https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%281%29/builds/25582 I'll run the revert through trybots so that it doesn't break anything else. Original issue's description: > Roll googletest to 1.8.0. > > This is a re-land of http://crrev.com/2779193002 which was reverted due to > build errors on Mac. > > GoogleTest (gtest) and GoogleMock (gmock) are now hosted into the same > googletest repository. In order to cope with this, the googletest > repository is now sourced at third_party/googletest. > > The file/directory layout of Google Test is not yet considered stable. > To minimize disruption while Google Test stabilizes, Chromium code will > be insulated from third_party/googletest. > > * testing/gtest/include/gtest/ and testing/gmock/include/gmock have > been populated with headers that forward into the appropriate locations of > third_party/googletest > > * testing/BUILD.gn has been populated with the targets > //testing/gtest(:gtest_main) and //testing/gmock(:gmock_main), which > depend on the appropriate //third_party/googletest targets. > > All Chromium code should keep depending on the targets and headers > in testing/{gtest,gmock} for now. > > BUG=630705 > TESTED=ninja -C out/Default/ ced_unittests && ninja -C out/Default > TBR=rkc,dpranke,agl > > Review-Url: https://codereview.chromium.org/2852613002 > Cr-Commit-Position: refs/heads/master@{#468860} > Committed: https://chromium.googlesource.com/chromium/src/+/dbcef9bdc1edd32d62c6de0bd382cdc78ce385da TBR=dpranke@chromium.org,thakis@chromium.org,rkc@chromium.org,agl@chromium.org,pwnall@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=630705 Review-Url: https://codereview.chromium.org/2856963003 Cr-Commit-Position: refs/heads/master@{#468934} --- .gitignore | 2 + DEPS | 9 +- base/gtest_prod_util.h | 2 +- build/secondary/testing/gmock/BUILD.gn | 7 - build/secondary/testing/gtest/BUILD.gn | 7 - ...luetooth_media_endpoint_service_provider.h | 2 +- net/socket/sequenced_socket_data_unittest.cc | 4 +- testing/gmock/BUILD.gn | 34 ---- testing/gmock/OWNERS | 2 - testing/gmock/include/gmock/gmock-actions.h | 10 -- .../gmock/gmock-generated-function-mockers.h | 10 -- testing/gmock/include/gmock/gmock-matchers.h | 10 -- testing/gmock/include/gmock/gmock.h | 10 -- .../gmock/internal/custom/gmock-port.h | 8 +- testing/gtest/BUILD.gn | 85 ---------- testing/gtest/OWNERS | 2 - testing/gtest/empty.cc | 3 - .../gtest/include/gtest/gtest-death-test.h | 10 -- testing/gtest/include/gtest/gtest-message.h | 10 -- .../gtest/include/gtest/gtest-param-test.h | 10 -- testing/gtest/include/gtest/gtest-spi.h | 10 -- testing/gtest/include/gtest/gtest.h | 10 -- testing/gtest/include/gtest/gtest_prod.h | 10 -- testing/gtest_mac.h | 4 +- testing/gtest_mac.mm | 6 +- testing/gtest_mac_unittest.mm | 2 +- third_party/.gitignore | 1 - third_party/googletest/BUILD.gn | 150 ------------------ third_party/googletest/OWNERS | 4 - third_party/googletest/README.chromium | 17 -- 30 files changed, 23 insertions(+), 428 deletions(-) delete mode 100644 testing/gmock/BUILD.gn delete mode 100644 testing/gmock/OWNERS delete mode 100644 testing/gmock/include/gmock/gmock-actions.h delete mode 100644 testing/gmock/include/gmock/gmock-generated-function-mockers.h delete mode 100644 testing/gmock/include/gmock/gmock-matchers.h delete mode 100644 testing/gmock/include/gmock/gmock.h rename {third_party/googletest => testing}/gmock_custom/gmock/internal/custom/gmock-port.h (84%) delete mode 100644 testing/gtest/BUILD.gn delete mode 100644 testing/gtest/OWNERS delete mode 100644 testing/gtest/empty.cc delete mode 100644 testing/gtest/include/gtest/gtest-death-test.h delete mode 100644 testing/gtest/include/gtest/gtest-message.h delete mode 100644 testing/gtest/include/gtest/gtest-param-test.h delete mode 100644 testing/gtest/include/gtest/gtest-spi.h delete mode 100644 testing/gtest/include/gtest/gtest.h delete mode 100644 testing/gtest/include/gtest/gtest_prod.h delete mode 100644 third_party/googletest/BUILD.gn delete mode 100644 third_party/googletest/OWNERS delete mode 100644 third_party/googletest/README.chromium diff --git a/.gitignore b/.gitignore index bd88c765176378..d3c92754c88633 100644 --- a/.gitignore +++ b/.gitignore @@ -269,6 +269,8 @@ vs-chromium-project.txt /sql/sql_unittests_run.xml /sync/sync.xml /sync_testserver.log +/testing/gmock +/testing/gtest /testserver.log /tools/luci-go/linux64/isolate /tools/luci-go/mac64/isolate diff --git a/DEPS b/DEPS index f4b83815bc060a..86c570eafcd4be 100644 --- a/DEPS +++ b/DEPS @@ -132,6 +132,12 @@ deps = { 'src/sdch/open-vcdiff': Var('chromium_git') + '/external/github.com/google/open-vcdiff.git' + '@' + '2b9bd1fe548520e9355e457a134bab7e2f9c56c0', + 'src/testing/gtest': + Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + '6f8a66431cb592dad629028a50b3dd418a408c87', + + 'src/testing/gmock': + Var('chromium_git') + '/external/googlemock.git' + '@' + '0421b6f358139f02e102c9c332ce19a33faf75be', # from svn revision 566 + 'src/third_party/freetype/src': Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + Var('freetype_revision'), @@ -150,9 +156,6 @@ deps = { 'src/third_party/colorama/src': Var('chromium_git') + '/external/colorama.git' + '@' + '799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', - 'src/third_party/googletest/src': - Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + 'ec44c6c1675c25b9827aacd08c02433cccde7780', - 'src/third_party/icu': Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'b34251f8b762f8e2112a89c587855ca4297fed96', diff --git a/base/gtest_prod_util.h b/base/gtest_prod_util.h index 2ca267e27f43b7..3289e6301da718 100644 --- a/base/gtest_prod_util.h +++ b/base/gtest_prod_util.h @@ -5,7 +5,7 @@ #ifndef BASE_GTEST_PROD_UTIL_H_ #define BASE_GTEST_PROD_UTIL_H_ -#include "testing/gtest/include/gtest/gtest_prod.h" // nogncheck +#include "testing/gtest/include/gtest/gtest_prod.h" // This is a wrapper for gtest's FRIEND_TEST macro that friends // test with all possible prefixes. This is very helpful when changing the test diff --git a/build/secondary/testing/gmock/BUILD.gn b/build/secondary/testing/gmock/BUILD.gn index 9184d623c822aa..c7e109d2a0b04d 100644 --- a/build/secondary/testing/gmock/BUILD.gn +++ b/build/secondary/testing/gmock/BUILD.gn @@ -2,13 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# Chromium's GN configuration for gmock now lives at testing/gmock/BUILD.gn. -# -# This configuration is left in the tree because it is pulled by V8 and PDFium, -# and will be removed as soon as the projects switch off of it. -# -# Details at http://crbug.com/630705 and http://crrev.com/2779193002 - config("gmock_config") { # Gmock headers need to be able to find themselves. include_dirs = [ diff --git a/build/secondary/testing/gtest/BUILD.gn b/build/secondary/testing/gtest/BUILD.gn index 637048cc42d9ea..649f5c559db405 100644 --- a/build/secondary/testing/gtest/BUILD.gn +++ b/build/secondary/testing/gtest/BUILD.gn @@ -2,13 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# Chromium's GN configuration for gtest now lives at testing/gtest/BUILD.gn. -# -# This configuration is left in the tree because it is pulled by V8 and PDFium, -# and will be removed as soon as the projects switch off of it. -# -# Details at http://crbug.com/630705 and http://crrev.com/2779193002 - import("//build_overrides/gtest.gni") config("gtest_config") { diff --git a/device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h b/device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h index f907e4da7324d4..6a9e6ae6757f5f 100644 --- a/device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h +++ b/device/bluetooth/dbus/fake_bluetooth_media_endpoint_service_provider.h @@ -14,7 +14,7 @@ #include "dbus/object_path.h" #include "device/bluetooth/bluetooth_export.h" #include "device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.h" -#include "testing/gtest/include/gtest/gtest_prod.h" // nogncheck +#include "testing/gtest/include/gtest/gtest_prod.h" namespace bluez { diff --git a/net/socket/sequenced_socket_data_unittest.cc b/net/socket/sequenced_socket_data_unittest.cc index 4d54f23322f29a..b35d1fb9133fce 100644 --- a/net/socket/sequenced_socket_data_unittest.cc +++ b/net/socket/sequenced_socket_data_unittest.cc @@ -671,8 +671,8 @@ TEST_F(SequencedSocketDataTest, SingleSyncWriteTooSmall) { static const char* kExpectedFailures[] = { "Expected: (data.length()) >= (expected_data.length())", - "To be equal to: actual_data", - "To be equal to: sock_->Write(buf.get(), len, failing_callback_)"}; + "Value of: actual_data", + "Value of: sock_->Write(buf.get(), len, failing_callback_)"}; ASSERT_EQ(arraysize(kExpectedFailures), static_cast(gtest_failures.size())); diff --git a/testing/gmock/BUILD.gn b/testing/gmock/BUILD.gn deleted file mode 100644 index 11d7901755b2f7..00000000000000 --- a/testing/gmock/BUILD.gn +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2014 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. - -# The file/directory layout of Google Test is not yet considered stable. Until -# it stabilizes, Chromium code MUST use this target instead of reaching directly -# into //third_party/googletest. -source_set("gmock") { - testonly = true - sources = [ - "include/gmock/gmock-actions.h", - "include/gmock/gmock-generated-function-mockers.h", - "include/gmock/gmock-matchers.h", - "include/gmock/gmock.h", - ] - deps = [ - "//third_party/googletest:gmock", - ] - - public_configs = [ - "//third_party/googletest:gmock_config", - "//third_party/googletest:gtest_config", - ] -} - -# The file/directory layout of Google Test is not yet considered stable. Until -# it stabilizes, Chromium code MUST use this target instead of reaching directly -# into //third_party/googletest. -source_set("gmock_main") { - testonly = true - deps = [ - "//third_party/googletest:gmock_main", - ] -} diff --git a/testing/gmock/OWNERS b/testing/gmock/OWNERS deleted file mode 100644 index d5fa70ced55460..00000000000000 --- a/testing/gmock/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -thakis@chromium.org -pwnall@chromium.org diff --git a/testing/gmock/include/gmock/gmock-actions.h b/testing/gmock/include/gmock/gmock-actions.h deleted file mode 100644 index e4ae2febb56f8f..00000000000000 --- a/testing/gmock/include/gmock/gmock-actions.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 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. - -// The file/directory layout of Google Test is not yet considered stable. Until -// it stabilizes, Chromium code will use forwarding headers in testing/gtest -// and testing/gmock, instead of directly including files in -// third_party/googletest. - -#include "third_party/googletest/src/googlemock/include/gmock/gmock-actions.h" diff --git a/testing/gmock/include/gmock/gmock-generated-function-mockers.h b/testing/gmock/include/gmock/gmock-generated-function-mockers.h deleted file mode 100644 index b9986c7b11ba4c..00000000000000 --- a/testing/gmock/include/gmock/gmock-generated-function-mockers.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 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. - -// The file/directory layout of Google Test is not yet considered stable. Until -// it stabilizes, Chromium code will use forwarding headers in testing/gtest -// and testing/gmock, instead of directly including files in -// third_party/googletest. - -#include "third_party/googletest/src/googlemock/include/gmock/gmock-generated-function-mockers.h" diff --git a/testing/gmock/include/gmock/gmock-matchers.h b/testing/gmock/include/gmock/gmock-matchers.h deleted file mode 100644 index 8cfc699871b3f1..00000000000000 --- a/testing/gmock/include/gmock/gmock-matchers.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 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. - -// The file/directory layout of Google Test is not yet considered stable. Until -// it stabilizes, Chromium code will use forwarding headers in testing/gtest -// and testing/gmock, instead of directly including files in -// third_party/googletest. - -#include "third_party/googletest/src/googlemock/include/gmock/gmock-matchers.h" diff --git a/testing/gmock/include/gmock/gmock.h b/testing/gmock/include/gmock/gmock.h deleted file mode 100644 index c39a9f6aeaa2b1..00000000000000 --- a/testing/gmock/include/gmock/gmock.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 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. - -// The file/directory layout of Google Test is not yet considered stable. Until -// it stabilizes, Chromium code will use forwarding headers in testing/gtest -// and testing/gmock, instead of directly including files in -// third_party/googletest. - -#include "third_party/googletest/src/googlemock/include/gmock/gmock.h" diff --git a/third_party/googletest/gmock_custom/gmock/internal/custom/gmock-port.h b/testing/gmock_custom/gmock/internal/custom/gmock-port.h similarity index 84% rename from third_party/googletest/gmock_custom/gmock/internal/custom/gmock-port.h rename to testing/gmock_custom/gmock/internal/custom/gmock-port.h index b541499a85d0c0..f8eb6cd416f64b 100644 --- a/third_party/googletest/gmock_custom/gmock/internal/custom/gmock-port.h +++ b/testing/gmock_custom/gmock/internal/custom/gmock-port.h @@ -14,12 +14,14 @@ namespace std { // <20120322 below implies pre-4.7.0. In addition we blacklist several version // that released after 4.7.0 from pre-4.7.0 branch. 20120702 implies 4.5.4, and // 20121127 implies 4.6.4. -#if defined(__GLIBCXX__) && \ - (__GLIBCXX__ < 20120322 || __GLIBCXX__ == 20120702 || \ - __GLIBCXX__ == 20121127) +#if defined(__GLIBCXX__) && \ + (__GLIBCXX__ < 20120322 || \ + __GLIBCXX__ == 20120702 || \ + __GLIBCXX__ == 20121127) template using is_default_constructible = std::is_constructible; #endif + } #endif // TESTING_GMOCK_CUSTOM_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_ diff --git a/testing/gtest/BUILD.gn b/testing/gtest/BUILD.gn deleted file mode 100644 index 3c6ae888e7bd32..00000000000000 --- a/testing/gtest/BUILD.gn +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright 2014 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. - -import("//build_overrides/gtest.gni") - -config("gtest_direct_config") { - visibility = [ ":*" ] - defines = [ "UNIT_TEST" ] -} - -# The file/directory layout of Google Test is not yet considered stable. Until -# it stabilizes, Chromium code MUST use this target instead of reaching directly -# into //third_party/googletest. -static_library("gtest") { - testonly = true - - sources = [ - "include/gtest/gtest-death-test.h", - "include/gtest/gtest-message.h", - "include/gtest/gtest-param-test.h", - "include/gtest/gtest-spi.h", - "include/gtest/gtest.h", - "include/gtest/gtest_prod.h", - - # This is a workaround for the issues below. - # - # 1) This target needs to be a static_library (not a source set) on Mac to - # avoid the build errors in - # https://codereview.chromium.org/2779193002#msg82. - # 2) A static_library must have at least one source file, to avoid build - # errors on Mac and Windows. https://crbug.com/710334 - # 3) A static_library with complete_static_lib = true, which would not - # require adding the empty file, will result in duplicate symbols on - # Android. https://codereview.chromium.org/2852613002/#ps20001 - "empty.cc", - ] - deps = [ - "//third_party/googletest:gtest", - ] - - public_configs = [ ":gtest_direct_config" ] - - if (gtest_include_multiprocess) { - sources += [ - "../multiprocess_func_list.cc", - "../multiprocess_func_list.h", - ] - } - - if (gtest_include_platform_test) { - sources += [ "../platform_test.h" ] - } - - if ((is_mac || is_ios) && gtest_include_objc_support) { - if (is_ios) { - set_sources_assignment_filter([]) - } - sources += [ - "../gtest_mac.h", - "../gtest_mac.mm", - ] - if (gtest_include_platform_test) { - sources += [ "../platform_test_mac.mm" ] - } - set_sources_assignment_filter(sources_assignment_filter) - } - - if (is_ios && gtest_include_ios_coverage) { - sources += [ - "../coverage_util_ios.cc", - "../coverage_util_ios.h", - ] - } -} - -# The file/directory layout of Google Test is not yet considered stable. Until -# it stabilizes, Chromium code MUST use this target instead of reaching directly -# into //third_party/googletest. -source_set("gtest_main") { - testonly = true - deps = [ - "//third_party/googletest:gtest_main", - ] -} diff --git a/testing/gtest/OWNERS b/testing/gtest/OWNERS deleted file mode 100644 index d5fa70ced55460..00000000000000 --- a/testing/gtest/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -thakis@chromium.org -pwnall@chromium.org diff --git a/testing/gtest/empty.cc b/testing/gtest/empty.cc deleted file mode 100644 index 7487e66ecb612e..00000000000000 --- a/testing/gtest/empty.cc +++ /dev/null @@ -1,3 +0,0 @@ -// Copyright 2014 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. diff --git a/testing/gtest/include/gtest/gtest-death-test.h b/testing/gtest/include/gtest/gtest-death-test.h deleted file mode 100644 index d2fead05b22df8..00000000000000 --- a/testing/gtest/include/gtest/gtest-death-test.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 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. - -// The file/directory layout of Google Test is not yet considered stable. Until -// it stabilizes, Chromium code will use forwarding headers in testing/gtest -// and testing/gmock, instead of directly including files in -// third_party/googletest. - -#include "third_party/googletest/src/googletest/include/gtest/gtest-death-test.h" diff --git a/testing/gtest/include/gtest/gtest-message.h b/testing/gtest/include/gtest/gtest-message.h deleted file mode 100644 index 4ec1e0ebece3b1..00000000000000 --- a/testing/gtest/include/gtest/gtest-message.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 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. - -// The file/directory layout of Google Test is not yet considered stable. Until -// it stabilizes, Chromium code will use forwarding headers in testing/gtest -// and testing/gmock, instead of directly including files in -// third_party/googletest. - -#include "third_party/googletest/src/googletest/include/gtest/gtest-message.h" diff --git a/testing/gtest/include/gtest/gtest-param-test.h b/testing/gtest/include/gtest/gtest-param-test.h deleted file mode 100644 index e85c2f3593eb52..00000000000000 --- a/testing/gtest/include/gtest/gtest-param-test.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 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. - -// The file/directory layout of Google Test is not yet considered stable. Until -// it stabilizes, Chromium code will use forwarding headers in testing/gtest -// and testing/gmock, instead of directly including files in -// third_party/googletest. - -#include "third_party/googletest/src/googletest/include/gtest/gtest-param-test.h" diff --git a/testing/gtest/include/gtest/gtest-spi.h b/testing/gtest/include/gtest/gtest-spi.h deleted file mode 100644 index 87af65ccdd8451..00000000000000 --- a/testing/gtest/include/gtest/gtest-spi.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 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. - -// The file/directory layout of Google Test is not yet considered stable. Until -// it stabilizes, Chromium code will use forwarding headers in testing/gtest -// and testing/gmock, instead of directly including files in -// third_party/googletest. - -#include "third_party/googletest/src/googletest/include/gtest/gtest-spi.h" diff --git a/testing/gtest/include/gtest/gtest.h b/testing/gtest/include/gtest/gtest.h deleted file mode 100644 index b026e3a6dfd2c8..00000000000000 --- a/testing/gtest/include/gtest/gtest.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 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. - -// The file/directory layout of Google Test is not yet considered stable. Until -// it stabilizes, Chromium code will use forwarding headers in testing/gtest -// and testing/gmock, instead of directly including files in -// third_party/googletest. - -#include "third_party/googletest/src/googletest/include/gtest/gtest.h" diff --git a/testing/gtest/include/gtest/gtest_prod.h b/testing/gtest/include/gtest/gtest_prod.h deleted file mode 100644 index b6f81aa76ba9a3..00000000000000 --- a/testing/gtest/include/gtest/gtest_prod.h +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2017 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. - -// The file/directory layout of Google Test is not yet considered stable. Until -// it stabilizes, Chromium code will use forwarding headers in testing/gtest -// and testing/gmock, instead of directly including files in -// third_party/googletest. - -#include "third_party/googletest/src/googletest/include/gtest/gtest_prod.h" diff --git a/testing/gtest_mac.h b/testing/gtest_mac.h index b9f668a7d1e841..0a9af4323af5fc 100644 --- a/testing/gtest_mac.h +++ b/testing/gtest_mac.h @@ -5,8 +5,8 @@ #ifndef TESTING_GTEST_MAC_H_ #define TESTING_GTEST_MAC_H_ -#include "testing/gtest/include/gtest/gtest.h" -#include "third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" +#include +#include #ifdef GTEST_OS_MAC diff --git a/testing/gtest_mac.mm b/testing/gtest_mac.mm index de320642d679ca..62b51c5a5ad1d8 100644 --- a/testing/gtest_mac.mm +++ b/testing/gtest_mac.mm @@ -6,9 +6,9 @@ #include -#include "testing/gtest/include/gtest/gtest.h" -#include "third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" -#include "third_party/googletest/src/googletest/include/gtest/internal/gtest-string.h" +#include +#include +#include #ifdef GTEST_OS_MAC diff --git a/testing/gtest_mac_unittest.mm b/testing/gtest_mac_unittest.mm index 0fafff4e48a70a..2dfa24e8d8b224 100644 --- a/testing/gtest_mac_unittest.mm +++ b/testing/gtest_mac_unittest.mm @@ -12,7 +12,7 @@ #include "base/mac/scoped_nsautorelease_pool.h" #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h" +#include "testing/gtest/include/gtest/internal/gtest-port.h" TEST(GTestMac, ExpectNSEQ) { base::mac::ScopedNSAutoreleasePool pool; diff --git a/third_party/.gitignore b/third_party/.gitignore index 47c52825055eb8..7d5d9a2256442a 100644 --- a/third_party/.gitignore +++ b/third_party/.gitignore @@ -66,7 +66,6 @@ /google_appengine_cloudstorage /google_toolbox_for_mac/src /googlemac -/googletest/src /gvr-android-sdk/common_library.aar /gvr-android-sdk/test-libraries/controller_test_api.aar /gvr-android-sdk/libgvr_shim_static_arm.a diff --git a/third_party/googletest/BUILD.gn b/third_party/googletest/BUILD.gn deleted file mode 100644 index 294df12ed256d2..00000000000000 --- a/third_party/googletest/BUILD.gn +++ /dev/null @@ -1,150 +0,0 @@ -# Copyright 2014 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. - -config("gtest_config") { - visibility = [ ":*" ] # gmock also shares this config. - - defines = [ - # In order to allow regex matches in gtest to be shared between Windows - # and other systems, we tell gtest to always use its internal engine. - "GTEST_HAS_POSIX_RE=0", - "GTEST_LANG_CXX11=1", - ] - - # Gtest headers need to be able to find themselves. - include_dirs = [ "src/googletest/include" ] - - if (is_win) { - cflags = [ "/wd4800" ] # Unused variable warning. - } -} - -config("gtest_warnings") { - if (is_win && is_clang) { - # The Mutex constructor initializer list in gtest-port.cc is incorrectly - # ordered. See - # https://groups.google.com/d/msg/googletestframework/S5uSV8L2TX8/U1FaTDa6J6sJ. - cflags = [ "-Wno-reorder" ] - } -} - -config("gmock_config") { - # Gmock headers need to be able to find themselves. - include_dirs = [ - "gmock_custom", - "src/googlemock/include", - ] -} - -# Do NOT depend on this directly. Use //testing/gtest instead. -# See README.chromium for details. -source_set("gtest") { - testonly = true - sources = [ - "src/googletest/include/gtest/gtest-death-test.h", - "src/googletest/include/gtest/gtest-message.h", - "src/googletest/include/gtest/gtest-param-test.h", - "src/googletest/include/gtest/gtest-printers.h", - "src/googletest/include/gtest/gtest-spi.h", - "src/googletest/include/gtest/gtest-test-part.h", - "src/googletest/include/gtest/gtest-typed-test.h", - "src/googletest/include/gtest/gtest.h", - "src/googletest/include/gtest/gtest_pred_impl.h", - "src/googletest/include/gtest/internal/gtest-death-test-internal.h", - "src/googletest/include/gtest/internal/gtest-filepath.h", - "src/googletest/include/gtest/internal/gtest-internal.h", - "src/googletest/include/gtest/internal/gtest-linked_ptr.h", - "src/googletest/include/gtest/internal/gtest-param-util-generated.h", - "src/googletest/include/gtest/internal/gtest-param-util.h", - "src/googletest/include/gtest/internal/gtest-port.h", - "src/googletest/include/gtest/internal/gtest-string.h", - "src/googletest/include/gtest/internal/gtest-tuple.h", - "src/googletest/include/gtest/internal/gtest-type-util.h", - - #"src/googletest/src/gtest-all.cc", # Not needed by our build. - "src/googletest/src/gtest-death-test.cc", - "src/googletest/src/gtest-filepath.cc", - "src/googletest/src/gtest-internal-inl.h", - "src/googletest/src/gtest-port.cc", - "src/googletest/src/gtest-printers.cc", - "src/googletest/src/gtest-test-part.cc", - "src/googletest/src/gtest-typed-test.cc", - "src/googletest/src/gtest.cc", - ] - - # Some files include "src/gtest-internal-inl.h". - include_dirs = [ "src/googletest" ] - - all_dependent_configs = [ ":gtest_config" ] - - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ - "//build/config/compiler:no_chromium_code", - - # Must be after no_chromium_code for warning flags to be ordered correctly. - ":gtest_warnings", - ] -} - -# Do NOT depend on this directly. Use //testing/gtest:gtest_main instead. -# See README.chromium for details. -source_set("gtest_main") { - testonly = true - sources = [ - "src/googletest/src/gtest_main.cc", - ] - deps = [ - ":gtest", - ] -} - -# Do NOT depend on this directly. Use //testing/gmock:gmock_main instead. -# See README.chromium for details. -source_set("gmock") { - testonly = true - sources = [ - "src/googlemock/include/gmock/gmock-actions.h", - "src/googlemock/include/gmock/gmock-cardinalities.h", - "src/googlemock/include/gmock/gmock-generated-actions.h", - "src/googlemock/include/gmock/gmock-generated-function-mockers.h", - "src/googlemock/include/gmock/gmock-generated-matchers.h", - "src/googlemock/include/gmock/gmock-generated-nice-strict.h", - "src/googlemock/include/gmock/gmock-matchers.h", - "src/googlemock/include/gmock/gmock-spec-builders.h", - "src/googlemock/include/gmock/gmock.h", - "src/googlemock/include/gmock/internal/gmock-generated-internal-utils.h", - "src/googlemock/include/gmock/internal/gmock-internal-utils.h", - "src/googlemock/include/gmock/internal/gmock-port.h", - - # gmock helpers. - "gmock_custom/gmock/internal/custom/gmock-port.h", - - #"src/googlemock/src/gmock-all.cc", # Not needed by our build. - "src/googlemock/src/gmock-cardinalities.cc", - "src/googlemock/src/gmock-internal-utils.cc", - "src/googlemock/src/gmock-matchers.cc", - "src/googlemock/src/gmock-spec-builders.cc", - "src/googlemock/src/gmock.cc", - ] - - # This project includes some stuff form gtest's guts. - include_dirs = [ "src/googletest/include" ] - - public_configs = [ - ":gmock_config", - ":gtest_config", - ] -} - -# Do NOT depend on this directly. Use //testing/gmock:gmock_main instead. -# See README.chromium for details. -static_library("gmock_main") { - testonly = true - sources = [ - "src/googlemock/src/gmock_main.cc", - ] - deps = [ - ":gmock", - ] -} diff --git a/third_party/googletest/OWNERS b/third_party/googletest/OWNERS deleted file mode 100644 index b124ef3ec4f963..00000000000000 --- a/third_party/googletest/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -thakis@chromium.org -pwnall@chromium.org -phajdan.jr@chromium.org -dpranke@chromium.org diff --git a/third_party/googletest/README.chromium b/third_party/googletest/README.chromium deleted file mode 100644 index 54f0c9813e5d4e..00000000000000 --- a/third_party/googletest/README.chromium +++ /dev/null @@ -1,17 +0,0 @@ -Name: Google Test: Google's C++ Testing Framework -Short Name: googletest -URL: https://github.com/google/googletest.git -Version: 1.8.0 -License: BSD -Security critical: no - -Google Test is imported as-is, to facilitate version bumping. However, the -file/directory layout of Google Test is not yet considered stable. Therefore, -until Google Test's layout stabilizes, Chromium code MUST NOT depend on it -directly. Instead, Chromium code MUST: - -* #include the headers in testing/gtest and testing/gmock -* use //testing/gtest(:gtest_main) and //testing/gmock(:gmock_main) in BUILD.gn - deps - -This will allow us to adapt to Google Test changes with minimal disruption.