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 2707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2718 Widget::InitParams params(Widget::InitParams::TYPE_POPUP); | 2718 Widget::InitParams params(Widget::InitParams::TYPE_POPUP); |
2719 params.bounds = gfx::Rect(50, 50, 200, 200); | 2719 params.bounds = gfx::Rect(50, 50, 200, 200); |
2720 widget_->Init(params); | 2720 widget_->Init(params); |
2721 widget_->Show(); | 2721 widget_->Show(); |
2722 widget_->GetRootView()->SetBounds(0, 0, 200, 200); | 2722 widget_->GetRootView()->SetBounds(0, 0, 200, 200); |
2723 } | 2723 } |
2724 | 2724 |
2725 virtual void TearDown() OVERRIDE { | 2725 virtual void TearDown() OVERRIDE { |
2726 View::set_use_acceleration_when_possible(old_use_acceleration_); | 2726 View::set_use_acceleration_when_possible(old_use_acceleration_); |
2727 widget_->CloseNow(); | 2727 widget_->CloseNow(); |
2728 Widget::SetPureViews(false); | |
2729 ViewsTestBase::TearDown(); | 2728 ViewsTestBase::TearDown(); |
2730 } | 2729 } |
2731 | 2730 |
2732 Widget* widget() { return widget_; } | 2731 Widget* widget() { return widget_; } |
2733 | 2732 |
2734 private: | 2733 private: |
2735 Widget* widget_; | 2734 Widget* widget_; |
2736 bool old_use_acceleration_; | 2735 bool old_use_acceleration_; |
2737 }; | 2736 }; |
2738 | 2737 |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3097 | 3096 |
3098 // Move c1 to the front. The layers should have moved too. | 3097 // Move c1 to the front. The layers should have moved too. |
3099 content->ReorderChildView(c1, -1); | 3098 content->ReorderChildView(c1, -1); |
3100 EXPECT_EQ(c1->layer(), parent_layer->children()[1]); | 3099 EXPECT_EQ(c1->layer(), parent_layer->children()[1]); |
3101 EXPECT_EQ(c2->layer(), parent_layer->children()[0]); | 3100 EXPECT_EQ(c2->layer(), parent_layer->children()[0]); |
3102 } | 3101 } |
3103 | 3102 |
3104 #endif // USE_AURA | 3103 #endif // USE_AURA |
3105 | 3104 |
3106 } // namespace views | 3105 } // namespace views |
OLD | NEW |