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

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

Issue 1454163005: Change float-->double in CanvasRenderingContext2D.idl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update bug number in TestExpectations Created 5 years, 1 month 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 "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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698