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

Side by Side Diff: third_party/WebKit/Source/core/animation/KeyframeEffectTest.cpp

Issue 2562773002: Migrate WTF::Vector::append() to ::push_back() [part 2 of N] (Closed)
Patch Set: rebase Created 4 years 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 "core/animation/KeyframeEffect.h" 5 #include "core/animation/KeyframeEffect.h"
6 6
7 #include "bindings/core/v8/Dictionary.h" 7 #include "bindings/core/v8/Dictionary.h"
8 #include "bindings/core/v8/DictionarySequenceOrDictionary.h" 8 #include "bindings/core/v8/DictionarySequenceOrDictionary.h"
9 #include "bindings/core/v8/V8BindingForTesting.h" 9 #include "bindings/core/v8/V8BindingForTesting.h"
10 #include "bindings/core/v8/V8KeyframeEffectOptions.h" 10 #include "bindings/core/v8/V8KeyframeEffectOptions.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 setV8ObjectPropertyAsString(scope.isolate(), keyframe1, "width", "100px"); 76 setV8ObjectPropertyAsString(scope.isolate(), keyframe1, "width", "100px");
77 setV8ObjectPropertyAsString(scope.isolate(), keyframe1, "offset", "0"); 77 setV8ObjectPropertyAsString(scope.isolate(), keyframe1, "offset", "0");
78 setV8ObjectPropertyAsString(scope.isolate(), keyframe1, "easing", 78 setV8ObjectPropertyAsString(scope.isolate(), keyframe1, "easing",
79 "ease-in-out"); 79 "ease-in-out");
80 setV8ObjectPropertyAsString(scope.isolate(), keyframe2, "width", "0px"); 80 setV8ObjectPropertyAsString(scope.isolate(), keyframe2, "width", "0px");
81 setV8ObjectPropertyAsString(scope.isolate(), keyframe2, "offset", "1"); 81 setV8ObjectPropertyAsString(scope.isolate(), keyframe2, "offset", "1");
82 setV8ObjectPropertyAsString(scope.isolate(), keyframe2, "easing", 82 setV8ObjectPropertyAsString(scope.isolate(), keyframe2, "easing",
83 "cubic-bezier(1, 1, 0.3, 0.3)"); 83 "cubic-bezier(1, 1, 0.3, 0.3)");
84 84
85 jsKeyframes.append(Dictionary(scope.isolate(), keyframe1, exceptionState)); 85 jsKeyframes.push_back(Dictionary(scope.isolate(), keyframe1, exceptionState));
86 jsKeyframes.append(Dictionary(scope.isolate(), keyframe2, exceptionState)); 86 jsKeyframes.push_back(Dictionary(scope.isolate(), keyframe2, exceptionState));
87 87
88 String value1; 88 String value1;
89 ASSERT_TRUE(DictionaryHelper::get(jsKeyframes[0], "width", value1)); 89 ASSERT_TRUE(DictionaryHelper::get(jsKeyframes[0], "width", value1));
90 ASSERT_EQ("100px", value1); 90 ASSERT_EQ("100px", value1);
91 91
92 String value2; 92 String value2;
93 ASSERT_TRUE(DictionaryHelper::get(jsKeyframes[1], "width", value2)); 93 ASSERT_TRUE(DictionaryHelper::get(jsKeyframes[1], "width", value2));
94 ASSERT_EQ("0px", value2); 94 ASSERT_EQ("0px", value2);
95 95
96 KeyframeEffect* animation = createAnimation(element.get(), jsKeyframes, 0); 96 KeyframeEffect* animation = createAnimation(element.get(), jsKeyframes, 0);
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 timing.iterationDuration = 5; 399 timing.iterationDuration = 5;
400 KeyframeEffect* animation = 400 KeyframeEffect* animation =
401 KeyframeEffect::create(element.get(), nullptr, timing); 401 KeyframeEffect::create(element.get(), nullptr, timing);
402 EXPECT_EQ(element.get(), animation->target()); 402 EXPECT_EQ(element.get(), animation->target());
403 document().timeline().play(animation); 403 document().timeline().play(animation);
404 pageHolder.reset(); 404 pageHolder.reset();
405 element.clear(); 405 element.clear();
406 } 406 }
407 407
408 } // namespace blink 408 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698