OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 24 matching lines...) Expand all Loading... |
35 #include "ui/views/view.h" | 35 #include "ui/views/view.h" |
36 #include "ui/views/views_delegate.h" | 36 #include "ui/views/views_delegate.h" |
37 #include "ui/views/widget/native_widget.h" | 37 #include "ui/views/widget/native_widget.h" |
38 #include "ui/views/widget/root_view.h" | 38 #include "ui/views/widget/root_view.h" |
39 #include "ui/views/window/dialog_delegate.h" | 39 #include "ui/views/window/dialog_delegate.h" |
40 | 40 |
41 #if defined(OS_WIN) | 41 #if defined(OS_WIN) |
42 #include "ui/views/test/test_views_delegate.h" | 42 #include "ui/views/test/test_views_delegate.h" |
43 #endif | 43 #endif |
44 #if defined(USE_AURA) | 44 #if defined(USE_AURA) |
45 #include "ui/aura/desktop.h" | 45 #include "ui/aura/root_window.h" |
46 #endif | 46 #endif |
47 | 47 |
48 using ::testing::_; | 48 using ::testing::_; |
49 | 49 |
50 namespace { | 50 namespace { |
51 | 51 |
52 // Returns true if |ancestor| is an ancestor of |layer|. | 52 // Returns true if |ancestor| is an ancestor of |layer|. |
53 bool LayerIsAncestor(const ui::Layer* ancestor, const ui::Layer* layer) { | 53 bool LayerIsAncestor(const ui::Layer* ancestor, const ui::Layer* layer) { |
54 while (layer && layer != ancestor) | 54 while (layer && layer != ancestor) |
55 layer = layer->parent(); | 55 layer = layer->parent(); |
(...skipping 3003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3059 ScrambleTree(content); | 3059 ScrambleTree(content); |
3060 EXPECT_TRUE(ViewAndLayerTreeAreConsistent(content, content->layer())); | 3060 EXPECT_TRUE(ViewAndLayerTreeAreConsistent(content, content->layer())); |
3061 | 3061 |
3062 ScrambleTree(content); | 3062 ScrambleTree(content); |
3063 EXPECT_TRUE(ViewAndLayerTreeAreConsistent(content, content->layer())); | 3063 EXPECT_TRUE(ViewAndLayerTreeAreConsistent(content, content->layer())); |
3064 } | 3064 } |
3065 | 3065 |
3066 #endif // VIEWS_COMPOSITOR | 3066 #endif // VIEWS_COMPOSITOR |
3067 | 3067 |
3068 } // namespace views | 3068 } // namespace views |
OLD | NEW |