| Index: third_party/WebKit/Source/platform/DragImageTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/DragImageTest.cpp b/third_party/WebKit/Source/platform/DragImageTest.cpp
|
| index 3257c25ec7fa6b3ada21326e601a022455a42f65..f78e1e6e87df5d43e96e1f8c209bd0764a0facde 100644
|
| --- a/third_party/WebKit/Source/platform/DragImageTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/DragImageTest.cpp
|
| @@ -34,6 +34,7 @@
|
| #include "platform/fonts/FontTraits.h"
|
| #include "platform/geometry/IntSize.h"
|
| #include "platform/graphics/BitmapImage.h"
|
| +#include "platform/graphics/GraphicsScreen.h"
|
| #include "platform/graphics/Image.h"
|
| #include "platform/weborigin/KURL.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -114,6 +115,8 @@ private:
|
|
|
| TEST(DragImageTest, NullHandling)
|
| {
|
| + WillPaintForDevice device(ScreenDevice::sRGBTest);
|
| +
|
| EXPECT_FALSE(DragImage::create(0));
|
|
|
| RefPtr<TestImage> nullTestImage(TestImage::create(IntSize()));
|
| @@ -122,6 +125,8 @@ TEST(DragImageTest, NullHandling)
|
|
|
| TEST(DragImageTest, NonNullHandling)
|
| {
|
| + WillPaintForDevice device(ScreenDevice::sRGBTest);
|
| +
|
| RefPtr<TestImage> testImage(TestImage::create(IntSize(2, 2)));
|
| OwnPtr<DragImage> dragImage = DragImage::create(testImage.get());
|
| ASSERT_TRUE(dragImage);
|
| @@ -134,6 +139,8 @@ TEST(DragImageTest, NonNullHandling)
|
|
|
| TEST(DragImageTest, CreateDragImage)
|
| {
|
| + WillPaintForDevice device(ScreenDevice::sRGBTest);
|
| +
|
| // Tests that the DrageImage implementation doesn't choke on null values
|
| // of imageForCurrentFrame().
|
| // FIXME: how is this test any different from test NullHandling?
|
| @@ -143,6 +150,8 @@ TEST(DragImageTest, CreateDragImage)
|
|
|
| TEST(DragImageTest, TrimWhitespace)
|
| {
|
| + WillPaintForDevice device(ScreenDevice::sRGBTest);
|
| +
|
| KURL url(ParsedURLString, "http://www.example.com/");
|
| String testLabel = " Example Example Example \n ";
|
| String expectedLabel = "Example Example Example";
|
| @@ -176,6 +185,8 @@ private:
|
|
|
| TEST(DragImageTest, InvalidRotatedBitmapImage)
|
| {
|
| + WillPaintForDevice device(ScreenDevice::sRGBTest);
|
| +
|
| // This test is mostly useful with MSAN builds, which can actually detect
|
| // the use of uninitialized memory.
|
|
|
| @@ -200,6 +211,8 @@ TEST(DragImageTest, InvalidRotatedBitmapImage)
|
|
|
| TEST(DragImageTest, InterpolationNone)
|
| {
|
| + WillPaintForDevice device(ScreenDevice::sRGBTest);
|
| +
|
| SkBitmap expectedBitmap;
|
| expectedBitmap.allocN32Pixels(4, 4);
|
| {
|
|
|