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

Side by Side Diff: Source/core/html/canvas/CanvasRenderingContext2DAPITest.cpp

Issue 1216543005: Revert of Add a FrameView lifecycle method that just updates layout, style and compositing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "config.h" 5 #include "config.h"
6 #include "core/html/canvas/CanvasRenderingContext2D.h" 6 #include "core/html/canvas/CanvasRenderingContext2D.h"
7 7
8 #include "core/frame/FrameView.h" 8 #include "core/frame/FrameView.h"
9 #include "core/html/HTMLDocument.h" 9 #include "core/html/HTMLDocument.h"
10 #include "core/html/ImageData.h" 10 #include "core/html/ImageData.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 context2d(); // Calling this for the checks 61 context2d(); // Calling this for the checks
62 } 62 }
63 63
64 void CanvasRenderingContext2DAPITest::SetUp() 64 void CanvasRenderingContext2DAPITest::SetUp()
65 { 65 {
66 Page::PageClients pageClients; 66 Page::PageClients pageClients;
67 fillWithEmptyClients(pageClients); 67 fillWithEmptyClients(pageClients);
68 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600), &pageClients) ; 68 m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600), &pageClients) ;
69 m_document = toHTMLDocument(&m_dummyPageHolder->document()); 69 m_document = toHTMLDocument(&m_dummyPageHolder->document());
70 m_document->documentElement()->setInnerHTML("<body><canvas id='c'></canvas>< /body>", ASSERT_NO_EXCEPTION); 70 m_document->documentElement()->setInnerHTML("<body><canvas id='c'></canvas>< /body>", ASSERT_NO_EXCEPTION);
71 m_document->view()->updateAllLifecyclePhases(); 71 m_document->view()->updateLayoutAndStyleForPainting();
72 m_canvasElement = toHTMLCanvasElement(m_document->getElementById("c")); 72 m_canvasElement = toHTMLCanvasElement(m_document->getElementById("c"));
73 } 73 }
74 74
75 TEST_F(CanvasRenderingContext2DAPITest, SetShadowColor_Clamping) 75 TEST_F(CanvasRenderingContext2DAPITest, SetShadowColor_Clamping)
76 { 76 {
77 createContext(NonOpaque); 77 createContext(NonOpaque);
78 78
79 context2d()->setShadowColor("rgba(0,0,0,0)"); 79 context2d()->setShadowColor("rgba(0,0,0,0)");
80 EXPECT_EQ(String("rgba(0, 0, 0, 0)"), context2d()->shadowColor()); 80 EXPECT_EQ(String("rgba(0, 0, 0, 0)"), context2d()->shadowColor());
81 context2d()->setShadowColor("rgb(0,0,0)"); 81 context2d()->setShadowColor("rgb(0,0,0)");
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 ImageData* imgdata4 = context2d()->createImageData(-10, -20, exceptionState) ; 210 ImageData* imgdata4 = context2d()->createImageData(-10, -20, exceptionState) ;
211 EXPECT_FALSE(exceptionState.hadException()); 211 EXPECT_FALSE(exceptionState.hadException());
212 212
213 EXPECT_EQ((unsigned)800, imgdata1->data()->length()); 213 EXPECT_EQ((unsigned)800, imgdata1->data()->length());
214 EXPECT_EQ((unsigned)800, imgdata2->data()->length()); 214 EXPECT_EQ((unsigned)800, imgdata2->data()->length());
215 EXPECT_EQ((unsigned)800, imgdata3->data()->length()); 215 EXPECT_EQ((unsigned)800, imgdata3->data()->length());
216 EXPECT_EQ((unsigned)800, imgdata4->data()->length()); 216 EXPECT_EQ((unsigned)800, imgdata4->data()->length());
217 } 217 }
218 218
219 } // namespace blink 219 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTextFormControlElementTest.cpp ('k') | Source/core/html/canvas/CanvasRenderingContext2DTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698