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

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

Issue 2180973003: Remove death test in CompositorAnimationsTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 TEST_F(AnimationCompositorAnimationsTest, ConvertTimingForCompositorIterationCou nt) 388 TEST_F(AnimationCompositorAnimationsTest, ConvertTimingForCompositorIterationCou nt)
389 { 389 {
390 m_timing.iterationCount = 5.0; 390 m_timing.iterationCount = 5.0;
391 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); 391 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming));
392 EXPECT_EQ(5, m_compositorTiming.adjustedIterationCount); 392 EXPECT_EQ(5, m_compositorTiming.adjustedIterationCount);
393 393
394 m_timing.iterationCount = 5.5; 394 m_timing.iterationCount = 5.5;
395 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); 395 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming));
396 EXPECT_EQ(5.5, m_compositorTiming.adjustedIterationCount); 396 EXPECT_EQ(5.5, m_compositorTiming.adjustedIterationCount);
397 397
398 // EXPECT_DEATH tests are flaky on Android.
399 #if ENABLE(ASSERT) && !OS(ANDROID)
400 m_timing.iterationCount = -1;
401 EXPECT_DEATH(convertTimingForCompositor(m_timing, m_compositorTiming), "");
402 #endif
403
404 m_timing.iterationCount = std::numeric_limits<double>::infinity(); 398 m_timing.iterationCount = std::numeric_limits<double>::infinity();
405 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); 399 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming));
406 EXPECT_EQ(-1, m_compositorTiming.adjustedIterationCount); 400 EXPECT_EQ(-1, m_compositorTiming.adjustedIterationCount);
407 401
408 m_timing.iterationCount = std::numeric_limits<double>::infinity(); 402 m_timing.iterationCount = std::numeric_limits<double>::infinity();
409 m_timing.iterationDuration = 5.0; 403 m_timing.iterationDuration = 5.0;
410 m_timing.startDelay = -6.0; 404 m_timing.startDelay = -6.0;
411 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming)); 405 EXPECT_TRUE(convertTimingForCompositor(m_timing, m_compositorTiming));
412 EXPECT_DOUBLE_EQ(6.0, m_compositorTiming.scaledTimeOffset); 406 EXPECT_DOUBLE_EQ(6.0, m_compositorTiming.scaledTimeOffset);
413 EXPECT_EQ(-1, m_compositorTiming.adjustedIterationCount); 407 EXPECT_EQ(-1, m_compositorTiming.adjustedIterationCount);
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 simulateFrame(1.); 1001 simulateFrame(1.);
1008 1002
1009 element->setLayoutObject(nullptr); 1003 element->setLayoutObject(nullptr);
1010 LayoutObjectProxy::dispose(layoutObject); 1004 LayoutObjectProxy::dispose(layoutObject);
1011 1005
1012 ThreadHeap::collectAllGarbage(); 1006 ThreadHeap::collectAllGarbage();
1013 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty()); 1007 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty());
1014 } 1008 }
1015 1009
1016 } // namespace blink 1010 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698