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 "modules/canvas2d/CanvasRenderingContext2D.h" | 5 #include "modules/canvas2d/CanvasRenderingContext2D.h" |
6 | 6 |
7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 EXPECT_EQ(String("#000000"), value.getAsString()); | 208 EXPECT_EQ(String("#000000"), value.getAsString()); |
209 } | 209 } |
210 | 210 |
211 EXPECT_EQ(String("rgba(0, 0, 0, 0)"), context2d()->shadowColor()); | 211 EXPECT_EQ(String("rgba(0, 0, 0, 0)"), context2d()->shadowColor()); |
212 } | 212 } |
213 | 213 |
214 TEST_F(CanvasRenderingContext2DAPITest, LineDashStateSave) { | 214 TEST_F(CanvasRenderingContext2DAPITest, LineDashStateSave) { |
215 createContext(NonOpaque); | 215 createContext(NonOpaque); |
216 | 216 |
217 Vector<double> simpleDash; | 217 Vector<double> simpleDash; |
218 simpleDash.append(4); | 218 simpleDash.push_back(4); |
219 simpleDash.append(2); | 219 simpleDash.push_back(2); |
220 | 220 |
221 context2d()->setLineDash(simpleDash); | 221 context2d()->setLineDash(simpleDash); |
222 EXPECT_EQ(simpleDash, context2d()->getLineDash()); | 222 EXPECT_EQ(simpleDash, context2d()->getLineDash()); |
223 context2d()->save(); | 223 context2d()->save(); |
224 // Realize the save. | 224 // Realize the save. |
225 context2d()->scale(2, 2); | 225 context2d()->scale(2, 2); |
226 EXPECT_EQ(simpleDash, context2d()->getLineDash()); | 226 EXPECT_EQ(simpleDash, context2d()->getLineDash()); |
227 context2d()->restore(); | 227 context2d()->restore(); |
228 EXPECT_EQ(simpleDash, context2d()->getLineDash()); | 228 EXPECT_EQ(simpleDash, context2d()->getLineDash()); |
229 } | 229 } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 AXObject* axObject = axObjectCache->getOrCreate(buttonElement); | 359 AXObject* axObject = axObjectCache->getOrCreate(buttonElement); |
360 | 360 |
361 LayoutRect axBounds = axObject->getBoundsInFrameCoordinates(); | 361 LayoutRect axBounds = axObject->getBoundsInFrameCoordinates(); |
362 EXPECT_EQ(25, axBounds.x().toInt()); | 362 EXPECT_EQ(25, axBounds.x().toInt()); |
363 EXPECT_EQ(25, axBounds.y().toInt()); | 363 EXPECT_EQ(25, axBounds.y().toInt()); |
364 EXPECT_EQ(40, axBounds.width().toInt()); | 364 EXPECT_EQ(40, axBounds.width().toInt()); |
365 EXPECT_EQ(40, axBounds.height().toInt()); | 365 EXPECT_EQ(40, axBounds.height().toInt()); |
366 } | 366 } |
367 | 367 |
368 } // namespace blink | 368 } // namespace blink |
OLD | NEW |