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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp

Issue 1416793004: Remove support for -webkit-canvas and Document.getCSSCanvasContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/core/xml/DocumentXMLTreeViewer.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/WebKit/Source/core/xml/DocumentXMLTreeViewer.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698