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

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

Issue 2508793002: Make exceptionState parameter of Document::createElement() to have default value (Closed)
Patch Set: 2016-11-16T15:26:06 Created 4 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 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 animation->cancel(); 683 animation->cancel();
684 animation->update(TimingUpdateOnDemand); 684 animation->update(TimingUpdateOnDemand);
685 // This frame will fire the finish event event though no start time has been 685 // This frame will fire the finish event event though no start time has been
686 // received from the compositor yet, as cancel() nukes start times. 686 // received from the compositor yet, as cancel() nukes start times.
687 simulateFrame(0); 687 simulateFrame(0);
688 EXPECT_EQ(std::numeric_limits<double>::infinity(), 688 EXPECT_EQ(std::numeric_limits<double>::infinity(),
689 animation->timeToEffectChange()); 689 animation->timeToEffectChange());
690 } 690 }
691 691
692 TEST_F(AnimationAnimationTest, AttachedAnimations) { 692 TEST_F(AnimationAnimationTest, AttachedAnimations) {
693 Persistent<Element> element = 693 Persistent<Element> element = document->createElement("foo");
694 document->createElement("foo", ASSERT_NO_EXCEPTION);
695 694
696 Timing timing; 695 Timing timing;
697 KeyframeEffect* keyframeEffect = 696 KeyframeEffect* keyframeEffect =
698 KeyframeEffect::create(element.get(), nullptr, timing); 697 KeyframeEffect::create(element.get(), nullptr, timing);
699 Animation* animation = timeline->play(keyframeEffect); 698 Animation* animation = timeline->play(keyframeEffect);
700 simulateFrame(0); 699 simulateFrame(0);
701 timeline->serviceAnimations(TimingUpdateForAnimationFrame); 700 timeline->serviceAnimations(TimingUpdateForAnimationFrame);
702 EXPECT_EQ(1U, 701 EXPECT_EQ(1U,
703 element->elementAnimations()->animations().find(animation)->value); 702 element->elementAnimations()->animations().find(animation)->value);
704 703
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 EXPECT_EQ(Animation::Idle, animation->playStateInternal()); 776 EXPECT_EQ(Animation::Idle, animation->playStateInternal());
778 EXPECT_TRUE(std::isnan(animation->currentTime())); 777 EXPECT_TRUE(std::isnan(animation->currentTime()));
779 EXPECT_TRUE(std::isnan(animation->startTime())); 778 EXPECT_TRUE(std::isnan(animation->startTime()));
780 animation->pause(); 779 animation->pause();
781 EXPECT_EQ(Animation::Pending, animation->playStateInternal()); 780 EXPECT_EQ(Animation::Pending, animation->playStateInternal());
782 EXPECT_EQ(0, animation->currentTime()); 781 EXPECT_EQ(0, animation->currentTime());
783 EXPECT_TRUE(std::isnan(animation->startTime())); 782 EXPECT_TRUE(std::isnan(animation->startTime()));
784 } 783 }
785 784
786 } // namespace blink 785 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698