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

Side by Side Diff: cc/trees/remote_channel_unittest.cc

Issue 1513643010: cc:: Add remote mode to the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "cc/test/layer_tree_test.h"
6
7 namespace cc {
8
9 class RemoteChannelTest : public LayerTreeTest {
10 protected:
11 RemoteChannelTest() : calls_received_(0) {}
12
13 ~RemoteChannelTest() override {}
14
15 void BeginTest() override {
16 DCHECK(IsRemoteTest());
17 BeginChannelTest();
18 }
19 virtual void BeginChannelTest() {}
20
21 int calls_received_;
22
23 private:
24 DISALLOW_COPY_AND_ASSIGN(RemoteChannelTest);
25 };
26
27 class RemoteChannelTestInitializationAndShutdown : public RemoteChannelTest {
28 void OverrideLayerTreeSettings(LayerTreeSettings* settings) override {
29 calls_received_++;
30 EndTest();
31 }
32
33 void DidShutdown() override {
34 calls_received_++;
35 LayerTreeTest::DidShutdown();
36 }
37
38 void AfterTest() override { EXPECT_EQ(2, calls_received_); }
39 };
40
41 REMOTE_DIRECT_RENDERER_TEST_F(RemoteChannelTestInitializationAndShutdown);
42
43 class RemoteChannelTestMainThreadStoppedFlinging : public RemoteChannelTest {
44 void BeginChannelTest() override { proxy()->MainThreadHasStoppedFlinging(); }
45
46 void MainThreadHasStoppedFlingingOnImpl() override {
47 calls_received_++;
48 EndTest();
49 }
50
51 void AfterTest() override { EXPECT_EQ(1, calls_received_); }
52 };
53
54 REMOTE_DIRECT_RENDERER_TEST_F(RemoteChannelTestMainThreadStoppedFlinging);
55
56 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698