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

Unified Diff: third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModuleTest.cpp

Issue 2036663003: Establish mojo service between Canvas (blink) and SurfaceManager (browser) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Throw away typemaps in Blink Created 4 years, 6 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/modules/canvas/HTMLCanvasElementModuleTest.cpp
diff --git a/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModuleTest.cpp b/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModuleTest.cpp
index 7ddd64cf5edb467a857fe0e34e754c74b403d170..d06f1c3f8661a668ed87efde11e3478a773ad2c2 100644
--- a/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModuleTest.cpp
+++ b/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModuleTest.cpp
@@ -29,14 +29,23 @@ protected:
}
HTMLCanvasElement& canvasElement() const { return *m_canvasElement; }
+ OffscreenCanvas* transferControlToOffscreen(ExceptionState&);
+
private:
Persistent<HTMLCanvasElement> m_canvasElement;
};
+OffscreenCanvas* HTMLCanvasElementModuleTest::transferControlToOffscreen(ExceptionState& exceptionState)
+{
+ // This unit test only tests if the Canvas Id is associated correctly, so we exclude the part that
+ // creates surface layer bridge because a mojo message pipe cannot be tested using webkit unit tests.
+ return HTMLCanvasElementModule::transferControlToOffscreenInternal(canvasElement(), exceptionState);
+}
+
TEST_F(HTMLCanvasElementModuleTest, TransferControlToOffscreen)
{
NonThrowableExceptionState exceptionState;
- OffscreenCanvas* offscreenCanvas = HTMLCanvasElementModule::transferControlToOffscreen(canvasElement(), exceptionState);
+ OffscreenCanvas* offscreenCanvas = transferControlToOffscreen(exceptionState);
int canvasId = offscreenCanvas->getAssociatedCanvasId();
EXPECT_EQ(canvasId, DOMNodeIds::idForNode(&(canvasElement())));
}

Powered by Google App Engine
This is Rietveld 408576698