diff options
author | Jun Fang <jun_fang@foxitsoftware.com> | 2015-11-25 12:31:38 +0800 |
---|---|---|
committer | Jun Fang <jun_fang@foxitsoftware.com> | 2015-11-25 12:31:38 +0800 |
commit | 8d89e65897d8b6cf7899e7a82d9d381c3ad327cb (patch) | |
tree | 15787bd7cae48504556175c2957ce9c09c2c1bf5 /fpdfsdk/src/fpdfview_embeddertest.cpp | |
parent | c70b19aad245fb1ed39bf8c264d991555f4c5a58 (diff) | |
download | pdfium-8d89e65897d8b6cf7899e7a82d9d381c3ad327cb.tar.xz |
Fix embedder test failures introduced by commit c70b19aad245
BUG=pdfium:275
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1443603002.
Review URL: https://codereview.chromium.org/1477693002 .
Diffstat (limited to 'fpdfsdk/src/fpdfview_embeddertest.cpp')
-rw-r--r-- | fpdfsdk/src/fpdfview_embeddertest.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fpdfsdk/src/fpdfview_embeddertest.cpp b/fpdfsdk/src/fpdfview_embeddertest.cpp index 35da9b6caf..2606dc7a0e 100644 --- a/fpdfsdk/src/fpdfview_embeddertest.cpp +++ b/fpdfsdk/src/fpdfview_embeddertest.cpp @@ -56,10 +56,10 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) { buffer_size = 2000000; // Absurdly large, check not used for this case. dest = FPDF_GetNamedDest(document(), 0, nullptr, &buffer_size); EXPECT_NE(nullptr, dest); - EXPECT_EQ(12u, buffer_size); + EXPECT_EQ(10u, buffer_size); // Try to retrieve the first item with too small a buffer. - buffer_size = 10; + buffer_size = 8; dest = FPDF_GetNamedDest(document(), 0, fixed_buffer, &buffer_size); EXPECT_NE(nullptr, dest); EXPECT_EQ(-1, buffer_size); @@ -69,8 +69,8 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) { buffer_size = 12; dest = FPDF_GetNamedDest(document(), 0, fixed_buffer, &buffer_size); EXPECT_NE(nullptr, dest); - EXPECT_EQ(12u, buffer_size); - EXPECT_EQ(std::string("F\0i\0r\0s\0t\0\0\0", 12), + EXPECT_EQ(10u, buffer_size); + EXPECT_EQ(std::string("F\0i\0r\0s\0t\0", 10), std::string(fixed_buffer, buffer_size)); // Try to retrieve the second item with ample buffer. Item is taken @@ -78,8 +78,8 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) { buffer_size = sizeof(fixed_buffer); dest = FPDF_GetNamedDest(document(), 1, fixed_buffer, &buffer_size); EXPECT_NE(nullptr, dest); - EXPECT_EQ(10u, buffer_size); - EXPECT_EQ(std::string("N\0e\0x\0t\0\0\0", 10), + EXPECT_EQ(8u, buffer_size); + EXPECT_EQ(std::string("N\0e\0x\0t\0", 8), std::string(fixed_buffer, buffer_size)); // Try to retrieve third item with ample buffer. Item is taken @@ -102,8 +102,8 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) { buffer_size = sizeof(fixed_buffer); dest = FPDF_GetNamedDest(document(), 4, fixed_buffer, &buffer_size); EXPECT_NE(nullptr, dest); - EXPECT_EQ(30u, buffer_size); - EXPECT_EQ(std::string("F\0i\0r\0s\0t\0A\0l\0t\0e\0r\0n\0a\0t\0e\0\0\0", 30), + EXPECT_EQ(28u, buffer_size); + EXPECT_EQ(std::string("F\0i\0r\0s\0t\0A\0l\0t\0e\0r\0n\0a\0t\0e\0", 28), std::string(fixed_buffer, buffer_size)); // Try to retrieve sixth item with ample buffer. Item istaken from the @@ -112,8 +112,8 @@ TEST_F(FPDFViewEmbeddertest, NamedDests) { buffer_size = sizeof(fixed_buffer); dest = FPDF_GetNamedDest(document(), 5, fixed_buffer, &buffer_size); EXPECT_NE(nullptr, dest); - EXPECT_EQ(28u, buffer_size); - EXPECT_EQ(std::string("L\0a\0s\0t\0A\0l\0t\0e\0r\0n\0a\0t\0e\0\0\0", 28), + EXPECT_EQ(26u, buffer_size); + EXPECT_EQ(std::string("L\0a\0s\0t\0A\0l\0t\0e\0r\0n\0a\0t\0e\0", 26), std::string(fixed_buffer, buffer_size)); // Try to retrieve non-existent item with ample buffer. |