21 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_IMAGE_TEST_BASE_H_
22 #define NET_INSTAWEB_REWRITER_PUBLIC_IMAGE_TEST_BASE_H_
26 #include "pagespeed/kernel/base/basictypes.h"
27 #include "pagespeed/kernel/base/gtest.h"
28 #include "pagespeed/kernel/base/mock_message_handler.h"
29 #include "pagespeed/kernel/base/mock_timer.h"
30 #include "pagespeed/kernel/base/null_mutex.h"
31 #include "pagespeed/kernel/base/scoped_ptr.h"
32 #include "pagespeed/kernel/base/stdio_file_system.h"
33 #include "pagespeed/kernel/base/string.h"
34 #include "pagespeed/kernel/http/image_types.pb.h"
36 namespace net_instaweb {
40 static const char kTestData[];
41 static const char kAppSegments[];
42 static const char kBikeCrash[];
43 static const char kCradle[];
44 static const char kCuppa[];
45 static const char kCuppaTransparent[];
46 static const char kIronChef[];
47 static const char kLarge[];
48 static const char kPuzzle[];
49 static const char kRedbrush[];
50 static const char kScenery[];
51 static const char kTransparent[];
53 typedef scoped_ptr<Image> ImagePtr;
56 timer_(
new NullMutex, 0),
57 message_handler_(
new NullMutex) {
65 const GoogleString& name,
66 const GoogleString& contents,
72 const char* name, GoogleString* contents,
78 const char* filename, GoogleString* buffer,
82 StdioFileSystem file_system_;
83 MockMessageHandler message_handler_;
Definition: image_test_base.h:38
Image * ImageFromString(ImageType output_type, const GoogleString &name, const GoogleString &contents, bool progressive)
Image * ReadFromFileWithOptions(const char *name, GoogleString *contents, Image::CompressionOptions *options)
Image * ReadImageFromFile(ImageType output_type, const char *filename, GoogleString *buffer, bool progressive)