OLD | NEW |
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 "modules/canvas2d/CanvasRenderingContext2D.h" | 6 #include "modules/canvas2d/CanvasRenderingContext2D.h" |
7 | 7 |
8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
10 #include "core/html/HTMLCanvasElement.h" | 10 #include "core/html/HTMLCanvasElement.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 EXPECT_EQ(String("#000000"), value.getAsString()); | 176 EXPECT_EQ(String("#000000"), value.getAsString()); |
177 } | 177 } |
178 | 178 |
179 EXPECT_EQ(String("rgba(0, 0, 0, 0)"), context2d()->shadowColor()); | 179 EXPECT_EQ(String("rgba(0, 0, 0, 0)"), context2d()->shadowColor()); |
180 } | 180 } |
181 | 181 |
182 TEST_F(CanvasRenderingContext2DAPITest, LineDashStateSave) | 182 TEST_F(CanvasRenderingContext2DAPITest, LineDashStateSave) |
183 { | 183 { |
184 createContext(NonOpaque); | 184 createContext(NonOpaque); |
185 | 185 |
186 Vector<float> simpleDash; | 186 Vector<double> simpleDash; |
187 simpleDash.append(4); | 187 simpleDash.append(4); |
188 simpleDash.append(2); | 188 simpleDash.append(2); |
189 | 189 |
190 context2d()->setLineDash(simpleDash); | 190 context2d()->setLineDash(simpleDash); |
191 EXPECT_EQ(simpleDash, context2d()->getLineDash()); | 191 EXPECT_EQ(simpleDash, context2d()->getLineDash()); |
192 context2d()->save(); | 192 context2d()->save(); |
193 // Realize the save. | 193 // Realize the save. |
194 context2d()->scale(2, 2); | 194 context2d()->scale(2, 2); |
195 EXPECT_EQ(simpleDash, context2d()->getLineDash()); | 195 EXPECT_EQ(simpleDash, context2d()->getLineDash()); |
196 context2d()->restore(); | 196 context2d()->restore(); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 AXObjectCacheImpl* axObjectCache = toAXObjectCacheImpl(document().existingAX
ObjectCache()); | 298 AXObjectCacheImpl* axObjectCache = toAXObjectCacheImpl(document().existingAX
ObjectCache()); |
299 AXObject* axObject = axObjectCache->getOrCreate(buttonElement); | 299 AXObject* axObject = axObjectCache->getOrCreate(buttonElement); |
300 | 300 |
301 EXPECT_EQ(25, axObject->elementRect().x().toInt()); | 301 EXPECT_EQ(25, axObject->elementRect().x().toInt()); |
302 EXPECT_EQ(25, axObject->elementRect().y().toInt()); | 302 EXPECT_EQ(25, axObject->elementRect().y().toInt()); |
303 EXPECT_EQ(40, axObject->elementRect().width().toInt()); | 303 EXPECT_EQ(40, axObject->elementRect().width().toInt()); |
304 EXPECT_EQ(40, axObject->elementRect().height().toInt()); | 304 EXPECT_EQ(40, axObject->elementRect().height().toInt()); |
305 } | 305 } |
306 | 306 |
307 } // namespace blink | 307 } // namespace blink |
OLD | NEW |