| Index: ppapi/tests/test_image_data.cc
|
| ===================================================================
|
| --- ppapi/tests/test_image_data.cc (revision 70488)
|
| +++ ppapi/tests/test_image_data.cc (working copy)
|
| @@ -27,13 +27,13 @@
|
| }
|
|
|
| std::string TestImageData::TestInvalidFormat() {
|
| - pp::ImageData a(static_cast<PP_ImageDataFormat>(1337), pp::Size(16, 16),
|
| - true);
|
| + pp::ImageData a(instance_, static_cast<PP_ImageDataFormat>(1337),
|
| + pp::Size(16, 16), true);
|
| if (!a.is_null())
|
| return "Crazy image data format accepted";
|
|
|
| - pp::ImageData b(static_cast<PP_ImageDataFormat>(-1), pp::Size(16, 16),
|
| - true);
|
| + pp::ImageData b(instance_, static_cast<PP_ImageDataFormat>(-1),
|
| + pp::Size(16, 16), true);
|
| if (!b.is_null())
|
| return "Negative image data format accepted";
|
|
|
| @@ -41,16 +41,17 @@
|
| }
|
|
|
| std::string TestImageData::TestInvalidSize() {
|
| - pp::ImageData zero_size(PP_IMAGEDATAFORMAT_BGRA_PREMUL, pp::Size(0, 0), true);
|
| + pp::ImageData zero_size(instance_, PP_IMAGEDATAFORMAT_BGRA_PREMUL,
|
| + pp::Size(0, 0), true);
|
| if (!zero_size.is_null())
|
| return "Zero width and height accepted";
|
|
|
| - pp::ImageData zero_height(PP_IMAGEDATAFORMAT_BGRA_PREMUL,
|
| + pp::ImageData zero_height(instance_, PP_IMAGEDATAFORMAT_BGRA_PREMUL,
|
| pp::Size(16, 0), true);
|
| if (!zero_height.is_null())
|
| return "Zero height accepted";
|
|
|
| - pp::ImageData zero_width(PP_IMAGEDATAFORMAT_BGRA_PREMUL,
|
| + pp::ImageData zero_width(instance_, PP_IMAGEDATAFORMAT_BGRA_PREMUL,
|
| pp::Size(0, 16), true);
|
| if (!zero_width.is_null())
|
| return "Zero width accepted";
|
| @@ -79,7 +80,7 @@
|
| }
|
|
|
| std::string TestImageData::TestHugeSize() {
|
| - pp::ImageData huge_size(PP_IMAGEDATAFORMAT_BGRA_PREMUL,
|
| + pp::ImageData huge_size(instance_, PP_IMAGEDATAFORMAT_BGRA_PREMUL,
|
| pp::Size(100000000, 100000000), true);
|
| if (!huge_size.is_null())
|
| return "31-bit overflow size accepted";
|
| @@ -89,7 +90,8 @@
|
| std::string TestImageData::TestInitToZero() {
|
| const int w = 5;
|
| const int h = 6;
|
| - pp::ImageData img(PP_IMAGEDATAFORMAT_BGRA_PREMUL, pp::Size(w, h), true);
|
| + pp::ImageData img(instance_, PP_IMAGEDATAFORMAT_BGRA_PREMUL,
|
| + pp::Size(w, h), true);
|
| if (img.is_null())
|
| return "Could not create bitmap";
|
|
|
| @@ -122,14 +124,15 @@
|
|
|
| // Make another resource type and test it.
|
| const int w = 16, h = 16;
|
| - pp::Graphics2D device(pp::Size(w, h), true);
|
| + pp::Graphics2D device(instance_, pp::Size(w, h), true);
|
| if (device.is_null())
|
| return "Couldn't create device context";
|
| if (image_data_interface_->IsImageData(device.pp_resource()))
|
| return "Device context was reported as an image";
|
|
|
| // Make a valid image resource.
|
| - pp::ImageData img(PP_IMAGEDATAFORMAT_BGRA_PREMUL, pp::Size(w, h), true);
|
| + pp::ImageData img(instance_, PP_IMAGEDATAFORMAT_BGRA_PREMUL,
|
| + pp::Size(w, h), true);
|
| if (img.is_null())
|
| return "Couldn't create image data";
|
| if (!image_data_interface_->IsImageData(img.pp_resource()))
|
|
|