summaryrefslogtreecommitdiff
path: root/testing/embedder_test.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-12-20 19:40:50 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-20 19:40:50 +0000
commit208eecfa7850ced5c0d776b9e5df5b104428608f (patch)
tree7c5b94d642c37670ef3419ae922339c54d1742c5 /testing/embedder_test.cpp
parente75538b44dc0afd1951a29d4574a8bdb11ca336f (diff)
downloadpdfium-208eecfa7850ced5c0d776b9e5df5b104428608f.tar.xz
Avoid default arguments in EmbedderTest::OpenDocument().chromium/3300
Default arguments are banned on virtual functions. Remove default arguments and rename OpenDocument() to OpenDocumentWithOptions(). Add wrappers for OpenDocumentWithOptions() to call it with sensible options. Change-Id: I4955d88cf77a7eab1771692ea3d6a18260b52900 Reviewed-on: https://pdfium-review.googlesource.com/21891 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'testing/embedder_test.cpp')
-rw-r--r--testing/embedder_test.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp
index bb202bff1c..ccc98b4dcd 100644
--- a/testing/embedder_test.cpp
+++ b/testing/embedder_test.cpp
@@ -131,9 +131,22 @@ bool EmbedderTest::CreateEmptyDocument() {
return true;
}
-bool EmbedderTest::OpenDocument(const std::string& filename,
- const char* password,
- bool must_linearize) {
+bool EmbedderTest::OpenDocument(const std::string& filename) {
+ return OpenDocumentWithOptions(filename, nullptr, false);
+}
+
+bool EmbedderTest::OpenDocumentLinearized(const std::string& filename) {
+ return OpenDocumentWithOptions(filename, nullptr, true);
+}
+
+bool EmbedderTest::OpenDocumentWithPassword(const std::string& filename,
+ const char* password) {
+ return OpenDocumentWithOptions(filename, password, false);
+}
+
+bool EmbedderTest::OpenDocumentWithOptions(const std::string& filename,
+ const char* password,
+ bool must_linearize) {
std::string file_path;
if (!PathService::GetTestFilePath(filename, &file_path))
return false;