| 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 27 matching lines...) Expand all Loading... |
| 38 #include "views/widget/native_widget.h" | 38 #include "views/widget/native_widget.h" |
| 39 #include "views/widget/root_view.h" | 39 #include "views/widget/root_view.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/desktop.h" |
| 46 #endif | 46 #endif |
| 47 #if defined(TOUCH_UI) | 47 #if defined(TOUCH_UI) |
| 48 #include "views/touchui/gesture_recognizer.h" | 48 #include "ui/views/touchui/gesture_recognizer.h" |
| 49 #endif | 49 #endif |
| 50 | 50 |
| 51 using ::testing::_; | 51 using ::testing::_; |
| 52 | 52 |
| 53 namespace { | 53 namespace { |
| 54 | 54 |
| 55 // Returns true if |ancestor| is an ancestor of |layer|. | 55 // Returns true if |ancestor| is an ancestor of |layer|. |
| 56 bool LayerIsAncestor(const ui::Layer* ancestor, const ui::Layer* layer) { | 56 bool LayerIsAncestor(const ui::Layer* ancestor, const ui::Layer* layer) { |
| 57 while (layer && layer != ancestor) | 57 while (layer && layer != ancestor) |
| 58 layer = layer->parent(); | 58 layer = layer->parent(); |
| (...skipping 3385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3444 ScrambleTree(content); | 3444 ScrambleTree(content); |
| 3445 EXPECT_TRUE(ViewAndLayerTreeAreConsistent(content, content->layer())); | 3445 EXPECT_TRUE(ViewAndLayerTreeAreConsistent(content, content->layer())); |
| 3446 | 3446 |
| 3447 ScrambleTree(content); | 3447 ScrambleTree(content); |
| 3448 EXPECT_TRUE(ViewAndLayerTreeAreConsistent(content, content->layer())); | 3448 EXPECT_TRUE(ViewAndLayerTreeAreConsistent(content, content->layer())); |
| 3449 } | 3449 } |
| 3450 | 3450 |
| 3451 #endif // VIEWS_COMPOSITOR | 3451 #endif // VIEWS_COMPOSITOR |
| 3452 | 3452 |
| 3453 } // namespace views | 3453 } // namespace views |
| OLD | NEW |