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

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

Issue 1164413003: Fix unit test style in core/{animation,css,fetch,frame,layout,style,timing}/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: anonymous Created 5 years, 6 months 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 | Annotate | Revision Log
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 23 matching lines...) Expand all
34 #include "core/animation/AnimationClock.h" 34 #include "core/animation/AnimationClock.h"
35 #include "core/animation/AnimationTimeline.h" 35 #include "core/animation/AnimationTimeline.h"
36 #include "core/animation/ElementAnimations.h" 36 #include "core/animation/ElementAnimations.h"
37 #include "core/animation/KeyframeEffect.h" 37 #include "core/animation/KeyframeEffect.h"
38 #include "core/dom/Document.h" 38 #include "core/dom/Document.h"
39 #include "core/dom/ExceptionCode.h" 39 #include "core/dom/ExceptionCode.h"
40 #include "core/dom/QualifiedName.h" 40 #include "core/dom/QualifiedName.h"
41 #include "platform/weborigin/KURL.h" 41 #include "platform/weborigin/KURL.h"
42 #include <gtest/gtest.h> 42 #include <gtest/gtest.h>
43 43
44 using namespace blink; 44 namespace blink {
45
46 namespace {
47 45
48 class AnimationAnimationTest : public ::testing::Test { 46 class AnimationAnimationTest : public ::testing::Test {
49 protected: 47 protected:
50 virtual void SetUp() 48 void SetUp() override
51 { 49 {
52 setUpWithoutStartingTimeline(); 50 setUpWithoutStartingTimeline();
53 startTimeline(); 51 startTimeline();
54 } 52 }
55 53
56 void setUpWithoutStartingTimeline() 54 void setUpWithoutStartingTimeline()
57 { 55 {
58 document = Document::create(); 56 document = Document::create();
59 document->animationClock().resetTimeForTesting(); 57 document->animationClock().resetTimeForTesting();
60 timeline = AnimationTimeline::create(document.get()); 58 timeline = AnimationTimeline::create(document.get());
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 animation->cancel(); 867 animation->cancel();
870 EXPECT_EQ(Animation::Idle, animation->playStateInternal()); 868 EXPECT_EQ(Animation::Idle, animation->playStateInternal());
871 EXPECT_TRUE(std::isnan(animation->currentTime())); 869 EXPECT_TRUE(std::isnan(animation->currentTime()));
872 EXPECT_TRUE(std::isnan(animation->startTime())); 870 EXPECT_TRUE(std::isnan(animation->startTime()));
873 animation->pause(); 871 animation->pause();
874 EXPECT_EQ(Animation::Idle, animation->playStateInternal()); 872 EXPECT_EQ(Animation::Idle, animation->playStateInternal());
875 EXPECT_TRUE(std::isnan(animation->currentTime())); 873 EXPECT_TRUE(std::isnan(animation->currentTime()));
876 EXPECT_TRUE(std::isnan(animation->startTime())); 874 EXPECT_TRUE(std::isnan(animation->startTime()));
877 } 875 }
878 876
879 } 877 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/AnimationEffectTest.cpp ('k') | Source/core/animation/AnimationTranslationUtilTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698