OLD | NEW |
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 30 matching lines...) Expand all Loading... |
41 #include <gtest/gtest.h> | 41 #include <gtest/gtest.h> |
42 | 42 |
43 using namespace WebCore; | 43 using namespace WebCore; |
44 | 44 |
45 namespace { | 45 namespace { |
46 | 46 |
47 class DocumentTimelineTest : public ::testing::Test { | 47 class DocumentTimelineTest : public ::testing::Test { |
48 protected: | 48 protected: |
49 virtual void SetUp() | 49 virtual void SetUp() |
50 { | 50 { |
51 document = Document::create(0, KURL()); | 51 document = Document::create(); |
52 element = Element::create(nullQName() , document.get()); | 52 element = Element::create(nullQName() , document.get()); |
53 timeline = DocumentTimeline::create(document.get()); | 53 timeline = DocumentTimeline::create(document.get()); |
54 } | 54 } |
55 | 55 |
56 RefPtr<Document> document; | 56 RefPtr<Document> document; |
57 RefPtr<Element> element; | 57 RefPtr<Element> element; |
58 RefPtr<DocumentTimeline> timeline; | 58 RefPtr<DocumentTimeline> timeline; |
59 Timing timing; | 59 Timing timing; |
60 }; | 60 }; |
61 | 61 |
(...skipping 22 matching lines...) Expand all Loading... |
84 RefPtr<Animation> anim2 = Animation::create(element.get(), KeyframeAnimatio
nEffect::create(KeyframeAnimationEffect::KeyframeVector()), timing); | 84 RefPtr<Animation> anim2 = Animation::create(element.get(), KeyframeAnimatio
nEffect::create(KeyframeAnimationEffect::KeyframeVector()), timing); |
85 RefPtr<Player> player1 = timeline->play(anim1.get()); | 85 RefPtr<Player> player1 = timeline->play(anim1.get()); |
86 RefPtr<Player> player2 = timeline->play(anim2.get()); | 86 RefPtr<Player> player2 = timeline->play(anim2.get()); |
87 timeline->pauseAnimationsForTesting(seekTime); | 87 timeline->pauseAnimationsForTesting(seekTime); |
88 | 88 |
89 EXPECT_FLOAT_EQ(seekTime, player1->currentTime()); | 89 EXPECT_FLOAT_EQ(seekTime, player1->currentTime()); |
90 EXPECT_FLOAT_EQ(seekTime, player2->currentTime()); | 90 EXPECT_FLOAT_EQ(seekTime, player2->currentTime()); |
91 } | 91 } |
92 | 92 |
93 } | 93 } |
OLD | NEW |