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

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: OWNERS change on offscreencanvas folder 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 9ed184d0bb3ec839898b5e7660d448501d846ce7..9980e89f5a88e7a6aebc0bb7d930c51cbd75b5b4 100644
--- a/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModuleTest.cpp
+++ b/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModuleTest.cpp
@@ -30,14 +30,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