summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2018-09-20 21:30:06 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-09-20 21:30:06 +0000
commite65756725f82456fced473d444961673ad7b3edb (patch)
treee7163b798d28668bfe6fb0cf9fc40b8f1e816905
parent4bf804086c4f08c7d5959dd9c08d998b546bbc4b (diff)
downloadpdfium-chromium/3559.tar.xz
Make some methods const in XFAJSEmbedderTestchromium/3560chromium/3559chromium/3558
This CL addresses the published draft comment from https://pdfium-review.googlesource.com/c/pdfium/+/5691/ Change-Id: I7a2cd9aa5dbdde18cadb82cbef70f0e8820cc276 Reviewed-on: https://pdfium-review.googlesource.com/42871 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
-rw-r--r--testing/embedder_test.h4
-rw-r--r--testing/xfa_js_embedder_test.cpp2
-rw-r--r--testing/xfa_js_embedder_test.h4
3 files changed, 5 insertions, 5 deletions
diff --git a/testing/embedder_test.h b/testing/embedder_test.h
index ef4fe02721..64707631b5 100644
--- a/testing/embedder_test.h
+++ b/testing/embedder_test.h
@@ -81,8 +81,8 @@ class EmbedderTest : public ::testing::Test,
delegate_ = delegate ? delegate : default_delegate_.get();
}
- FPDF_DOCUMENT document() { return document_; }
- FPDF_FORMHANDLE form_handle() { return form_handle_; }
+ FPDF_DOCUMENT document() const { return document_; }
+ FPDF_FORMHANDLE form_handle() const { return form_handle_; }
// Create an empty document, and its form fill environment. Returns true
// on success or false on failure.
diff --git a/testing/xfa_js_embedder_test.cpp b/testing/xfa_js_embedder_test.cpp
index 97009f34c2..8d2f64eaa7 100644
--- a/testing/xfa_js_embedder_test.cpp
+++ b/testing/xfa_js_embedder_test.cpp
@@ -43,7 +43,7 @@ void XFAJSEmbedderTest::TearDown() {
isolate_ = nullptr;
}
-CXFA_Document* XFAJSEmbedderTest::GetXFADocument() {
+CXFA_Document* XFAJSEmbedderTest::GetXFADocument() const {
auto* pDoc = CPDFDocumentFromFPDFDocument(document());
if (!pDoc)
return nullptr;
diff --git a/testing/xfa_js_embedder_test.h b/testing/xfa_js_embedder_test.h
index 27dddc3084..3534280676 100644
--- a/testing/xfa_js_embedder_test.h
+++ b/testing/xfa_js_embedder_test.h
@@ -31,12 +31,12 @@ class XFAJSEmbedderTest : public EmbedderTest {
JavaScriptOption javascript_option) override;
v8::Isolate* GetIsolate() const { return isolate_; }
- CXFA_Document* GetXFADocument();
+ CXFA_Document* GetXFADocument() const;
bool Execute(const ByteStringView& input);
bool ExecuteSilenceFailure(const ByteStringView& input);
- CFXJSE_Engine* GetScriptContext() { return script_context_; }
+ CFXJSE_Engine* GetScriptContext() const { return script_context_; }
CFXJSE_Value* GetValue() const { return value_.get(); }
private: