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

Unified Diff: blimp/engine/renderer/frame_scheduler_unittest.cc

Issue 2445093002: cc/blimp: Add synchronization for scroll/scale state. (Closed)
Patch Set: test compile Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/engine/renderer/frame_scheduler.cc ('k') | cc/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/engine/renderer/frame_scheduler_unittest.cc
diff --git a/blimp/engine/renderer/frame_scheduler_unittest.cc b/blimp/engine/renderer/frame_scheduler_unittest.cc
index f8c945e7ed4bc167d1f270a8a995906136ff9344..fda72fc5530a20cde7cef551b146b7f3d55fe136 100644
--- a/blimp/engine/renderer/frame_scheduler_unittest.cc
+++ b/blimp/engine/renderer/frame_scheduler_unittest.cc
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <blimp/engine/renderer/frame_scheduler.h>
+#include "blimp/engine/renderer/frame_scheduler.h"
+
#include "base/run_loop.h"
#include "base/threading/thread_task_runner_handle.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -11,19 +12,11 @@ namespace blimp {
namespace engine {
namespace {
-class FrameSchedulerForTesting : public FrameScheduler {
- public:
- explicit FrameSchedulerForTesting(FrameSchedulerClient* client)
- // Use a zero time delta to let tests run main frames back-to-back.
- : FrameScheduler(base::TimeDelta::FromSeconds(0),
- base::ThreadTaskRunnerHandle::Get(),
- client) {}
- ~FrameSchedulerForTesting() override = default;
-};
-
class FrameSchedulerTest : public testing::Test, public FrameSchedulerClient {
public:
- FrameSchedulerTest() : scheduler_(this) {}
+ FrameSchedulerTest() : scheduler_(base::ThreadTaskRunnerHandle::Get(), this) {
+ scheduler_.set_frame_delay_for_testing(base::TimeDelta::FromSeconds(0));
+ }
~FrameSchedulerTest() override {}
// FrameSchedulerClient implementation.
@@ -37,7 +30,7 @@ class FrameSchedulerTest : public testing::Test, public FrameSchedulerClient {
protected:
base::MessageLoop loop_;
- FrameSchedulerForTesting scheduler_;
+ FrameScheduler scheduler_;
int num_frames_ = 0;
bool send_client_update_during_frame_ = false;
« no previous file with comments | « blimp/engine/renderer/frame_scheduler.cc ('k') | cc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698