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

Side by Side Diff: components/mus/focus_controller_unittest.cc

Issue 1340983002: Mandoline UI Process: Update namespaces and file names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 months 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
« no previous file with comments | « components/mus/focus_controller_delegate.h ('k') | components/mus/gesture_manager.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/mus/focus_controller.h" 5 #include "components/mus/focus_controller.h"
6 6
7 #include "components/mus/focus_controller_delegate.h" 7 #include "components/mus/focus_controller_delegate.h"
8 #include "components/mus/server_view.h" 8 #include "components/mus/server_view.h"
9 #include "components/mus/test_server_view_delegate.h" 9 #include "components/mus/test_server_view_delegate.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace view_manager { 12 namespace mus {
13 namespace { 13 namespace {
14 14
15 class TestFocusControllerDelegate : public FocusControllerDelegate { 15 class TestFocusControllerDelegate : public FocusControllerDelegate {
16 public: 16 public:
17 TestFocusControllerDelegate() 17 TestFocusControllerDelegate()
18 : change_count_(0u), 18 : change_count_(0u),
19 old_focused_view_(nullptr), 19 old_focused_view_(nullptr),
20 new_focused_view_(nullptr) {} 20 new_focused_view_(nullptr) {}
21 21
22 void ClearAll() { 22 void ClearAll() {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 EXPECT_EQ(0u, focus_delegate.change_count()); 97 EXPECT_EQ(0u, focus_delegate.change_count());
98 98
99 // Hide the parent of the focused view. 99 // Hide the parent of the focused view.
100 child.SetVisible(false); 100 child.SetVisible(false);
101 EXPECT_EQ(1u, focus_delegate.change_count()); 101 EXPECT_EQ(1u, focus_delegate.change_count());
102 EXPECT_EQ(&root, focus_delegate.new_focused_view()); 102 EXPECT_EQ(&root, focus_delegate.new_focused_view());
103 EXPECT_EQ(&child_child, focus_delegate.old_focused_view()); 103 EXPECT_EQ(&child_child, focus_delegate.old_focused_view());
104 focus_delegate.ClearAll(); 104 focus_delegate.ClearAll();
105 } 105 }
106 106
107 } // namespace view_manager 107 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/focus_controller_delegate.h ('k') | components/mus/gesture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698