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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 tmp_rect.setEmpty(); | 833 tmp_rect.setEmpty(); |
834 CheckRect(v4->last_clip_, tmp_rect); | 834 CheckRect(v4->last_clip_, tmp_rect); |
835 | 835 |
836 window.DestroyWindow(); | 836 window.DestroyWindow(); |
837 } | 837 } |
838 */ | 838 */ |
839 | 839 |
840 TEST_F(ViewTest, RemoveNotification) { | 840 TEST_F(ViewTest, RemoveNotification) { |
841 ViewStorage* vs = ViewStorage::GetInstance(); | 841 ViewStorage* vs = ViewStorage::GetInstance(); |
842 Widget* widget = new Widget; | 842 Widget* widget = new Widget; |
843 widget->Init(Widget::InitParams(Widget::InitParams::TYPE_POPUP)); | 843 widget->Init(CreateParams(Widget::InitParams::TYPE_POPUP)); |
844 View* root_view = widget->GetRootView(); | 844 View* root_view = widget->GetRootView(); |
845 | 845 |
846 View* v1 = new View; | 846 View* v1 = new View; |
847 int s1 = vs->CreateStorageID(); | 847 int s1 = vs->CreateStorageID(); |
848 vs->StoreView(s1, v1); | 848 vs->StoreView(s1, v1); |
849 root_view->AddChildView(v1); | 849 root_view->AddChildView(v1); |
850 View* v11 = new View; | 850 View* v11 = new View; |
851 int s11 = vs->CreateStorageID(); | 851 int s11 = vs->CreateStorageID(); |
852 vs->StoreView(s11, v11); | 852 vs->StoreView(s11, v11); |
853 v1->AddChildView(v11); | 853 v1->AddChildView(v11); |
(...skipping 2550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3404 // Set to non default value. | 3404 // Set to non default value. |
3405 v->layer()->set_scale_content(false); | 3405 v->layer()->set_scale_content(false); |
3406 scoped_ptr<ui::Layer> old_layer(v->RecreateLayer()); | 3406 scoped_ptr<ui::Layer> old_layer(v->RecreateLayer()); |
3407 ui::Layer* new_layer = v->layer(); | 3407 ui::Layer* new_layer = v->layer(); |
3408 EXPECT_FALSE(new_layer->scale_content()); | 3408 EXPECT_FALSE(new_layer->scale_content()); |
3409 } | 3409 } |
3410 | 3410 |
3411 #endif // USE_AURA | 3411 #endif // USE_AURA |
3412 | 3412 |
3413 } // namespace views | 3413 } // namespace views |
OLD | NEW |