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

Side by Side Diff: ash/test/ash_test_helper.h

Issue 21519002: Prevent mouse from getting stuck on second display in login (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't create target window if a session is already active Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/test/ash_test_helper.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef ASH_TEST_ASH_TEST_HELPER_H_ 5 #ifndef ASH_TEST_ASH_TEST_HELPER_H_
6 #define ASH_TEST_ASH_TEST_HELPER_H_ 6 #define ASH_TEST_ASH_TEST_HELPER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 10
(...skipping 15 matching lines...) Expand all
26 class TestShellDelegate; 26 class TestShellDelegate;
27 27
28 // A helper class that does common initialization required for Ash. Creates a 28 // A helper class that does common initialization required for Ash. Creates a
29 // root window and an ash::Shell instance with a test delegate. 29 // root window and an ash::Shell instance with a test delegate.
30 class AshTestHelper { 30 class AshTestHelper {
31 public: 31 public:
32 explicit AshTestHelper(base::MessageLoopForUI* message_loop); 32 explicit AshTestHelper(base::MessageLoopForUI* message_loop);
33 ~AshTestHelper(); 33 ~AshTestHelper();
34 34
35 // Creates the ash::Shell and performs associated initialization. 35 // Creates the ash::Shell and performs associated initialization.
36 void SetUp(); 36 // Set |start_session| to true if the user should log in before
37 // the test is run.
38 void SetUp(bool start_session);
37 39
38 // Destroys the ash::Shell and performs associated cleanup. 40 // Destroys the ash::Shell and performs associated cleanup.
39 void TearDown(); 41 void TearDown();
40 42
41 // Returns a RootWindow. Usually this is the active RootWindow, but that 43 // Returns a RootWindow. Usually this is the active RootWindow, but that
42 // method can return NULL sometimes, and in those cases, we fall back on the 44 // method can return NULL sometimes, and in those cases, we fall back on the
43 // primary RootWindow. 45 // primary RootWindow.
44 aura::RootWindow* CurrentContext(); 46 aura::RootWindow* CurrentContext();
45 47
46 void RunAllPendingInMessageLoop(); 48 void RunAllPendingInMessageLoop();
47 49
48 base::MessageLoopForUI* message_loop() { return message_loop_; } 50 base::MessageLoopForUI* message_loop() { return message_loop_; }
49 TestShellDelegate* test_shell_delegate() { return test_shell_delegate_; } 51 TestShellDelegate* test_shell_delegate() { return test_shell_delegate_; }
50 52
51 private: 53 private:
52 base::MessageLoopForUI* message_loop_; // Not owned. 54 base::MessageLoopForUI* message_loop_; // Not owned.
53 TestShellDelegate* test_shell_delegate_; // Owned by ash::Shell. 55 TestShellDelegate* test_shell_delegate_; // Owned by ash::Shell.
54 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_; 56 scoped_ptr<ui::ScopedAnimationDurationScaleMode> zero_duration_mode_;
55 57
56 DISALLOW_COPY_AND_ASSIGN(AshTestHelper); 58 DISALLOW_COPY_AND_ASSIGN(AshTestHelper);
57 }; 59 };
58 60
59 } // namespace test 61 } // namespace test
60 } // namespace ash 62 } // namespace ash
61 63
62 #endif // ASH_TEST_ASH_TEST_HELPER_H_ 64 #endif // ASH_TEST_ASH_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/test/ash_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698