Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Functions | Variables
test_utils.h File Reference
#include <cstddef>
#include "pagespeed/kernel/base/basictypes.h"
#include "pagespeed/kernel/base/string.h"
#include "pagespeed/kernel/base/string_util.h"
#include "pagespeed/kernel/image/image_util.h"

Go to the source code of this file.

Classes

struct  pagespeed::image_compression::ImageCompressionInfo
 
struct  pagespeed::image_compression::GoldImageCompressionInfo
 

Namespaces

 net_instaweb
 Unit-test framework for wget fetcher.
 
 pagespeed
 for size_t
 

Functions

bool pagespeed::image_compression::ReadFile (const GoogleString &file_name, GoogleString *content)
 
bool pagespeed::image_compression::ReadTestFile (const GoogleString &path, const char *name, const char *extension, GoogleString *content)
 
bool pagespeed::image_compression::ReadTestFileWithExt (const GoogleString &path, const char *name_with_extension, GoogleString *content)
 
void pagespeed::image_compression::DecodeAndCompareImages (pagespeed::image_compression::ImageFormat image_format1, const void *image_buffer1, size_t buffer_length1, pagespeed::image_compression::ImageFormat image_format2, const void *image_buffer2, size_t buffer_length2, bool ignore_transparent_rgb, MessageHandler *message_handler)
 
void pagespeed::image_compression::DecodeAndCompareImagesByPSNR (pagespeed::image_compression::ImageFormat image_format1, const void *image_buffer1, size_t buffer_length1, pagespeed::image_compression::ImageFormat image_format2, const void *image_buffer2, size_t buffer_length2, double min_psnr, bool ignore_transparent_rgb, bool expand_colors, MessageHandler *message_handler)
 
void pagespeed::image_compression::CompareImageReaders (ScanlineReaderInterface *reader1, ScanlineReaderInterface *reader2)
 Check whether the readers decode to exactly the same pixels.
 
void pagespeed::image_compression::CompareImageRegions (const uint8_t *image1, PixelFormat format1, int bytes_per_row1, int col1, int row1, const uint8_t *image2, PixelFormat format2, int bytes_per_row2, int col2, int row2, int num_cols, int num_rows, MessageHandler *handler)
 
void pagespeed::image_compression::ComparePixelsByPSNR (const uint8_t *image1, const uint8_t *image2, PixelFormat format, int num_rows, int num_cols, double min_psnr, bool ignore_transparent_rgb, MessageHandler *handler)
 
void pagespeed::image_compression::CompareImageRegionsByPSNR (const uint8_t *image1, PixelFormat format1, int bytes_per_row1, int col1, int row1, const uint8_t *image2, PixelFormat format2, int bytes_per_row2, int col2, int row2, int num_cols, int num_rows, double min_psnr, bool ignore_transparent_rgb, bool expand_colors, MessageHandler *handler)
 
void pagespeed::image_compression::SynthesizeImage (int width, int height, int bytes_per_line, int num_channels, const uint8_t *seed_value, const int *delta_x, const int *delta_y, uint8_t *image)
 
GoogleString pagespeed::image_compression::PixelRgbaChannelsToString (const uint8_t *const channels)
 
uint32_t pagespeed::image_compression::PackAsRgba (uint8_t alpha, uint8_t red, uint8_t green, uint8_t blue)
 Packs the given A, R, G, B values into a single RGBA uint32.
 
uint32_t pagespeed::image_compression::RgbaToPackedRgba (const PixelRgbaChannels rgba)
 
bool pagespeed::image_compression::CompareAnimatedImages (const GoogleString &expected_image_filename, const GoogleString &actual_image_content, MessageHandler *message_handler)
 Returns true if 2 animated images are identical.
 

Variables

const char pagespeed::image_compression::kTestRootDir [] = "/pagespeed/kernel/image/testdata/"
 
const char pagespeed::image_compression::kGifTestDir [] = "gif/"
 Directory for test data.
 
const char pagespeed::image_compression::kJpegTestDir [] = "jpeg/"
 
const char pagespeed::image_compression::kPngSuiteGifTestDir [] = "pngsuite/gif/"
 
const char pagespeed::image_compression::kPngSuiteTestDir [] = "pngsuite/"
 
const char pagespeed::image_compression::kPngTestDir [] = "png/"
 
const char pagespeed::image_compression::kWebpTestDir [] = "webp/"
 
const char pagespeed::image_compression::kResizedTestDir [] = "resized/"
 
const char pagespeed::image_compression::kMessagePatternAnimatedGif []
 Message to ignore. More...
 
const char pagespeed::image_compression::kMessagePatternFailedToOpen [] = "*Failed to open*"
 
const char pagespeed::image_compression::kMessagePatternFailedToRead [] = "*Failed to read*"
 
const char pagespeed::image_compression::kMessagePatternLibJpegFailure [] = "*libjpeg failed to*"
 
const char pagespeed::image_compression::kMessagePatternLibpngError [] = "*libpng error:*"
 
const char pagespeed::image_compression::kMessagePatternLibpngFailure [] = "*libpng failed to*"
 
const char pagespeed::image_compression::kMessagePatternLibpngWarning [] = "*libpng warning:*"
 
const char pagespeed::image_compression::kMessagePatternPixelFormat [] = "*Pixel format:*"
 
const char pagespeed::image_compression::kMessagePatternStats [] = "*Stats:*"
 
const char pagespeed::image_compression::kMessagePatternUnexpectedEOF [] = "*Unexpected EOF*"
 
const char pagespeed::image_compression::kMessagePatternWritingToWebp [] = "*Writing to webp:*"
 
const GoldImageCompressionInfo pagespeed::image_compression::kValidGifImages []
 
const size_t pagespeed::image_compression::kValidGifImageCount = arraysize(kValidGifImages)