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

Side by Side Diff: webkit/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc

Issue 12496013: Move compositor bindings implementations out of WebKit::, fix style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <vector>
5 #include "cc/layers/picture_image_layer.h" 6 #include "cc/layers/picture_image_layer.h"
6 #include "cc/test/geometry_test_utils.h" 7 #include "cc/test/geometry_test_utils.h"
7 #include "cc/trees/layer_tree_host_common.h" 8 #include "cc/trees/layer_tree_host_common.h"
8 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
9 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h" 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h"
10 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
11 #include "third_party/skia/include/utils/SkMatrix44.h" 12 #include "third_party/skia/include/utils/SkMatrix44.h"
12 #include "ui/gfx/point3_f.h" 13 #include "ui/gfx/point3_f.h"
13 #include "webkit/compositor_bindings/web_layer_impl_fixed_bounds.h" 14 #include "webkit/compositor_bindings/web_layer_impl_fixed_bounds.h"
14 15
15 using namespace WebKit; 16 using WebKit::WebFloatPoint;
17 using WebKit::WebSize;
18
19 namespace webkit {
20 namespace {
16 21
17 TEST(WebLayerImplFixedBoundsTest, IdentityBounds) { 22 TEST(WebLayerImplFixedBoundsTest, IdentityBounds) {
18 scoped_ptr<WebLayerImplFixedBounds> layer(new WebLayerImplFixedBounds()); 23 scoped_ptr<WebLayerImplFixedBounds> layer(new WebLayerImplFixedBounds());
19 layer->setAnchorPoint(WebFloatPoint(0, 0)); 24 layer->setAnchorPoint(WebFloatPoint(0, 0));
20 layer->SetFixedBounds(gfx::Size(100, 100)); 25 layer->SetFixedBounds(gfx::Size(100, 100));
21 layer->setBounds(WebSize(100, 100)); 26 layer->setBounds(WebSize(100, 100));
22 EXPECT_EQ(WebSize(100, 100), layer->bounds()); 27 EXPECT_EQ(WebSize(100, 100), layer->bounds());
23 EXPECT_EQ(gfx::Size(100, 100), layer->layer()->bounds()); 28 EXPECT_EQ(gfx::Size(100, 100), layer->layer()->bounds());
24 EXPECT_EQ(gfx::Transform(), layer->layer()->transform()); 29 EXPECT_EQ(gfx::Transform(), layer->layer()->transform());
25 } 30 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0, 0), 185 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0, 0),
181 transform, 186 transform,
182 sublayer_transform); 187 sublayer_transform);
183 188
184 // With non-zero anchor point, WebLayerImplFixedBounds will fall back to 189 // With non-zero anchor point, WebLayerImplFixedBounds will fall back to
185 // WebLayerImpl. 190 // WebLayerImpl.
186 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0.4f, 0.6f), 191 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0.4f, 0.6f),
187 transform, 192 transform,
188 sublayer_transform); 193 sublayer_transform);
189 } 194 }
195
196 } // namespace
197 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698