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

Side by Side Diff: cc/layers/nine_patch_layer_unittest.cc

Issue 2171143002: cc: Get rid of non-delegated rendering in most cc unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@killdirecttests
Patch Set: fakeoutputsurface: no-constructor Created 4 years, 5 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/nine_patch_layer.h" 5 #include "cc/layers/nine_patch_layer.h"
6 6
7 #include "cc/resources/resource_provider.h" 7 #include "cc/resources/resource_provider.h"
8 #include "cc/resources/scoped_ui_resource.h" 8 #include "cc/resources/scoped_ui_resource.h"
9 #include "cc/test/fake_layer_tree_host.h" 9 #include "cc/test/fake_layer_tree_host.h"
10 #include "cc/test/fake_layer_tree_host_client.h" 10 #include "cc/test/fake_layer_tree_host_client.h"
11 #include "cc/test/fake_output_surface.h" 11 #include "cc/test/fake_output_surface.h"
12 #include "cc/test/fake_output_surface_client.h" 12 #include "cc/test/fake_output_surface_client.h"
13 #include "cc/test/geometry_test_utils.h" 13 #include "cc/test/geometry_test_utils.h"
14 #include "cc/test/test_task_graph_runner.h" 14 #include "cc/test/test_task_graph_runner.h"
15 #include "cc/trees/layer_tree_host.h" 15 #include "cc/trees/layer_tree_host.h"
16 #include "cc/trees/single_thread_proxy.h" 16 #include "cc/trees/single_thread_proxy.h"
17 #include "testing/gmock/include/gmock/gmock.h" 17 #include "testing/gmock/include/gmock/gmock.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 #include "third_party/skia/include/core/SkBitmap.h" 19 #include "third_party/skia/include/core/SkBitmap.h"
20 20
21 using ::testing::Mock; 21 using ::testing::Mock;
22 using ::testing::_; 22 using ::testing::_;
23 using ::testing::AtLeast; 23 using ::testing::AtLeast;
24 using ::testing::AnyNumber; 24 using ::testing::AnyNumber;
25 25
26 namespace cc { 26 namespace cc {
27 namespace { 27 namespace {
28 28
29 class NinePatchLayerTest : public testing::Test { 29 class NinePatchLayerTest : public testing::Test {
30 public:
31 NinePatchLayerTest() : fake_client_(FakeLayerTreeHostClient::DIRECT_3D) {}
32
33 protected: 30 protected:
34 void SetUp() override { 31 void SetUp() override {
35 layer_tree_host_ = 32 layer_tree_host_ =
36 FakeLayerTreeHost::Create(&fake_client_, &task_graph_runner_); 33 FakeLayerTreeHost::Create(&fake_client_, &task_graph_runner_);
37 } 34 }
38 35
39 void TearDown() override { 36 void TearDown() override {
40 Mock::VerifyAndClearExpectations(layer_tree_host_.get()); 37 Mock::VerifyAndClearExpectations(layer_tree_host_.get());
41 } 38 }
42 39
(...skipping 26 matching lines...) Expand all
69 test_layer->SetAperture(aperture); 66 test_layer->SetAperture(aperture);
70 test_layer->SetUIResourceId(resource->id()); 67 test_layer->SetUIResourceId(resource->id());
71 test_layer->SetFillCenter(fill_center); 68 test_layer->SetFillCenter(fill_center);
72 test_layer->Update(); 69 test_layer->Update();
73 70
74 EXPECT_TRUE(test_layer->DrawsContent()); 71 EXPECT_TRUE(test_layer->DrawsContent());
75 } 72 }
76 73
77 } // namespace 74 } // namespace
78 } // namespace cc 75 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/nine_patch_layer_impl_unittest.cc ('k') | cc/layers/painted_scrollbar_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698