Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Unified Diff: fpdfsdk/src/fpdfedit_embeddertest.cpp

Issue 1561303002: Disentangle fpdfsave_embeddertest's FPDF_FILEWRITE, use gmock matchers. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | fpdfsdk/src/fpdfsave_embeddertest.cpp » ('j') | testing/test_support.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfedit_embeddertest.cpp
diff --git a/fpdfsdk/src/fpdfedit_embeddertest.cpp b/fpdfsdk/src/fpdfedit_embeddertest.cpp
index 9db948cd1f23b5f3628c6755f8da45c2473527f3..ce022fa91cc2a2ff977ec326e2d530af49239e3b 100644
--- a/fpdfsdk/src/fpdfedit_embeddertest.cpp
+++ b/fpdfsdk/src/fpdfedit_embeddertest.cpp
@@ -5,14 +5,18 @@
#include "public/fpdf_edit.h"
#include "public/fpdfview.h"
#include "testing/embedder_test.h"
+#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/test_support.h"
-class FPDFEditEmbeddertest : public EmbedderTest {};
+class FPDFEditEmbeddertest : public EmbedderTest, public TestSaver {};
TEST_F(FPDFEditEmbeddertest, EmptyCreation) {
EXPECT_TRUE(CreateEmptyDocument());
FPDF_PAGE page = FPDFPage_New(document(), 1, 640.0, 480.0);
EXPECT_NE(nullptr, page);
EXPECT_TRUE(FPDFPage_GenerateContent(page));
+ EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0));
+ EXPECT_THAT(GetString(), testing::StartsWith("%PDF-1.7\r\n"));
FPDFPage_Delete(document(), 1);
}
« no previous file with comments | « no previous file | fpdfsdk/src/fpdfsave_embeddertest.cpp » ('j') | testing/test_support.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698