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

Side by Side Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DAPITest.cpp

Issue 1896793002: Rename (updateLayout/updateStyle).*.() to updateStyleAndLayout.*.() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 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 "modules/canvas2d/CanvasRenderingContext2D.h" 5 #include "modules/canvas2d/CanvasRenderingContext2D.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/Settings.h" 8 #include "core/frame/Settings.h"
9 #include "core/html/HTMLCanvasElement.h" 9 #include "core/html/HTMLCanvasElement.h"
10 #include "core/html/HTMLDocument.h" 10 #include "core/html/HTMLDocument.h"
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 } 302 }
303 303
304 TEST_F(CanvasRenderingContext2DAPITest, AccessibilityRectTestForDrawFocusIfNeede d) 304 TEST_F(CanvasRenderingContext2DAPITest, AccessibilityRectTestForDrawFocusIfNeede d)
305 { 305 {
306 resetCanvasForAccessibilityRectTest(document()); 306 resetCanvasForAccessibilityRectTest(document());
307 307
308 Element* buttonElement = document().getElementById("button"); 308 Element* buttonElement = document().getElementById("button");
309 HTMLCanvasElement* canvas = toHTMLCanvasElement(document().getElementById("c anvas")); 309 HTMLCanvasElement* canvas = toHTMLCanvasElement(document().getElementById("c anvas"));
310 CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(c anvas->renderingContext()); 310 CanvasRenderingContext2D* context = static_cast<CanvasRenderingContext2D*>(c anvas->renderingContext());
311 311
312 document().updateLayoutTreeForNode(canvas); 312 document().updateStyleAndLayoutTreeForNode(canvas);
313 313
314 context->beginPath(); 314 context->beginPath();
315 context->rect(10, 10, 40, 40); 315 context->rect(10, 10, 40, 40);
316 context->drawFocusIfNeeded(buttonElement); 316 context->drawFocusIfNeeded(buttonElement);
317 317
318 AXObjectCacheImpl* axObjectCache = toAXObjectCacheImpl(document().existingAX ObjectCache()); 318 AXObjectCacheImpl* axObjectCache = toAXObjectCacheImpl(document().existingAX ObjectCache());
319 AXObject* axObject = axObjectCache->getOrCreate(buttonElement); 319 AXObject* axObject = axObjectCache->getOrCreate(buttonElement);
320 320
321 EXPECT_EQ(25, axObject->elementRect().x().toInt()); 321 EXPECT_EQ(25, axObject->elementRect().x().toInt());
322 EXPECT_EQ(25, axObject->elementRect().y().toInt()); 322 EXPECT_EQ(25, axObject->elementRect().y().toInt());
323 EXPECT_EQ(40, axObject->elementRect().width().toInt()); 323 EXPECT_EQ(40, axObject->elementRect().width().toInt());
324 EXPECT_EQ(40, axObject->elementRect().height().toInt()); 324 EXPECT_EQ(40, axObject->elementRect().height().toInt());
325 } 325 }
326 326
327 } // namespace blink 327 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698