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

Side by Side Diff: webkit/compositor/WebAnimationTest.cpp

Issue 10920056: Make cc_unittests and webkit_compositor_unittests executable always (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename to webkit_compositor_bindings Created 8 years, 3 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 | « webkit/compositor/WebAnimationImpl.cpp ('k') | webkit/compositor/WebCompositorImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "config.h"
6
7 #include <public/WebAnimation.h>
8
9 #include <gtest/gtest.h>
10 #include <public/WebFloatAnimationCurve.h>
11 #include <wtf/OwnPtr.h>
12 #include <wtf/PassOwnPtr.h>
13
14 using namespace WebKit;
15
16 namespace {
17
18 // Linux/Win bots failed on this test.
19 // https://bugs.webkit.org/show_bug.cgi?id=90651
20 #if OS(WINDOWS)
21 #define MAYBE_DefaultSettings DISABLED_DefaultSettings
22 #elif OS(LINUX)
23 #define MAYBE_DefaultSettings DISABLED_DefaultSettings
24 #else
25 #define MAYBE_DefaultSettings DefaultSettings
26 #endif
27 TEST(WebAnimationTest, MAYBE_DefaultSettings)
28 {
29 OwnPtr<WebAnimationCurve> curve = adoptPtr(WebFloatAnimationCurve::create()) ;
30 OwnPtr<WebAnimation> animation = adoptPtr(WebAnimation::create(*curve, WebAn imation::TargetPropertyOpacity));
31
32 // Ensure that the defaults are correct.
33 EXPECT_EQ(1, animation->iterations());
34 EXPECT_EQ(0, animation->startTime());
35 EXPECT_EQ(0, animation->timeOffset());
36 EXPECT_FALSE(animation->alternatesDirection());
37 }
38
39 // Linux/Win bots failed on this test.
40 // https://bugs.webkit.org/show_bug.cgi?id=90651
41 #if OS(WINDOWS)
42 #define MAYBE_ModifiedSettings DISABLED_ModifiedSettings
43 #elif OS(LINUX)
44 #define MAYBE_ModifiedSettings DISABLED_ModifiedSettings
45 #else
46 #define MAYBE_ModifiedSettings ModifiedSettings
47 #endif
48 TEST(WebAnimationTest, MAYBE_ModifiedSettings)
49 {
50 OwnPtr<WebFloatAnimationCurve> curve = adoptPtr(WebFloatAnimationCurve::crea te());
51 OwnPtr<WebAnimation> animation = adoptPtr(WebAnimation::create(*curve, WebAn imation::TargetPropertyOpacity));
52 animation->setIterations(2);
53 animation->setStartTime(2);
54 animation->setTimeOffset(2);
55 animation->setAlternatesDirection(true);
56
57 EXPECT_EQ(2, animation->iterations());
58 EXPECT_EQ(2, animation->startTime());
59 EXPECT_EQ(2, animation->timeOffset());
60 EXPECT_TRUE(animation->alternatesDirection());
61 }
62
63 } // namespace
OLDNEW
« no previous file with comments | « webkit/compositor/WebAnimationImpl.cpp ('k') | webkit/compositor/WebCompositorImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698