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

Side by Side Diff: content/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc

Issue 340723004: Disable WebLayerImplFixedBoundsTest.CompareToWebLayerImplComplex and CompareToWebLayerImplComplex o… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <vector>
6 #include "cc/layers/picture_image_layer.h" 6 #include "cc/layers/picture_image_layer.h"
7 #include "cc/test/fake_layer_tree_host.h" 7 #include "cc/test/fake_layer_tree_host.h"
8 #include "cc/test/geometry_test_utils.h" 8 #include "cc/test/geometry_test_utils.h"
9 #include "cc/trees/layer_tree_host_common.h" 9 #include "cc/trees/layer_tree_host_common.h"
10 #include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h" 10 #include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 inputs.device_scale_factor = kDeviceScaleFactor; 135 inputs.device_scale_factor = kDeviceScaleFactor;
136 inputs.page_scale_factor = kPageScaleFactor; 136 inputs.page_scale_factor = kPageScaleFactor;
137 inputs.page_scale_application_layer = root_layer->layer(), 137 inputs.page_scale_application_layer = root_layer->layer(),
138 cc::LayerTreeHostCommon::CalculateDrawProperties(&inputs); 138 cc::LayerTreeHostCommon::CalculateDrawProperties(&inputs);
139 139
140 ExpectEqualLayerRectsInTarget(normal_layer->layer(), 140 ExpectEqualLayerRectsInTarget(normal_layer->layer(),
141 fixed_bounds_layer->layer()); 141 fixed_bounds_layer->layer());
142 } 142 }
143 } 143 }
144 144
145 // TODO(perkj): CompareToWebLayerImplSimple disabled on LSAN due to crbug/386080
146 #if defined(LEAK_SANITIZER)
147 #define MAYBE_CompareToWebLayerImplSimple DISABLED_CompareToWebLayerImplSimple
148 #else
149 #define MAYBE_CompareToWebLayerImplSimple CompareToWebLayerImplSimple
150 #endif
145 // A black box test that ensures WebLayerImplFixedBounds won't change target 151 // A black box test that ensures WebLayerImplFixedBounds won't change target
146 // geometries. Simple case: identity transforms and zero anchor point. 152 // geometries. Simple case: identity transforms and zero anchor point.
147 TEST(WebLayerImplFixedBoundsTest, CompareToWebLayerImplSimple) { 153 TEST(WebLayerImplFixedBoundsTest, MAYBE_CompareToWebLayerImplSimple) {
148 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0, 0), gfx::Transform()); 154 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0, 0), gfx::Transform());
149 } 155 }
150 156
157 // TODO(perkj): CompareToWebLayerImplComplex disabled on LSAN due to
158 // crbug/386080
159 #if defined(LEAK_SANITIZER)
160 #define MAYBE_CompareToWebLayerImplComplex DISABLED_CompareToWebLayerImplComplex
161 #else
162 #define MAYBE_CompareToWebLayerImplComplex CompareToWebLayerImplComplex
163 #endif
151 // A black box test that ensures WebLayerImplFixedBounds won't change target 164 // A black box test that ensures WebLayerImplFixedBounds won't change target
152 // geometries. Complex case: complex transforms and non-zero anchor point. 165 // geometries. Complex case: complex transforms and non-zero anchor point.
153 TEST(WebLayerImplFixedBoundsTest, CompareToWebLayerImplComplex) { 166 TEST(WebLayerImplFixedBoundsTest, MAYBE_CompareToWebLayerImplComplex) {
154 gfx::Transform transform; 167 gfx::Transform transform;
155 // These are arbitrary values that should not affect the results. 168 // These are arbitrary values that should not affect the results.
156 transform.Translate3d(50, 60, 70); 169 transform.Translate3d(50, 60, 70);
157 transform.Scale3d(2, 3, 4); 170 transform.Scale3d(2, 3, 4);
158 transform.RotateAbout(gfx::Vector3dF(33, 44, 55), 99); 171 transform.RotateAbout(gfx::Vector3dF(33, 44, 55), 99);
159 172
160 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0, 0), transform); 173 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0, 0), transform);
161 174
162 // With non-zero anchor point, WebLayerImplFixedBounds will fall back to 175 // With non-zero anchor point, WebLayerImplFixedBounds will fall back to
163 // WebLayerImpl. 176 // WebLayerImpl.
164 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0.4f, 0.6f), transform); 177 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0.4f, 0.6f), transform);
165 } 178 }
166 179
167 } // namespace 180 } // namespace
168 } // namespace content 181 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698