diff --git a/DEPS b/DEPS index 4aa488c3c64a7..2d68140b09a53 100644 --- a/DEPS +++ b/DEPS @@ -303,7 +303,7 @@ deps = { Var('chromium_git') + '/external/github.com/google/benchmark' + '@' + '431abd149fd76a072f821913c0340137cc755f36', 'src/third_party/googletest': - Var('chromium_git') + '/external/github.com/google/googletest' + '@' + '054a986a8513149e8374fc669a5fe40117ca6b41', + Var('chromium_git') + '/external/github.com/google/googletest' + '@' + '7f036c5563af7d0329f20e8bb42effb04629f0c0', 'src/third_party/boringssl': Var('dart_git') + '/boringssl_gen.git' + '@' + Var('dart_boringssl_gen_rev'), diff --git a/build/secondary/third_party/googletest/BUILD.gn b/build/secondary/third_party/googletest/BUILD.gn index 72f87cc4749e9..93e54a7fd2a2e 100644 --- a/build/secondary/third_party/googletest/BUILD.gn +++ b/build/secondary/third_party/googletest/BUILD.gn @@ -21,41 +21,12 @@ static_library("gtest") { "googletest/include/gtest/gtest-spi.h", "googletest/include/gtest/gtest.h", ] - sources = [ - "googletest/include/gtest/gtest-death-test.h", - "googletest/include/gtest/gtest-message.h", - "googletest/include/gtest/gtest-param-test.h", - "googletest/include/gtest/gtest-printers.h", - "googletest/include/gtest/gtest-test-part.h", - "googletest/include/gtest/gtest-typed-test.h", - "googletest/include/gtest/gtest_pred_impl.h", - "googletest/include/gtest/gtest_prod.h", - "googletest/include/gtest/internal/custom/gtest-port.h", - "googletest/include/gtest/internal/custom/gtest-printers.h", - "googletest/include/gtest/internal/custom/gtest.h", - "googletest/include/gtest/internal/gtest-death-test-internal.h", - "googletest/include/gtest/internal/gtest-filepath.h", - "googletest/include/gtest/internal/gtest-internal.h", - "googletest/include/gtest/internal/gtest-linked_ptr.h", - "googletest/include/gtest/internal/gtest-param-util-generated.h", - "googletest/include/gtest/internal/gtest-param-util.h", - "googletest/include/gtest/internal/gtest-port-arch.h", - "googletest/include/gtest/internal/gtest-port.h", - "googletest/include/gtest/internal/gtest-string.h", - "googletest/include/gtest/internal/gtest-tuple.h", - "googletest/include/gtest/internal/gtest-type-util.h", - "googletest/src/gtest-all.cc", - "googletest/src/gtest-death-test.cc", - "googletest/src/gtest-filepath.cc", - "googletest/src/gtest-internal-inl.h", - "googletest/src/gtest-matchers.cc", - "googletest/src/gtest-port.cc", - "googletest/src/gtest-printers.cc", - "googletest/src/gtest-test-part.cc", - "googletest/src/gtest-typed-test.cc", - "googletest/src/gtest.cc", - ] - sources -= [ "googletest/src/gtest-all.cc" ] + + # Only add the "*-all.cc" files (and no headers) to improve maintainability + # from upstream refactoring. The "*-all.cc" files include the respective + # source files. + sources = [ "googletest/src/gtest-all.cc" ] + public_configs = [ ":gtest_config" ] configs += [ ":gtest_private_config" ] @@ -217,31 +188,7 @@ config("gmock_config") { static_library("gmock") { testonly = true public = [ "googlemock/include/gmock/gmock.h" ] - sources = [ - "googlemock/include/gmock/gmock-actions.h", - "googlemock/include/gmock/gmock-cardinalities.h", - "googlemock/include/gmock/gmock-generated-actions.h", - "googlemock/include/gmock/gmock-generated-function-mockers.h", - "googlemock/include/gmock/gmock-generated-matchers.h", - "googlemock/include/gmock/gmock-generated-nice-strict.h", - "googlemock/include/gmock/gmock-matchers.h", - "googlemock/include/gmock/gmock-more-actions.h", - "googlemock/include/gmock/gmock-more-matchers.h", - "googlemock/include/gmock/gmock-spec-builders.h", - "googlemock/include/gmock/internal/custom/gmock-generated-actions.h", - "googlemock/include/gmock/internal/custom/gmock-matchers.h", - "googlemock/include/gmock/internal/custom/gmock-port.h", - "googlemock/include/gmock/internal/gmock-generated-internal-utils.h", - "googlemock/include/gmock/internal/gmock-internal-utils.h", - "googlemock/include/gmock/internal/gmock-port.h", - "googlemock/src/gmock-all.cc", - "googlemock/src/gmock-cardinalities.cc", - "googlemock/src/gmock-internal-utils.cc", - "googlemock/src/gmock-matchers.cc", - "googlemock/src/gmock-spec-builders.cc", - "googlemock/src/gmock.cc", - ] - sources -= [ "googlemock/src/gmock-all.cc" ] + sources = [ "googlemock/src/gmock-all.cc" ] public_configs = [ ":gmock_config" ] configs += [ ":gmock_private_config" ] deps = [ ":gtest" ] diff --git a/shell/platform/fuchsia/flutter/tests/fakes/scenic/fake_flatland_types.h b/shell/platform/fuchsia/flutter/tests/fakes/scenic/fake_flatland_types.h index 531c709f0183e..c03b903c228e1 100644 --- a/shell/platform/fuchsia/flutter/tests/fakes/scenic/fake_flatland_types.h +++ b/shell/platform/fuchsia/flutter/tests/fakes/scenic/fake_flatland_types.h @@ -25,6 +25,9 @@ #include "flutter/fml/macros.h" +namespace fuchsia { +namespace math { + inline bool operator==(const fuchsia::math::SizeU& a, const fuchsia::math::SizeU& b) { return a.width == b.width && a.height == b.height; @@ -56,6 +59,20 @@ inline bool operator==(const fuchsia::math::RectF& a, return a.x == b.x && a.y == b.y && a.width == b.width && a.height == b.height; } +inline bool operator==(const std::optional& a, + const std::optional& b) { + if (a.has_value() != b.has_value()) { + return false; + } + if (!a.has_value()) { + } + return a.value() == b.value(); +} + +} // namespace math + +namespace ui::composition { + inline bool operator==(const fuchsia::ui::composition::ContentId& a, const fuchsia::ui::composition::ContentId& b) { return a.value == b.value; @@ -125,15 +142,8 @@ inline bool operator==( return true; } -inline bool operator==(const std::optional& a, - const std::optional& b) { - if (a.has_value() != b.has_value()) { - return false; - } - if (!a.has_value()) { - } - return a.value() == b.value(); -} +} // namespace ui::composition +} // namespace fuchsia namespace flutter_runner::testing {