Changeset 121863 in webkit


Ignore:
Timestamp:
Jul 4, 2012 10:18:17 AM (12 years ago)
Author:
danakj@chromium.org
Message:

[chromium] Remove CCLayerTreeHostTestThreadOnly class to cleanup CCLayerTreeHostTests
https://bugs.webkit.org/show_bug.cgi?id=90556

Reviewed by Adrienne Walker.

Currently many tests that run both single and threaded versions subclass
from CCLayerTreeHostTestThreadOnly just from copy/pasting. The class
only adds a runTestThreaded() which calls runTest(true). Many other
tests do run only in threaded mode call runTest(true) themselves, making
for an inconsistent mess.

We remove CCLayerTreeHostTestThreadOnly class, so we don't have tests
inheriting it that are not thread-only. And now all tests that are
thread-only call runTest(true) consistently.

  • tests/CCLayerTreeHostTest.cpp:

(WTF::TEST_F):

Location:
trunk/Source/WebKit/chromium
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r121861 r121863  
     12012-07-04  Dana Jansens  <danakj@chromium.org>
     2
     3        [chromium] Remove CCLayerTreeHostTestThreadOnly class to cleanup CCLayerTreeHostTests
     4        https://bugs.webkit.org/show_bug.cgi?id=90556
     5
     6        Reviewed by Adrienne Walker.
     7
     8        Currently many tests that run both single and threaded versions subclass
     9        from CCLayerTreeHostTestThreadOnly just from copy/pasting. The class
     10        only adds a runTestThreaded() which calls runTest(true). Many other
     11        tests do run only in threaded mode call runTest(true) themselves, making
     12        for an inconsistent mess.
     13
     14        We remove CCLayerTreeHostTestThreadOnly class, so we don't have tests
     15        inheriting it that are not thread-only. And now all tests that are
     16        thread-only call runTest(true) consistently.
     17
     18        * tests/CCLayerTreeHostTest.cpp:
     19        (WTF::TEST_F):
     20
    1212012-07-04  John Mellor  <johnme@chromium.org>
    222
  • trunk/Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp

    r121628 r121863  
    5858
    5959class CCLayerTreeHostTest : public CCThreadedTest { };
    60 class CCLayerTreeHostTestThreadOnly : public CCThreadedTestThreadOnly { };
    6160
    6261// Shortlived layerTreeHosts shouldn't die.
     
    126125
    127126// Test interleaving of redraws and commits
    128 class CCLayerTreeHostTestCommitingWithContinuousRedraw : public CCLayerTreeHostTestThreadOnly {
     127class CCLayerTreeHostTestCommitingWithContinuousRedraw : public CCLayerTreeHostTest {
    129128public:
    130129    CCLayerTreeHostTestCommitingWithContinuousRedraw()
     
    165164TEST_F(CCLayerTreeHostTestCommitingWithContinuousRedraw, runMultiThread)
    166165{
    167     runTestThreaded();
     166    runTest(true);
    168167}
    169168
    170169// Two setNeedsCommits in a row should lead to at least 1 commit and at least 1
    171170// draw with frame 0.
    172 class CCLayerTreeHostTestSetNeedsCommit1 : public CCLayerTreeHostTestThreadOnly {
     171class CCLayerTreeHostTestSetNeedsCommit1 : public CCLayerTreeHostTest {
    173172public:
    174173    CCLayerTreeHostTestSetNeedsCommit1()
     
    209208TEST_F(CCLayerTreeHostTestSetNeedsCommit1, DISABLED_runMultiThread)
    210209{
    211     runTestThreaded();
     210    runTest(true);
    212211}
    213212
    214213// A setNeedsCommit should lead to 1 commit. Issuing a second commit after that
    215214// first committed frame draws should lead to another commit.
    216 class CCLayerTreeHostTestSetNeedsCommit2 : public CCLayerTreeHostTestThreadOnly {
     215class CCLayerTreeHostTestSetNeedsCommit2 : public CCLayerTreeHostTest {
    217216public:
    218217    CCLayerTreeHostTestSetNeedsCommit2()
     
    258257#endif
    259258{
    260     runTestThreaded();
     259    runTest(true);
    261260}
    262261
    263262// 1 setNeedsRedraw after the first commit has completed should lead to 1
    264263// additional draw.
    265 class CCLayerTreeHostTestSetNeedsRedraw : public CCLayerTreeHostTestThreadOnly {
     264class CCLayerTreeHostTestSetNeedsRedraw : public CCLayerTreeHostTest {
    266265public:
    267266    CCLayerTreeHostTestSetNeedsRedraw()
     
    305304TEST_F(CCLayerTreeHostTestSetNeedsRedraw, runMultiThread)
    306305{
    307     runTestThreaded();
     306    runTest(true);
    308307}
    309308
    310309// If the layerTreeHost says it can't draw, then we should not try to draw.
    311 class CCLayerTreeHostTestCanDrawBlocksDrawing : public CCLayerTreeHostTestThreadOnly {
     310class CCLayerTreeHostTestCanDrawBlocksDrawing : public CCLayerTreeHostTest {
    312311public:
    313312    CCLayerTreeHostTestCanDrawBlocksDrawing()
     
    363362
    364363// beginLayerWrite should prevent draws from executing until a commit occurs
    365 class CCLayerTreeHostTestWriteLayersRedraw : public CCLayerTreeHostTestThreadOnly {
     364class CCLayerTreeHostTestWriteLayersRedraw : public CCLayerTreeHostTest {
    366365public:
    367366    CCLayerTreeHostTestWriteLayersRedraw()
     
    402401TEST_F(CCLayerTreeHostTestWriteLayersRedraw, runMultiThread)
    403402{
    404     runTestThreaded();
     403    runTest(true);
    405404}
    406405
     
    410409// switching. There are no failure conditions to this test, it just passes
    411410// by not timing out.
    412 class CCLayerTreeHostTestWriteLayersAfterVisible : public CCLayerTreeHostTestThreadOnly {
     411class CCLayerTreeHostTestWriteLayersAfterVisible : public CCLayerTreeHostTest {
    413412public:
    414413    CCLayerTreeHostTestWriteLayersAfterVisible()
     
    445444TEST_F(CCLayerTreeHostTestWriteLayersAfterVisible, runMultiThread)
    446445{
    447     runTestThreaded();
     446    runTest(true);
    448447}
    449448
    450449// A compositeAndReadback while invisible should force a normal commit without assertion.
    451 class CCLayerTreeHostTestCompositeAndReadbackWhileInvisible : public CCLayerTreeHostTestThreadOnly {
     450class CCLayerTreeHostTestCompositeAndReadbackWhileInvisible : public CCLayerTreeHostTest {
    452451public:
    453452    CCLayerTreeHostTestCompositeAndReadbackWhileInvisible()
     
    484483TEST_F(CCLayerTreeHostTestCompositeAndReadbackWhileInvisible, runMultiThread)
    485484{
    486     runTestThreaded();
    487 }
    488 
    489 class CCLayerTreeHostTestAbortFrameWhenInvisible : public CCLayerTreeHostTestThreadOnly {
     485    runTest(true);
     486}
     487
     488class CCLayerTreeHostTestAbortFrameWhenInvisible : public CCLayerTreeHostTest {
    490489public:
    491490    CCLayerTreeHostTestAbortFrameWhenInvisible()
     
    518517TEST_F(CCLayerTreeHostTestAbortFrameWhenInvisible, runMultiThread)
    519518{
    520     runTestThreaded();
     519    runTest(true);
    521520}
    522521
     
    527526// handling the case where setNeedsAnimate() is called inside the begin frame
    528527// flow.
    529 class CCLayerTreeHostTestSetNeedsAnimateInsideAnimationCallback : public CCLayerTreeHostTestThreadOnly {
     528class CCLayerTreeHostTestSetNeedsAnimateInsideAnimationCallback : public CCLayerTreeHostTest {
    530529public:
    531530    CCLayerTreeHostTestSetNeedsAnimateInsideAnimationCallback()
     
    559558TEST_F(CCLayerTreeHostTestSetNeedsAnimateInsideAnimationCallback, runMultiThread)
    560559{
    561     runTestThreaded();
     560    runTest(true);
    562561}
    563562
    564563// Add a layer animation and confirm that CCLayerTreeHostImpl::animateLayers does get
    565564// called and continues to get called.
    566 class CCLayerTreeHostTestAddAnimation : public CCLayerTreeHostTestThreadOnly {
     565class CCLayerTreeHostTestAddAnimation : public CCLayerTreeHostTest {
    567566public:
    568567    CCLayerTreeHostTestAddAnimation()
     
    615614TEST_F(CCLayerTreeHostTestAddAnimation, runMultiThread)
    616615{
    617     runTestThreaded();
     616    runTest(true);
    618617}
    619618
    620619// Add a layer animation to a layer, but continually fail to draw. Confirm that after
    621620// a while, we do eventually force a draw.
    622 class CCLayerTreeHostTestCheckerboardDoesNotStarveDraws : public CCLayerTreeHostTestThreadOnly {
     621class CCLayerTreeHostTestCheckerboardDoesNotStarveDraws : public CCLayerTreeHostTest {
    623622public:
    624623    CCLayerTreeHostTestCheckerboardDoesNotStarveDraws()
     
    659658TEST_F(CCLayerTreeHostTestCheckerboardDoesNotStarveDraws, runMultiThread)
    660659{
    661     runTestThreaded();
     660    runTest(true);
    662661}
    663662
    664663// Ensures that animations continue to be ticked when we are backgrounded.
    665 class CCLayerTreeHostTestTickAnimationWhileBackgrounded : public CCLayerTreeHostTestThreadOnly {
     664class CCLayerTreeHostTestTickAnimationWhileBackgrounded : public CCLayerTreeHostTest {
    666665public:
    667666    CCLayerTreeHostTestTickAnimationWhileBackgrounded()
     
    702701
    703702// Ensures that animations continue to be ticked when we are backgrounded.
    704 class CCLayerTreeHostTestAddAnimationWithTimingFunction : public CCLayerTreeHostTestThreadOnly {
     703class CCLayerTreeHostTestAddAnimationWithTimingFunction : public CCLayerTreeHostTest {
    705704public:
    706705    CCLayerTreeHostTestAddAnimationWithTimingFunction()
     
    740739
    741740// Ensures that when opacity is being animated, this value does not cause the subtree to be skipped.
    742 class CCLayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity : public CCLayerTreeHostTestThreadOnly {
     741class CCLayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity : public CCLayerTreeHostTest {
    743742public:
    744743    CCLayerTreeHostTestDoNotSkipLayersWithAnimatedOpacity()
     
    775774#endif
    776775{
    777     runTestThreaded();
     776    runTest(true);
    778777}
    779778
    780779// Ensures that main thread animations have their start times synchronized with impl thread animations.
    781 class CCLayerTreeHostTestSynchronizeAnimationStartTimes : public CCLayerTreeHostTestThreadOnly {
     780class CCLayerTreeHostTestSynchronizeAnimationStartTimes : public CCLayerTreeHostTest {
    782781public:
    783782    CCLayerTreeHostTestSynchronizeAnimationStartTimes()
     
    822821
    823822// Ensures that main thread animations have their start times synchronized with impl thread animations.
    824 class CCLayerTreeHostTestAnimationFinishedEvents : public CCLayerTreeHostTestThreadOnly {
     823class CCLayerTreeHostTestAnimationFinishedEvents : public CCLayerTreeHostTest {
    825824public:
    826825    CCLayerTreeHostTestAnimationFinishedEvents()
     
    847846SINGLE_AND_MULTI_THREAD_TEST_F(CCLayerTreeHostTestAnimationFinishedEvents)
    848847
    849 class CCLayerTreeHostTestScrollSimple : public CCLayerTreeHostTestThreadOnly {
     848class CCLayerTreeHostTestScrollSimple : public CCLayerTreeHostTest {
    850849public:
    851850    CCLayerTreeHostTestScrollSimple()
     
    917916TEST_F(CCLayerTreeHostTestScrollSimple, DISABLED_runMultiThread)
    918917{
    919     runTestThreaded();
    920 }
    921 
    922 class CCLayerTreeHostTestScrollMultipleRedraw : public CCLayerTreeHostTestThreadOnly {
     918    runTest(true);
     919}
     920
     921class CCLayerTreeHostTestScrollMultipleRedraw : public CCLayerTreeHostTest {
    923922public:
    924923    CCLayerTreeHostTestScrollMultipleRedraw()
     
    997996TEST_F(CCLayerTreeHostTestScrollMultipleRedraw, DISABLED_runMultiThread)
    998997{
    999     runTestThreaded();
     998    runTest(true);
    1000999}
    10011000
     
    19671966
    19681967// A loseContext(1) should lead to a didRecreateContext(true)
    1969 class CCLayerTreeHostTestSetSingleLostContext : public CCLayerTreeHostTestThreadOnly {
     1968class CCLayerTreeHostTestSetSingleLostContext : public CCLayerTreeHostTest {
    19701969public:
    19711970    CCLayerTreeHostTestSetSingleLostContext()
     
    19961995TEST_F(CCLayerTreeHostTestSetSingleLostContext, runMultiThread)
    19971996{
    1998     runTestThreaded();
     1997    runTest(true);
    19991998}
    20001999
    20012000// A loseContext(10) should lead to a didRecreateContext(false), and
    20022001// a finishAllRendering() should not hang.
    2003 class CCLayerTreeHostTestSetRepeatedLostContext : public CCLayerTreeHostTestThreadOnly {
     2002class CCLayerTreeHostTestSetRepeatedLostContext : public CCLayerTreeHostTest {
    20042003public:
    20052004    CCLayerTreeHostTestSetRepeatedLostContext()
     
    20312030TEST_F(CCLayerTreeHostTestSetRepeatedLostContext, runMultiThread)
    20322031{
    2033     runTestThreaded();
    2034 }
    2035 
    2036 class CCLayerTreeHostTestFractionalScroll : public CCLayerTreeHostTestThreadOnly {
     2032    runTest(true);
     2033}
     2034
     2035class CCLayerTreeHostTestFractionalScroll : public CCLayerTreeHostTest {
    20372036public:
    20382037    CCLayerTreeHostTestFractionalScroll()
     
    20842083TEST_F(CCLayerTreeHostTestFractionalScroll, runMultiThread)
    20852084{
    2086     runTestThreaded();
     2085    runTest(true);
    20872086}
    20882087
Note: See TracChangeset for help on using the changeset viewer.