summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-27 20:18:04 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-27 20:18:04 +0000
commit55865454c43fbc3b163cff166544ba0a060dcbc4 (patch)
tree66cefeed22a38d19db07e63b315c9f09832d11b2 /testing
parent76525c4a9d2aa6d1f2685d8483e3d491fd361df1 (diff)
downloadpdfium-55865454c43fbc3b163cff166544ba0a060dcbc4.tar.xz
The final game: mark everything final.
Then revert the ones that break compilation. Fix one IWYU noticed during presubmit. Change-Id: I881a8a72818e55dbc4816247e35ff5e3015194e7 Reviewed-on: https://pdfium-review.googlesource.com/41470 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'testing')
-rw-r--r--testing/embedder_test_main.cpp3
-rw-r--r--testing/embedder_test_mock_delegate.h2
-rw-r--r--testing/embedder_test_timer_handling_delegate.h2
-rw-r--r--testing/fake_file_access.cpp6
-rw-r--r--testing/fuzzers/pdf_hint_table_fuzzer.cc4
-rw-r--r--testing/fx_string_testhelpers.h2
-rw-r--r--testing/string_write_stream.h2
-rw-r--r--testing/unit_test_main.cpp2
8 files changed, 12 insertions, 11 deletions
diff --git a/testing/embedder_test_main.cpp b/testing/embedder_test_main.cpp
index 0c3ceb60ce..92990bff28 100644
--- a/testing/embedder_test_main.cpp
+++ b/testing/embedder_test_main.cpp
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <memory>
#include <string>
#include "core/fxcrt/fx_memory.h"
@@ -28,7 +29,7 @@ v8::StartupData* g_v8_snapshot = nullptr;
// The loading time of the CFGAS_FontMgr is linear in the number of times it is
// loaded. So, if a test suite has a lot of tests that need a font manager they
// can end up executing very, very slowly.
-class Environment : public testing::Environment {
+class Environment final : public testing::Environment {
public:
void SetUp() override {
#ifdef PDF_ENABLE_V8
diff --git a/testing/embedder_test_mock_delegate.h b/testing/embedder_test_mock_delegate.h
index 4d43b5c0ec..c3f2820735 100644
--- a/testing/embedder_test_mock_delegate.h
+++ b/testing/embedder_test_mock_delegate.h
@@ -8,7 +8,7 @@
#include "testing/embedder_test.h"
#include "testing/gmock/include/gmock/gmock.h"
-class EmbedderTestMockDelegate : public EmbedderTest::Delegate {
+class EmbedderTestMockDelegate final : public EmbedderTest::Delegate {
public:
MOCK_METHOD1(UnsupportedHandler, void(int type));
MOCK_METHOD4(
diff --git a/testing/embedder_test_timer_handling_delegate.h b/testing/embedder_test_timer_handling_delegate.h
index 31966159eb..31ce1e205d 100644
--- a/testing/embedder_test_timer_handling_delegate.h
+++ b/testing/embedder_test_timer_handling_delegate.h
@@ -13,7 +13,7 @@
#include "testing/embedder_test.h"
#include "testing/test_support.h"
-class EmbedderTestTimerHandlingDelegate : public EmbedderTest::Delegate {
+class EmbedderTestTimerHandlingDelegate final : public EmbedderTest::Delegate {
public:
struct AlertRecord {
std::wstring message;
diff --git a/testing/fake_file_access.cpp b/testing/fake_file_access.cpp
index c69f278102..9e0e6db288 100644
--- a/testing/fake_file_access.cpp
+++ b/testing/fake_file_access.cpp
@@ -14,7 +14,7 @@
namespace {
-class FileAccessWrapper : public FPDF_FILEACCESS {
+class FileAccessWrapper final : public FPDF_FILEACCESS {
public:
explicit FileAccessWrapper(FakeFileAccess* simulator)
: simulator_(simulator) {
@@ -35,7 +35,7 @@ class FileAccessWrapper : public FPDF_FILEACCESS {
fxcrt::UnownedPtr<FakeFileAccess> simulator_;
};
-class FileAvailImpl : public FX_FILEAVAIL {
+class FileAvailImpl final : public FX_FILEAVAIL {
public:
explicit FileAvailImpl(FakeFileAccess* simulator) : simulator_(simulator) {
version = 1;
@@ -53,7 +53,7 @@ class FileAvailImpl : public FX_FILEAVAIL {
fxcrt::UnownedPtr<FakeFileAccess> simulator_;
};
-class DownloadHintsImpl : public FX_DOWNLOADHINTS {
+class DownloadHintsImpl final : public FX_DOWNLOADHINTS {
public:
explicit DownloadHintsImpl(FakeFileAccess* simulator)
: simulator_(simulator) {
diff --git a/testing/fuzzers/pdf_hint_table_fuzzer.cc b/testing/fuzzers/pdf_hint_table_fuzzer.cc
index 50ca5cd693..19b18ac5ed 100644
--- a/testing/fuzzers/pdf_hint_table_fuzzer.cc
+++ b/testing/fuzzers/pdf_hint_table_fuzzer.cc
@@ -22,7 +22,7 @@ int32_t GetData(const int32_t** data32, const uint8_t** data, size_t* size) {
return *ret;
}
-class HintTableForFuzzing : public CPDF_HintTables {
+class HintTableForFuzzing final : public CPDF_HintTables {
public:
HintTableForFuzzing(CPDF_LinearizedHeader* pLinearized,
int shared_hint_table_offset)
@@ -47,7 +47,7 @@ class HintTableForFuzzing : public CPDF_HintTables {
int shared_hint_table_offset_;
};
-class FakeLinearized : public CPDF_LinearizedHeader {
+class FakeLinearized final : public CPDF_LinearizedHeader {
public:
explicit FakeLinearized(CPDF_Dictionary* linearized_dict)
: CPDF_LinearizedHeader(linearized_dict, 0) {}
diff --git a/testing/fx_string_testhelpers.h b/testing/fx_string_testhelpers.h
index a828d825ab..e4ed78d3a4 100644
--- a/testing/fx_string_testhelpers.h
+++ b/testing/fx_string_testhelpers.h
@@ -14,7 +14,7 @@
// Output stream operator so GTEST macros work with CFX_DateTime objects.
std::ostream& operator<<(std::ostream& os, const CFX_DateTime& dt);
-class CFX_InvalidSeekableReadStream : public IFX_SeekableReadStream {
+class CFX_InvalidSeekableReadStream final : public IFX_SeekableReadStream {
public:
template <typename T, typename... Args>
friend RetainPtr<T> pdfium::MakeRetain(Args&&... args);
diff --git a/testing/string_write_stream.h b/testing/string_write_stream.h
index 7d28a8267d..a77e4f0c69 100644
--- a/testing/string_write_stream.h
+++ b/testing/string_write_stream.h
@@ -10,7 +10,7 @@
#include "core/fxcrt/fx_stream.h"
-class StringWriteStream : public IFX_SeekableWriteStream {
+class StringWriteStream final : public IFX_SeekableWriteStream {
public:
StringWriteStream();
~StringWriteStream() override;
diff --git a/testing/unit_test_main.cpp b/testing/unit_test_main.cpp
index 70eb51a3a1..2bc14b9ba4 100644
--- a/testing/unit_test_main.cpp
+++ b/testing/unit_test_main.cpp
@@ -26,7 +26,7 @@ namespace {
// The loading time of the CFGAS_FontMgr is linear in the number of times it is
// loaded. So, if a test suite has a lot of tests that need a font manager they
// can end up executing very, very slowly.
-class Environment : public testing::Environment {
+class Environment final : public testing::Environment {
public:
void SetUp() override {
// TODO(dsinclair): This font loading is slow. We should make a test font