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

Unified Diff: cc/layers/ui_resource_layer_unittest.cc

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/ui_resource_layer.cc ('k') | cc/layers/video_layer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/ui_resource_layer_unittest.cc
diff --git a/cc/layers/ui_resource_layer_unittest.cc b/cc/layers/ui_resource_layer_unittest.cc
index d0d356d6c5aa2c5eb6620c5876bdcbcd505a76b4..97d855bb39e850d22f50fc12e0ee31f352b670c2 100644
--- a/cc/layers/ui_resource_layer_unittest.cc
+++ b/cc/layers/ui_resource_layer_unittest.cc
@@ -31,8 +31,9 @@ namespace {
class TestUIResourceLayer : public UIResourceLayer {
public:
- static scoped_refptr<TestUIResourceLayer> Create() {
- return make_scoped_refptr(new TestUIResourceLayer());
+ static scoped_refptr<TestUIResourceLayer> Create(
+ const LayerSettings& settings) {
+ return make_scoped_refptr(new TestUIResourceLayer(settings));
}
UIResourceId GetUIResourceId() {
@@ -42,7 +43,10 @@ class TestUIResourceLayer : public UIResourceLayer {
}
protected:
- TestUIResourceLayer() : UIResourceLayer() { SetIsDrawable(true); }
+ explicit TestUIResourceLayer(const LayerSettings& settings)
+ : UIResourceLayer(settings) {
+ SetIsDrawable(true);
+ }
~TestUIResourceLayer() override {}
};
@@ -63,10 +67,12 @@ class UIResourceLayerTest : public testing::Test {
FakeLayerTreeHostClient fake_client_;
scoped_ptr<FakeLayerTreeHost> layer_tree_host_;
+ LayerSettings layer_settings_;
};
TEST_F(UIResourceLayerTest, SetBitmap) {
- scoped_refptr<UIResourceLayer> test_layer = TestUIResourceLayer::Create();
+ scoped_refptr<UIResourceLayer> test_layer =
+ TestUIResourceLayer::Create(layer_settings_);
ASSERT_TRUE(test_layer.get());
test_layer->SetBounds(gfx::Size(100, 100));
@@ -93,7 +99,8 @@ TEST_F(UIResourceLayerTest, SetBitmap) {
}
TEST_F(UIResourceLayerTest, SetUIResourceId) {
- scoped_refptr<TestUIResourceLayer> test_layer = TestUIResourceLayer::Create();
+ scoped_refptr<TestUIResourceLayer> test_layer =
+ TestUIResourceLayer::Create(layer_settings_);
ASSERT_TRUE(test_layer.get());
test_layer->SetBounds(gfx::Size(100, 100));
@@ -128,7 +135,8 @@ TEST_F(UIResourceLayerTest, SetUIResourceId) {
}
TEST_F(UIResourceLayerTest, BitmapClearedOnSetUIResourceId) {
- scoped_refptr<UIResourceLayer> test_layer = TestUIResourceLayer::Create();
+ scoped_refptr<UIResourceLayer> test_layer =
+ TestUIResourceLayer::Create(layer_settings_);
ASSERT_TRUE(test_layer.get());
test_layer->SetBounds(gfx::Size(100, 100));
« no previous file with comments | « cc/layers/ui_resource_layer.cc ('k') | cc/layers/video_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698