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

Unified Diff: third_party/WebKit/Source/platform/DragImageTest.cpp

Issue 1331533002: [poc] curve-filter Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix CanvasRenderingContext2D::createPattern crash for #40 Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
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);
{
« no previous file with comments | « third_party/WebKit/Source/platform/DragImage.cpp ('k') | third_party/WebKit/Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698