OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 <map> | 5 #include <map> |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/rand_util.h" | 8 #include "base/rand_util.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 3326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3337 } | 3337 } |
3338 | 3338 |
3339 // Verify that new layer scales content only if the old layer does. | 3339 // Verify that new layer scales content only if the old layer does. |
3340 TEST_F(ViewLayerTest, RecreateLayer) { | 3340 TEST_F(ViewLayerTest, RecreateLayer) { |
3341 scoped_ptr<View> v(new View()); | 3341 scoped_ptr<View> v(new View()); |
3342 v->SetPaintToLayer(true); | 3342 v->SetPaintToLayer(true); |
3343 // Set to non default value. | 3343 // Set to non default value. |
3344 v->layer()->set_scale_content(false); | 3344 v->layer()->set_scale_content(false); |
3345 scoped_ptr<ui::Layer> old_layer(v->RecreateLayer()); | 3345 scoped_ptr<ui::Layer> old_layer(v->RecreateLayer()); |
3346 ui::Layer* new_layer = v->layer(); | 3346 ui::Layer* new_layer = v->layer(); |
3347 EXPECT_EQ(false, new_layer->scale_content()); | 3347 EXPECT_FALSE(new_layer->scale_content()); |
3348 } | 3348 } |
3349 | 3349 |
3350 #endif // USE_AURA | 3350 #endif // USE_AURA |
3351 | 3351 |
3352 } // namespace views | 3352 } // namespace views |
OLD | NEW |