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

Side by Side Diff: core/fxge/dib/fx_dib_engine_unittest.cpp

Issue 2383543002: Move core/fpdfapi/fpdf_parser/include to core/fpdfapi/fpdf_parser (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « core/fxcodec/jbig2/JBig2_Context.cpp ('k') | core/fxge/ge/cfx_graphstate.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 6
7 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" 7 #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h"
8 #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h" 8 #include "core/fpdfapi/fpdf_parser/cpdf_number.h"
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" 9 #include "core/fpdfapi/fpdf_parser/cpdf_stream.h"
10 #include "core/fpdfapi/fpdf_render/render_int.h" 10 #include "core/fpdfapi/fpdf_render/render_int.h"
11 #include "core/fxcrt/include/fx_memory.h" 11 #include "core/fxcrt/include/fx_memory.h"
12 #include "core/fxge/dib/dib_int.h" 12 #include "core/fxge/dib/dib_int.h"
13 #include "core/fxge/include/fx_dib.h" 13 #include "core/fxge/include/fx_dib.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 TEST(CStretchEngine, OverflowInCtor) { 16 TEST(CStretchEngine, OverflowInCtor) {
17 FX_RECT clip_rect; 17 FX_RECT clip_rect;
18 std::unique_ptr<CPDF_Dictionary, ReleaseDeleter<CPDF_Dictionary>> dict_obj( 18 std::unique_ptr<CPDF_Dictionary, ReleaseDeleter<CPDF_Dictionary>> dict_obj(
19 new CPDF_Dictionary(CFX_WeakPtr<CFX_ByteStringPool>())); 19 new CPDF_Dictionary(CFX_WeakPtr<CFX_ByteStringPool>()));
20 dict_obj->SetFor("Width", new CPDF_Number(71000)); 20 dict_obj->SetFor("Width", new CPDF_Number(71000));
21 dict_obj->SetFor("Height", new CPDF_Number(12500)); 21 dict_obj->SetFor("Height", new CPDF_Number(12500));
22 std::unique_ptr<CPDF_Stream, ReleaseDeleter<CPDF_Stream>> stream( 22 std::unique_ptr<CPDF_Stream, ReleaseDeleter<CPDF_Stream>> stream(
23 new CPDF_Stream(nullptr, 0, dict_obj.release())); 23 new CPDF_Stream(nullptr, 0, dict_obj.release()));
24 CPDF_DIBSource dib_source; 24 CPDF_DIBSource dib_source;
25 dib_source.Load(nullptr, stream.get(), nullptr, nullptr, nullptr, nullptr, 25 dib_source.Load(nullptr, stream.get(), nullptr, nullptr, nullptr, nullptr,
26 false, 0, false); 26 false, 0, false);
27 CStretchEngine engine(nullptr, FXDIB_8bppRgb, 500, 500, clip_rect, 27 CStretchEngine engine(nullptr, FXDIB_8bppRgb, 500, 500, clip_rect,
28 &dib_source, 0); 28 &dib_source, 0);
29 EXPECT_EQ(FXDIB_INTERPOL, engine.m_Flags); 29 EXPECT_EQ(FXDIB_INTERPOL, engine.m_Flags);
30 } 30 }
OLDNEW
« no previous file with comments | « core/fxcodec/jbig2/JBig2_Context.cpp ('k') | core/fxge/ge/cfx_graphstate.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698