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

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

Issue 18808004: Refactoring: Extract DocumentInit for capture Document construction parameter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed webkit_unit_tests build failure. Created 7 years, 5 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
« no previous file with comments | « Source/core/animation/DocumentTimelineTest.cpp ('k') | Source/core/core.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 27 matching lines...) Expand all
38 #include <gtest/gtest.h> 38 #include <gtest/gtest.h>
39 39
40 using namespace WebCore; 40 using namespace WebCore;
41 41
42 namespace { 42 namespace {
43 43
44 class PlayerTest : public ::testing::Test { 44 class PlayerTest : public ::testing::Test {
45 protected: 45 protected:
46 virtual void SetUp() 46 virtual void SetUp()
47 { 47 {
48 document = Document::create(0, KURL()); 48 document = Document::create();
49 timeline = DocumentTimeline::create(document.get()); 49 timeline = DocumentTimeline::create(document.get());
50 player = Player::create(timeline.get(), 0); 50 player = Player::create(timeline.get(), 0);
51 } 51 }
52 52
53 bool updateTimeline(double time) 53 bool updateTimeline(double time)
54 { 54 {
55 timeline->serviceAnimations(time); 55 timeline->serviceAnimations(time);
56 // The timeline does not know about our player, so we have to explicitly call update(). 56 // The timeline does not know about our player, so we have to explicitly call update().
57 return player->update(); 57 return player->update();
58 } 58 }
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 player->setCurrentTime(std::numeric_limits<double>::max()); 251 player->setCurrentTime(std::numeric_limits<double>::max());
252 EXPECT_EQ(std::numeric_limits<double>::max(), player->currentTime()); 252 EXPECT_EQ(std::numeric_limits<double>::max(), player->currentTime());
253 EXPECT_EQ(-std::numeric_limits<double>::max(), player->timeDrift()); 253 EXPECT_EQ(-std::numeric_limits<double>::max(), player->timeDrift());
254 254
255 updateTimeline(100); 255 updateTimeline(100);
256 EXPECT_EQ(std::numeric_limits<double>::max(), player->currentTime()); 256 EXPECT_EQ(std::numeric_limits<double>::max(), player->currentTime());
257 EXPECT_EQ(-std::numeric_limits<double>::max(), player->timeDrift()); 257 EXPECT_EQ(-std::numeric_limits<double>::max(), player->timeDrift());
258 } 258 }
259 259
260 } 260 }
OLDNEW
« no previous file with comments | « Source/core/animation/DocumentTimelineTest.cpp ('k') | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698