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

Side by Side Diff: cc/test/layer_tree_test_common.cc

Issue 12408028: cc: Delay start of scrollbar animation setNeedsRedraw. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to 188682 Created 7 years, 9 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 | « cc/test/fake_layer_tree_host_impl_client.h ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/layer_tree_test_common.h" 5 #include "cc/test/layer_tree_test_common.h"
6 6
7 #include "cc/animation.h" 7 #include "cc/animation.h"
8 #include "cc/animation_registrar.h" 8 #include "cc/animation_registrar.h"
9 #include "cc/base/thread_impl.h" 9 #include "cc/base/thread_impl.h"
10 #include "cc/content_layer.h" 10 #include "cc/content_layer.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 m_implThread.reset(new base::Thread("ThreadedTest")); 503 m_implThread.reset(new base::Thread("ThreadedTest"));
504 ASSERT_TRUE(m_implThread->Start()); 504 ASSERT_TRUE(m_implThread->Start());
505 } 505 }
506 506
507 m_mainCCThread = cc::ThreadImpl::CreateForCurrentThread(); 507 m_mainCCThread = cc::ThreadImpl::CreateForCurrentThread();
508 508
509 initializeSettings(m_settings); 509 initializeSettings(m_settings);
510 510
511 m_mainCCThread->PostTask(base::Bind(&ThreadedTest::doBeginTest, base::Unreta ined(this))); 511 m_mainCCThread->PostTask(base::Bind(&ThreadedTest::doBeginTest, base::Unreta ined(this)));
512 m_timeout.Reset(base::Bind(&ThreadedTest::timeout, base::Unretained(this))); 512 m_timeout.Reset(base::Bind(&ThreadedTest::timeout, base::Unretained(this)));
513 m_mainCCThread->PostDelayedTask(m_timeout.callback(), 5000); 513 m_mainCCThread->PostDelayedTask(m_timeout.callback(), base::TimeDelta::FromS econds(5));
514 MessageLoop::current()->Run(); 514 MessageLoop::current()->Run();
515 if (m_layerTreeHost.get() && m_layerTreeHost->root_layer()) 515 if (m_layerTreeHost.get() && m_layerTreeHost->root_layer())
516 m_layerTreeHost->root_layer()->SetLayerTreeHost(NULL); 516 m_layerTreeHost->root_layer()->SetLayerTreeHost(NULL);
517 m_layerTreeHost.reset(); 517 m_layerTreeHost.reset();
518 518
519 m_timeout.Cancel(); 519 m_timeout.Cancel();
520 520
521 ASSERT_FALSE(m_layerTreeHost.get()); 521 ASSERT_FALSE(m_layerTreeHost.get());
522 m_client.reset(); 522 m_client.reset();
523 if (m_timedOut) { 523 if (m_timedOut) {
524 FAIL() << "Test timed out"; 524 FAIL() << "Test timed out";
525 return; 525 return;
526 } 526 }
527 afterTest(); 527 afterTest();
528 } 528 }
529 529
530 } // namespace cc 530 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl_client.h ('k') | cc/test/scheduler_test_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698