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

Side by Side Diff: third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModuleTest.cpp

Issue 2387093002: Reflow comments in canvas-related folders (Closed)
Patch Set: More fix Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/canvas/HTMLCanvasElementModule.h" 5 #include "modules/canvas/HTMLCanvasElementModule.h"
6 6
7 #include "core/dom/DOMNodeIds.h" 7 #include "core/dom/DOMNodeIds.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/html/HTMLCanvasElement.h" 10 #include "core/html/HTMLCanvasElement.h"
(...skipping 21 matching lines...) Expand all
32 32
33 HTMLCanvasElement& canvasElement() const { return *m_canvasElement; } 33 HTMLCanvasElement& canvasElement() const { return *m_canvasElement; }
34 OffscreenCanvas* transferControlToOffscreen(ExceptionState&); 34 OffscreenCanvas* transferControlToOffscreen(ExceptionState&);
35 35
36 private: 36 private:
37 Persistent<HTMLCanvasElement> m_canvasElement; 37 Persistent<HTMLCanvasElement> m_canvasElement;
38 }; 38 };
39 39
40 OffscreenCanvas* HTMLCanvasElementModuleTest::transferControlToOffscreen( 40 OffscreenCanvas* HTMLCanvasElementModuleTest::transferControlToOffscreen(
41 ExceptionState& exceptionState) { 41 ExceptionState& exceptionState) {
42 // This unit test only tests if the Canvas Id is associated correctly, so we e xclude the part that 42 // This unit test only tests if the Canvas Id is associated correctly, so we
43 // creates surface layer bridge because a mojo message pipe cannot be tested u sing webkit unit tests. 43 // exclude the part that creates surface layer bridge because a mojo message
44 // pipe cannot be tested using webkit unit tests.
44 return HTMLCanvasElementModule::transferControlToOffscreenInternal( 45 return HTMLCanvasElementModule::transferControlToOffscreenInternal(
45 canvasElement(), exceptionState); 46 canvasElement(), exceptionState);
46 } 47 }
47 48
48 TEST_F(HTMLCanvasElementModuleTest, TransferControlToOffscreen) { 49 TEST_F(HTMLCanvasElementModuleTest, TransferControlToOffscreen) {
49 NonThrowableExceptionState exceptionState; 50 NonThrowableExceptionState exceptionState;
50 OffscreenCanvas* offscreenCanvas = transferControlToOffscreen(exceptionState); 51 OffscreenCanvas* offscreenCanvas = transferControlToOffscreen(exceptionState);
51 int canvasId = offscreenCanvas->getAssociatedCanvasId(); 52 int canvasId = offscreenCanvas->getAssociatedCanvasId();
52 EXPECT_EQ(canvasId, DOMNodeIds::idForNode(&(canvasElement()))); 53 EXPECT_EQ(canvasId, DOMNodeIds::idForNode(&(canvasElement())));
53 } 54 }
54 55
55 } // namespace blink 56 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698