Chromium Code Reviews| Index: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp |
| diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp |
| index 3ab020a9f880b3752e362ac5e121fd7da50ef3e8..bc53fef463a0b9ff43b7360012e4c5f10fdb0ffd 100644 |
| --- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp |
| +++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp |
| @@ -13,8 +13,10 @@ |
| #include "core/imagebitmap/ImageBitmapOptions.h" |
| #include "core/loader/EmptyClients.h" |
| #include "core/testing/DummyPageHolder.h" |
| +#include "modules/canvas/HTMLCanvasElementModule.h" |
| #include "modules/canvas2d/CanvasGradient.h" |
| #include "modules/canvas2d/CanvasPattern.h" |
| +#include "modules/offscreencanvas/OffscreenCanvas.h" |
| #include "modules/webgl/WebGLRenderingContext.h" |
| #include "platform/graphics/ExpensiveCanvasHeuristicParameters.h" |
| #include "platform/graphics/RecordingImageBufferSurface.h" |
| @@ -719,4 +721,12 @@ TEST_F(CanvasRenderingContext2DTest, GPUMemoryUpdateForAcceleratedCanvas) |
| EXPECT_EQ(0, getGlobalGPUMemoryUsage()); |
| } |
| +TEST_F(CanvasRenderingContext2DTest, TransferControlToOffscreen) |
|
Justin Novosad
2016/03/30 19:51:06
Good test, but wrong place for it. It has nothing
|
| +{ |
| + NonThrowableExceptionState exceptionState; |
| + OffscreenCanvas* offscreenCanvas = HTMLCanvasElementModule::transferControlToOffscreen(canvasElement(), exceptionState); |
| + HTMLCanvasElement* canvas = offscreenCanvas->getAssociatedCanvas(); |
| + EXPECT_EQ(canvas, canvasElement()); |
| +} |
| + |
| } // namespace blink |