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

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

Issue 16539005: Skip mulitple-dispay tests on win8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comment Created 7 years, 6 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/shelf/shelf_widget_unittest.cc ('k') | ash/test/ash_test_base.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 (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 #ifndef ASH_TEST_ASH_TEST_BASE_H_ 5 #ifndef ASH_TEST_ASH_TEST_BASE_H_
6 #define ASH_TEST_ASH_TEST_BASE_H_ 6 #define ASH_TEST_ASH_TEST_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 // Attach |window| to the current shell's root window. 89 // Attach |window| to the current shell's root window.
90 void SetDefaultParentByPrimaryRootWindow(aura::Window* window); 90 void SetDefaultParentByPrimaryRootWindow(aura::Window* window);
91 91
92 // Returns the EventGenerator that uses screen coordinates and works 92 // Returns the EventGenerator that uses screen coordinates and works
93 // across multiple displays. It createse a new generator if it 93 // across multiple displays. It createse a new generator if it
94 // hasn't been created yet. 94 // hasn't been created yet.
95 aura::test::EventGenerator& GetEventGenerator(); 95 aura::test::EventGenerator& GetEventGenerator();
96 96
97 protected: 97 protected:
98 // True if the running environment supports multiple displays,
99 // or false otherwise (e.g. win8 bot).
100 static bool SupportsMultipleDisplays();
101
98 void RunAllPendingInMessageLoop(); 102 void RunAllPendingInMessageLoop();
99 103
100 // Utility methods to emulate user logged in or not, session started or not 104 // Utility methods to emulate user logged in or not, session started or not
101 // and user able to lock screen or not cases. 105 // and user able to lock screen or not cases.
102 void SetSessionStarted(bool session_started); 106 void SetSessionStarted(bool session_started);
103 void SetUserLoggedIn(bool user_logged_in); 107 void SetUserLoggedIn(bool user_logged_in);
104 void SetCanLockScreen(bool can_lock_screen); 108 void SetCanLockScreen(bool can_lock_screen);
105 109
106 private: 110 private:
107 bool setup_called_; 111 bool setup_called_;
108 bool teardown_called_; 112 bool teardown_called_;
109 base::MessageLoopForUI message_loop_; 113 base::MessageLoopForUI message_loop_;
110 scoped_ptr<AshTestHelper> ash_test_helper_; 114 scoped_ptr<AshTestHelper> ash_test_helper_;
111 scoped_ptr<aura::test::EventGenerator> event_generator_; 115 scoped_ptr<aura::test::EventGenerator> event_generator_;
112 #if defined(OS_WIN) 116 #if defined(OS_WIN)
113 // Note that the order is important here as ipc_thread_ should be destroyed 117 // Note that the order is important here as ipc_thread_ should be destroyed
114 // after metro_viewer_host_->channel_. 118 // after metro_viewer_host_->channel_.
115 scoped_ptr<base::Thread> ipc_thread_; 119 scoped_ptr<base::Thread> ipc_thread_;
116 scoped_ptr<TestMetroViewerProcessHost> metro_viewer_host_; 120 scoped_ptr<TestMetroViewerProcessHost> metro_viewer_host_;
117 ui::ScopedOleInitializer ole_initializer_; 121 ui::ScopedOleInitializer ole_initializer_;
118 #endif 122 #endif
119 123
120 DISALLOW_COPY_AND_ASSIGN(AshTestBase); 124 DISALLOW_COPY_AND_ASSIGN(AshTestBase);
121 }; 125 };
122 126
123 } // namespace test 127 } // namespace test
124 } // namespace ash 128 } // namespace ash
125 129
126 #endif // ASH_TEST_ASH_TEST_BASE_H_ 130 #endif // ASH_TEST_ASH_TEST_BASE_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_widget_unittest.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698