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

Side by Side Diff: cc/scheduler_unittest.cc

Issue 11196014: Revert "cc: Switch to Chromium DCHECKs LOGs" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « cc/scheduler_state_machine.cc ('k') | cc/scoped_ptr_hash_map.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 "config.h" 5 #include "config.h"
6 6
7 #include "CCScheduler.h" 7 #include "CCScheduler.h"
8 8
9 #include "base/logging.h"
10 #include "cc/test/scheduler_test_common.h" 9 #include "cc/test/scheduler_test_common.h"
11 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
12 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
13 12
14 using namespace cc; 13 using namespace cc;
15 using namespace WebKitTests; 14 using namespace WebKitTests;
16 using namespace WTF; 15 using namespace WTF;
17 16
18 namespace { 17 namespace {
19 18
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossi ble() OVERRIDE 215 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossi ble() OVERRIDE
217 { 216 {
218 // Only setNeedsRedraw the first time this is called 217 // Only setNeedsRedraw the first time this is called
219 if (!m_numDraws) 218 if (!m_numDraws)
220 m_scheduler->setNeedsRedraw(); 219 m_scheduler->setNeedsRedraw();
221 return FakeCCSchedulerClient::scheduledActionDrawAndSwapIfPossible(); 220 return FakeCCSchedulerClient::scheduledActionDrawAndSwapIfPossible();
222 } 221 }
223 222
224 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced( ) OVERRIDE 223 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced( ) OVERRIDE
225 { 224 {
226 NOTREACHED(); 225 ASSERT_NOT_REACHED();
227 return CCScheduledActionDrawAndSwapResult(true, true); 226 return CCScheduledActionDrawAndSwapResult(true, true);
228 } 227 }
229 228
230 virtual void scheduledActionCommit() OVERRIDE { } 229 virtual void scheduledActionCommit() OVERRIDE { }
231 virtual void scheduledActionBeginContextRecreation() OVERRIDE { } 230 virtual void scheduledActionBeginContextRecreation() OVERRIDE { }
232 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE { } 231 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE { }
233 232
234 protected: 233 protected:
235 CCScheduler* m_scheduler; 234 CCScheduler* m_scheduler;
236 }; 235 };
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossi ble() OVERRIDE 317 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapIfPossi ble() OVERRIDE
319 { 318 {
320 // Only setNeedsCommit the first time this is called 319 // Only setNeedsCommit the first time this is called
321 if (!m_numDraws) 320 if (!m_numDraws)
322 m_scheduler->setNeedsCommit(); 321 m_scheduler->setNeedsCommit();
323 return FakeCCSchedulerClient::scheduledActionDrawAndSwapIfPossible(); 322 return FakeCCSchedulerClient::scheduledActionDrawAndSwapIfPossible();
324 } 323 }
325 324
326 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced( ) OVERRIDE 325 virtual CCScheduledActionDrawAndSwapResult scheduledActionDrawAndSwapForced( ) OVERRIDE
327 { 326 {
328 NOTREACHED(); 327 ASSERT_NOT_REACHED();
329 return CCScheduledActionDrawAndSwapResult(true, true); 328 return CCScheduledActionDrawAndSwapResult(true, true);
330 } 329 }
331 330
332 virtual void scheduledActionCommit() OVERRIDE { } 331 virtual void scheduledActionCommit() OVERRIDE { }
333 virtual void scheduledActionBeginContextRecreation() OVERRIDE { } 332 virtual void scheduledActionBeginContextRecreation() OVERRIDE { }
334 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE { } 333 virtual void didAnticipatedDrawTimeChange(base::TimeTicks) OVERRIDE { }
335 334
336 protected: 335 protected:
337 CCScheduler* m_scheduler; 336 CCScheduler* m_scheduler;
338 }; 337 };
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 // Get the compositor to do a scheduledActionDrawAndSwapForced. 461 // Get the compositor to do a scheduledActionDrawAndSwapForced.
463 scheduler->setNeedsRedraw(); 462 scheduler->setNeedsRedraw();
464 scheduler->setNeedsForcedRedraw(); 463 scheduler->setNeedsForcedRedraw();
465 EXPECT_TRUE(client.hasAction("scheduledActionDrawAndSwapForced")); 464 EXPECT_TRUE(client.hasAction("scheduledActionDrawAndSwapForced"));
466 465
467 // We should not have told the frame rate controller that we began a frame. 466 // We should not have told the frame rate controller that we began a frame.
468 EXPECT_EQ(0, controllerPtr->numFramesPending()); 467 EXPECT_EQ(0, controllerPtr->numFramesPending());
469 } 468 }
470 469
471 } 470 }
OLDNEW
« no previous file with comments | « cc/scheduler_state_machine.cc ('k') | cc/scoped_ptr_hash_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698