18 Commits

Author SHA1 Message Date
Lei Zhang
b68f6ed42a Add no_exit_time_destructors config to googletest
Add the no_exit_time_destructors config to
third_party/googletest/BUILD.gn, as parts of googletest will trigger
-Wexit-time-destructors warnings if enabled.

This is effectively the same CL as https://crrev.com/c/7682299 in
Chromium. Standalone PDFium does not have -Wexit-time-destructors
enabled right now, but may in the near future. This prepares for that.

Change-Id: I5d688af1963fdcea49fdbcd3e4a78036afbb1635
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/145110
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
2026-03-19 11:19:54 -07:00
Lei Zhang
f32695da8e Remove MSVC-specific code
Bug: 389951208
Change-Id: Idd870fa9621c4164764b10e0cd7ca678fc8bc4a7
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/127990
Reviewed-by: Thomas Sepez <tsepez@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@google.com>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
2025-02-05 19:01:55 -08:00
Lei Zhang
838e98ef87 Fully remove googletest absl support
Follow up on https://pdfium-review.googlesource.com/117355 and do a bit
more cleanup. This diverges from Chromium, which added back gtest absl
support in https://crrev.com/1273784, but doing so would require also
checking out a copy of RE2. Since PDFium does not use RE2, adding a
test-only dependency is probably not worth the trouble.

Change-Id: I8d462e6c812fe87bed79f258aab0af7767e18d8f
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/122930
Reviewed-by: Tom Sepez <tsepez@google.com>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
2024-08-01 00:08:56 +00:00
Lei Zhang
6fa344b5e3 Roll third_party/googletest/src/ af29db7ec..e4fdb87e7 (411 commits)
Update gtest_port_wrapper.cc so it builds with modern GoogleTest. Follow
Chromium's changes and omit the GTEST_HAS_ABSL define to make this
build. Also follow Chromium's changes and temporarily add gmock/gtest to
GN's no_check_targets list.

af29db7ec2..e4fdb87e76

Created with:
  roll-dep third_party/googletest/src

Change-Id: I9ea694f3357d43d3192b8f830ad394143db57bfe
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117355
Reviewed-by: Thomas Sepez <tsepez@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
2024-03-11 20:39:12 +00:00
Lei Zhang
67963ba70d Remove Fuchsia support
No longer needed.

Bug: pdfium:1775,pdfium:2019
Change-Id: I942944e54b115eda67158a772bc1dfb8632c9edb
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/116630
Reviewed-by: Thomas Sepez <tsepez@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
2024-02-16 16:49:28 +00:00
Lei Zhang
5c8b497cd1 Unconditionally enable absl support in googletest
Same as crrev.com/1232942

Change-Id: I3ccdc42e8ec1e13edbe2ccb57dc1458a11bcf83c
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/114430
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Auto-Submit: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
2023-12-06 17:01:27 +00:00
Lei Zhang
0b74b9a8f1 Forward declare ByteString in the custom gtest-printers.h
Since a forward declaration is sufficient, just use that and avoid
breaking the "all" target. Albeit the "all" target is not supported.

Bug: chromium:1447523
Change-Id: I7ca7b89c8aff3eb0d926e64088846a94b88d3415
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/107910
Reviewed-by: K. Moon <kmoon@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
2023-05-22 18:13:59 +00:00
Lei Zhang
7ef2ee3561 Teach googletest about C-string to ByteString comparisons
Add custom gtest printer code to treat the C-string in a C-string to
ByteString comparison as a string instead of a pointer.

Change-Id: I9b496da300dd134c4e3a8ee626939c70815a6c8f
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/107135
Reviewed-by: K. Moon <kmoon@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
2023-05-05 23:02:13 +00:00
K. Moon
832a694e52 Update old-style copyright headers
Updates old-style copyright headers to the new style, by removing "All
rights reserved." Also inserts "The" before "PDFium Authors", which is
required by both styles.

Mechanically generated by this command:
  PATTERN='Copyright \([0-9]\+\) \(The \)\?PDFium Authors. All rights reserved.'
  git grep -l "$PATTERN" \
  | xargs sed "s/$PATTERN/Copyright \1 The PDFium Authors/" -i''

