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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DAPITest.cpp

Issue 2287433003: Get rid of remaining uses of AXObject::elementRect (Closed)
Patch Set: Rebase Created 4 years, 3 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/canvas2d/CanvasRenderingContext2DAPITest.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DAPITest.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DAPITest.cpp
index 7b38498ab83cbef6661d94ea2076f583f10cfcf6..ab5e80795f9a302783699dcaacc524e768a83ad6 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DAPITest.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DAPITest.cpp
@@ -296,10 +296,11 @@ TEST_F(CanvasRenderingContext2DAPITest, AccessibilityRectTestForAddHitRegion)
AXObjectCacheImpl* axObjectCache = toAXObjectCacheImpl(document().existingAXObjectCache());
AXObject* axObject = axObjectCache->getOrCreate(buttonElement);
- EXPECT_EQ(25, axObject->elementRect().x().toInt());
- EXPECT_EQ(25, axObject->elementRect().y().toInt());
- EXPECT_EQ(40, axObject->elementRect().width().toInt());
- EXPECT_EQ(40, axObject->elementRect().height().toInt());
+ LayoutRect axBounds = axObject->getBoundsInFrameCoordinates();
+ EXPECT_EQ(25, axBounds.x().toInt());
+ EXPECT_EQ(25, axBounds.y().toInt());
+ EXPECT_EQ(40, axBounds.width().toInt());
+ EXPECT_EQ(40, axBounds.height().toInt());
}
TEST_F(CanvasRenderingContext2DAPITest, AccessibilityRectTestForDrawFocusIfNeeded)
@@ -319,10 +320,11 @@ TEST_F(CanvasRenderingContext2DAPITest, AccessibilityRectTestForDrawFocusIfNeede
AXObjectCacheImpl* axObjectCache = toAXObjectCacheImpl(document().existingAXObjectCache());
AXObject* axObject = axObjectCache->getOrCreate(buttonElement);
- EXPECT_EQ(25, axObject->elementRect().x().toInt());
- EXPECT_EQ(25, axObject->elementRect().y().toInt());
- EXPECT_EQ(40, axObject->elementRect().width().toInt());
- EXPECT_EQ(40, axObject->elementRect().height().toInt());
+ LayoutRect axBounds = axObject->getBoundsInFrameCoordinates();
+ EXPECT_EQ(25, axBounds.x().toInt());
+ EXPECT_EQ(25, axBounds.y().toInt());
+ EXPECT_EQ(40, axBounds.width().toInt());
+ EXPECT_EQ(40, axBounds.height().toInt());
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698