summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_cross_ref_avail_unittest.cpp
AgeCommit message (Collapse)Author
2018-08-14Remove CFX_BufferSeekableReadStream.Lei Zhang
Replace it with CFX_ReadOnlyMemoryStream, which does the same thing. Take some checks from CFX_BufferSeekableReadStream and add them CFX_ReadOnlyMemoryStream. Change-Id: I25554c3aec3ec96967f8df16ca68a64dba121b6f Reviewed-on: https://pdfium-review.googlesource.com/40070 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-25Change CFX_BufferSeekableReadStream to take a span.Lei Zhang
Change-Id: Ib9e20fdfc637b2ba0358586e23ad72454b0b8ad1 Reviewed-on: https://pdfium-review.googlesource.com/38851 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-07-25Move CPDF_SyntaxParser init methods into ctor.Lei Zhang
- CPDF_SyntaxParser can no longer be initialized multiple times. - Make the file length and header offset const. - Make the header offset type FX_FILESIZE consistently. - Simplify for the common case where the header offset is 0. Change-Id: I7138db1fbcec3b7578b0239b92fc1154fa4dc4ce Reviewed-on: https://pdfium-review.googlesource.com/38850 Reviewed-by: Art Snake <art-snake@yandex-team.ru> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-06-04Clean up of comment from post-submitRyan Harrison
Landed https://pdfium-review.googlesource.com/c/pdfium/+/33592 without addressing some comments that appeared after I sent it to CQ, this addresses them. Change-Id: Ic9c4d81328aafee6ff8431460c5b8b674e25ad38 Reviewed-on: https://pdfium-review.googlesource.com/33712 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-06-01Remove unused assignments in test codeRyan Harrison
prev_offset is written multiple times through out CPDF_CrossRefAvailTest, but not read until it is written again. Removing this unused intermediate writes. Issues found with Clang Static Analyzer. Change-Id: I980263b8be7f691c030e937a05f248fd9b133fb4 Reviewed-on: https://pdfium-review.googlesource.com/33592 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-11-02Refactoring of cross refs availability check.Artem Strygin
Use CPDF_CrossRefAvail to check crossrefs. Change-Id: Ia333cff4e86eaab5bad17424c1bb8ef9bdbca8ff Reviewed-on: https://pdfium-review.googlesource.com/15510 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>