Fixed: pdfium:1884
Change-Id: I6f781d811df8839e2e21b85f716529b813828bcd
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/100371
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
2022-10-31 20:11:31 +00:00
K. Moon
17c729862e Roll third_party/googletest/src/ c9643a2e4..25ad42aab (18 commits)
c9643a2e45..25ad42aabe

Updates //third_party/googletest/BUILD.gn to include the new
gtest-assertion-result.{h,cc} files.

Created with:
  roll-dep third_party/googletest/src

Change-Id: I494094c95e65762ccd42ec43318b427fd3197d7b
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90324
Auto-Submit: K. Moon <kmoon@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
2022-02-04 22:21:38 +00:00
Lei Zhang
a58392464a Sync gtest/gmock build configs to Chromium's.
Sync to https://crrev.com/921126, minus some WebRTC-specific bits.
This is required to pass GN check in the near future.

This also adds support for gtest_enable_absl_printers.

Change-Id: I950fb2bdb9761c7f79f767718e50e99cbf784512
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/85728
Reviewed-by: Hui Yingst <nigi@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
2021-10-08 23:58:19 +00:00
Hui Yingst
de29e6eac5 Roll third_party/googletest/src/ 1b0cdaae5..6c5c4554a (227 commits)
1b0cdaae57..6c5c4554ac

Created with:
  roll-dep third_party/googletest/src

Change-Id: I36b23c33b78a0cc7cd53d41a870175303ab4ad05
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/78490
Commit-Queue: Hui Yingst <nigi@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
2021-04-02 21:25:14 +00:00
Lei Zhang
893a649682 Remove custom gmock-port.h.
It works around a problem that is not applicable to PDFium.

This is the same change as https://crrev.com/800817

Change-Id: Ibbb01d0c828175ace79302f4c8fd84c96f99c27e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/73173
Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
2020-08-27 22:44:48 +00:00
Lei Zhang
bf2dff27aa Sync gtest/gmock with Chromium's copy.
Copy over relevant files that are in Chromium's googletest, but not
PDFium's. Delete references to files that no longer exist. With these
changes, testing/gtest can pass "gn check".

Bug: pdfium:1580
Change-Id: Ia56857197c55a6fe55f26b7de91ccd9f37164730
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72991
Reviewed-by: Daniel Hosseinian <dhoss@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
2020-08-22 00:44:32 +00:00
Lei Zhang
40f9d72273 Reformat PDFium GN files.
`gn format` recently changed its formatting behavior for deps, source,
and a few other elements when they are assigned (with =) single-element
lists to be consistent with the formatting of updates (with +=) with
single-element.

Now that we've rolled in a GN binary with the change, reformat all files
so that people don't get presubmit warnings due to this.

Bug: chromium:1041419
Tbr: thakis@chromium.org
Change-Id: I879c199419bdd2a9fe09ab09d1a0ce6e178b4fee
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/65531
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
2020-01-24 00:18:11 +00:00
Felix Kauselmann
25d9272255 Pdfium_unittests: Fix undefined reference to testing::Matcher
The pdfium_unittest target currently fails to build because of an
undefined reference to gtest's matchers.

Fix this by including gtest-matchers.{h,cpp} in gtest's source_set.

Change-Id: I4dffd1e924cc48b013504dcdfdf7b702c47b4780
Reviewed-on: https://pdfium-review.googlesource.com/c/50451
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
2019-02-12 03:57:01 +00:00
Lei Zhang
00721f053a Roll third_party/googletest/src/ a325ad2db..4bd8c4638 (125 commits)
a325ad2db5..4bd8c4638a

Created with:
  roll-dep third_party/googletest/src

Change-Id: I963e0b39119ab564754a81d20c38b5641b9230b5
Reviewed-on: https://pdfium-review.googlesource.com/31130
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-25 18:13:21 +00:00
Lei Zhang
c551427609 Update gtest and gmock to 1.8.x.
This applies parts of https://crrev.com/469551 and
https://crrev.com/471303 to PDFium.

Change-Id: Ifbb8e4c300bd276fe3c6fe60d19ebb1618be8936
Reviewed-on: https://pdfium-review.googlesource.com/28791
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-03-22 05:19:14 +00:00