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 622c5e23dcafab48cf975a0751c4cb5287b85c5a..a57a1983b8a24e661d9fba1547ec67e595782560 100644 |
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp |
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp |
@@ -174,30 +174,6 @@ public: |
//============================================================================ |
-class MockCanvasObserver final : public NoBaseWillBeGarbageCollectedFinalized<MockCanvasObserver>, public CanvasObserver { |
- WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MockCanvasObserver); |
-public: |
- static PassOwnPtrWillBeRawPtr<MockCanvasObserver> create() |
- { |
- return adoptPtrWillBeNoop(new MockCanvasObserver); |
- } |
- |
- DEFINE_INLINE_VIRTUAL_TRACE() |
- { |
- CanvasObserver::trace(visitor); |
- } |
- |
- |
- virtual ~MockCanvasObserver() { } |
- MOCK_METHOD2(canvasChanged, void(HTMLCanvasElement*, const FloatRect&)); |
- MOCK_METHOD1(canvasResized, void(HTMLCanvasElement*)); |
-#if !ENABLE(OILPAN) |
- void canvasDestroyed(HTMLCanvasElement*) override { } |
-#endif |
-}; |
- |
-//============================================================================ |
- |
#define TEST_OVERDRAW_SETUP(EXPECTED_OVERDRAWS) \ |
OwnPtr<MockImageBufferSurfaceForOverwriteTesting> mockSurface = adoptPtr(new MockImageBufferSurfaceForOverwriteTesting(IntSize(10, 10), NonOpaque)); \ |
MockImageBufferSurfaceForOverwriteTesting* surfacePtr = mockSurface.get(); \ |
@@ -615,19 +591,4 @@ TEST_F(CanvasRenderingContext2DTest, FallbackWithLargeState) |
canvasElement().doDeferredPaintInvalidation(); // To close the current frame |
} |
-TEST_F(CanvasRenderingContext2DTest, CanvasObserver) |
-{ |
- createContext(NonOpaque); |
- OwnPtrWillBeRawPtr<MockCanvasObserver> observer = MockCanvasObserver::create(); |
- canvasElement().addObserver(observer.get()); |
- |
- // The canvasChanged notification must be immediate, and not deferred until paint time |
- // because offscreen canvases, which are not painted, also need to emit notifications. |
- EXPECT_CALL(*observer, canvasChanged(&canvasElement(), FloatRect(0, 0, 1, 1))).Times(1); |
- context2d()->fillRect(0, 0, 1, 1); |
- Mock::VerifyAndClearExpectations(observer.get()); |
- |
- canvasElement().removeObserver(observer.get()); |
-} |
- |
} // namespace blink |