Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(779)

Side by Side Diff: ui/views/view_unittest.cc

Issue 107363004: ui/views: Remove gmock dependency from views_unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/single_split_view_unittest.cc ('k') | ui/views/views.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "grit/ui_strings.h" 11 #include "grit/ui_strings.h"
12 #include "testing/gmock/include/gmock/gmock.h"
13 #include "ui/base/accelerators/accelerator.h" 12 #include "ui/base/accelerators/accelerator.h"
14 #include "ui/base/clipboard/clipboard.h" 13 #include "ui/base/clipboard/clipboard.h"
15 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
16 #include "ui/compositor/compositor.h" 15 #include "ui/compositor/compositor.h"
17 #include "ui/compositor/layer.h" 16 #include "ui/compositor/layer.h"
18 #include "ui/compositor/layer_animator.h" 17 #include "ui/compositor/layer_animator.h"
19 #include "ui/events/event.h" 18 #include "ui/events/event.h"
20 #include "ui/events/keycodes/keyboard_codes.h" 19 #include "ui/events/keycodes/keyboard_codes.h"
21 #include "ui/gfx/canvas.h" 20 #include "ui/gfx/canvas.h"
22 #include "ui/gfx/path.h" 21 #include "ui/gfx/path.h"
(...skipping 13 matching lines...) Expand all
36 #include "ui/views/window/dialog_delegate.h" 35 #include "ui/views/window/dialog_delegate.h"
37 36
38 #if defined(OS_WIN) 37 #if defined(OS_WIN)
39 #include "ui/views/test/test_views_delegate.h" 38 #include "ui/views/test/test_views_delegate.h"
40 #endif 39 #endif
41 #if defined(USE_AURA) 40 #if defined(USE_AURA)
42 #include "ui/aura/root_window.h" 41 #include "ui/aura/root_window.h"
43 #include "ui/events/gestures/gesture_recognizer.h" 42 #include "ui/events/gestures/gesture_recognizer.h"
44 #endif 43 #endif
45 44
46 using ::testing::_;
47
48 namespace { 45 namespace {
49 46
50 // Returns true if |ancestor| is an ancestor of |layer|. 47 // Returns true if |ancestor| is an ancestor of |layer|.
51 bool LayerIsAncestor(const ui::Layer* ancestor, const ui::Layer* layer) { 48 bool LayerIsAncestor(const ui::Layer* ancestor, const ui::Layer* layer) {
52 while (layer && layer != ancestor) 49 while (layer && layer != ancestor)
53 layer = layer->parent(); 50 layer = layer->parent();
54 return layer == ancestor; 51 return layer == ancestor;
55 } 52 }
56 53
57 // Convenience functions for walking a View tree. 54 // Convenience functions for walking a View tree.
(...skipping 3450 matching lines...) Expand 10 before | Expand all | Expand 10 after
3508 const std::vector<ui::Layer*>& child_layers_post = root_layer->children(); 3505 const std::vector<ui::Layer*>& child_layers_post = root_layer->children();
3509 ASSERT_EQ(3u, child_layers_post.size()); 3506 ASSERT_EQ(3u, child_layers_post.size());
3510 EXPECT_EQ(v1->layer(), child_layers_post[0]); 3507 EXPECT_EQ(v1->layer(), child_layers_post[0]);
3511 EXPECT_EQ(v2->layer(), child_layers_post[1]); 3508 EXPECT_EQ(v2->layer(), child_layers_post[1]);
3512 EXPECT_EQ(v1_old_layer, child_layers_post[2]); 3509 EXPECT_EQ(v1_old_layer, child_layers_post[2]);
3513 } 3510 }
3514 3511
3515 #endif // USE_AURA 3512 #endif // USE_AURA
3516 3513
3517 } // namespace views 3514 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/single_split_view_unittest.cc ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698