summaryrefslogtreecommitdiff
path: root/testing/embedder_test.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-02-05 21:13:51 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-05 21:13:51 +0000
commit0729be26d745e2ea713908eb9040e2be7c40c96b (patch)
tree87d3010e209b5b46d8632145c882a0d0d2ef7e40 /testing/embedder_test.h
parent3355f459ecd2207c0cd1719c2cdafa15eea87bf6 (diff)
downloadpdfium-0729be26d745e2ea713908eb9040e2be7c40c96b.tar.xz
Make EmbedderTest class member style consistent.
The class started with |foo_bar_| but now has a mixture of |foo_bar_| and |m_FooBar|. Change them all to |foo_bar_|. While making this change, also initialize the members in the header when possible. Change-Id: I202ff5dc5e945175ad4da2f3245724f3493aa8aa Reviewed-on: https://pdfium-review.googlesource.com/25390 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'testing/embedder_test.h')
-rw-r--r--testing/embedder_test.h39
1 files changed, 21 insertions, 18 deletions
diff --git a/testing/embedder_test.h b/testing/embedder_test.h
index 98432e3e54..b36ac06a89 100644
--- a/testing/embedder_test.h
+++ b/testing/embedder_test.h
@@ -146,8 +146,8 @@ class EmbedderTest : public ::testing::Test,
int expected_height,
const char* expected_md5sum);
- void ClearString() { m_String.clear(); }
- const std::string& GetString() const { return m_String; }
+ void ClearString() { data_string_.clear(); }
+ const std::string& GetString() const { return data_string_; }
static int GetBlockFromString(void* param,
unsigned long pos,
@@ -167,25 +167,28 @@ class EmbedderTest : public ::testing::Test,
void SetWholeFileAvailable();
- Delegate* delegate_;
std::unique_ptr<Delegate> default_delegate_;
- FPDF_DOCUMENT document_;
- FPDF_FORMHANDLE form_handle_;
- FPDF_AVAIL avail_;
- FPDF_FILEACCESS file_access_; // must outlive avail_.
- void* external_isolate_;
- TestLoader* loader_;
- size_t file_length_;
+ Delegate* delegate_;
+
+ FPDF_DOCUMENT document_ = nullptr;
+ FPDF_FORMHANDLE form_handle_ = nullptr;
+ FPDF_AVAIL avail_ = nullptr;
+ FPDF_FILEACCESS file_access_; // must outlive |avail_|.
+ std::unique_ptr<FakeFileAccess> fake_file_access_; // must outlive |avail_|.
+
+ void* external_isolate_ = nullptr;
+ TestLoader* loader_ = nullptr;
+ size_t file_length_ = 0;
std::unique_ptr<char, pdfium::FreeDeleter> file_contents_;
std::map<int, FPDF_PAGE> page_map_;
std::map<FPDF_PAGE, int> page_reverse_map_;
- FPDF_DOCUMENT m_SavedDocument;
- FPDF_FORMHANDLE m_SavedForm;
- FPDF_AVAIL m_SavedAvail;
- FPDF_FILEACCESS saved_file_access_; // must outlive m_SavedAvail.
- std::unique_ptr<FakeFileAccess> fake_file_access_; // must outlive avail_.
- std::unique_ptr<FakeFileAccess>
- saved_fake_file_access_; // must outlive m_SavedAvail.
+
+ FPDF_DOCUMENT saved_document_ = nullptr;
+ FPDF_FORMHANDLE saved_form_handle_ = nullptr;
+ FPDF_AVAIL saved_avail_ = nullptr;
+ FPDF_FILEACCESS saved_file_access_; // must outlive |saved_avail_|.
+ // must outlive |saved_avail_|.
+ std::unique_ptr<FakeFileAccess> saved_fake_file_access_;
private:
static void UnsupportedHandlerTrampoline(UNSUPPORT_INFO*, int type);
@@ -205,7 +208,7 @@ class EmbedderTest : public ::testing::Test,
const void* data,
unsigned long size);
- std::string m_String;
+ std::string data_string_;
};
#endif // TESTING_EMBEDDER_TEST_H_