diff options
author | Oliver Chang <ochang@chromium.org> | 2015-12-08 16:12:25 -0800 |
---|---|---|
committer | Oliver Chang <ochang@chromium.org> | 2015-12-08 16:12:25 -0800 |
commit | 8e7ed1a7759eb067063e3a52cf9efa80b8fc629b (patch) | |
tree | 3d066dbde09abec7b982258a2a3d42279811487e /fpdfsdk/src/fpdfview_embeddertest.cpp | |
parent | b3ea5b41a3f472fe2b3ecf68129382b51ede6c3a (diff) | |
download | pdfium-8e7ed1a7759eb067063e3a52cf9efa80b8fc629b.tar.xz |
Revert "Merge to master: Take Jun's UTF16LE patches."chromium/2587chromium/2586
Broke chrome bindings.
This reverts commit c3e4ae5fe5067723b58a2029a95c6411c92bed15.
R=thestig@chromium.org, tsepez@chromium.org
BUG=567485
Review URL: https://codereview.chromium.org/1511773002 .
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 2606dc7a0e..35da9b6caf 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(10u, buffer_size); + EXPECT_EQ(12u, buffer_size); // Try to retrieve the first item with too small a buffer. - buffer_size = 8; + buffer_size = 10; 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(10u, buffer_size); - EXPECT_EQ(std::string("F\0i\0r\0s\0t\0", 10), + EXPECT_EQ(12u, buffer_size); + EXPECT_EQ(std::string("F\0i\0r\0s\0t\0\0\0", 12), 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(8u, buffer_size); - EXPECT_EQ(std::string("N\0e\0x\0t\0", 8), + EXPECT_EQ(10u, buffer_size); + EXPECT_EQ(std::string("N\0e\0x\0t\0\0\0", 10), 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(28u, buffer_size); - EXPECT_EQ(std::string("F\0i\0r\0s\0t\0A\0l\0t\0e\0r\0n\0a\0t\0e\0", 28), + 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), 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(26u, buffer_size); - EXPECT_EQ(std::string("L\0a\0s\0t\0A\0l\0t\0e\0r\0n\0a\0t\0e\0", 26), + 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), std::string(fixed_buffer, buffer_size)); // Try to retrieve non-existent item with ample buffer. |