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

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

Issue 1071353003: Prevent DisplayPreferences from saving incorrect rotations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 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 | « ash/system/overview/overview_button_tray_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"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/threading/thread.h" 12 #include "base/threading/thread.h"
13 #include "content/public/test/test_browser_thread_bundle.h" 13 #include "content/public/test/test_browser_thread_bundle.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "third_party/skia/include/core/SkColor.h" 15 #include "third_party/skia/include/core/SkColor.h"
16 #include "ui/gfx/display.h"
16 #include "ui/wm/public/window_types.h" 17 #include "ui/wm/public/window_types.h"
17 18
18 #if defined(OS_WIN) 19 #if defined(OS_WIN)
19 #include "ui/base/win/scoped_ole_initializer.h" 20 #include "ui/base/win/scoped_ole_initializer.h"
20 #endif 21 #endif
21 22
22 namespace gfx { 23 namespace gfx {
23 class Rect; 24 class Rect;
24 } 25 }
25 26
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 93
93 protected: 94 protected:
94 enum UserSessionBlockReason { 95 enum UserSessionBlockReason {
95 FIRST_BLOCK_REASON, 96 FIRST_BLOCK_REASON,
96 BLOCKED_BY_LOCK_SCREEN = FIRST_BLOCK_REASON, 97 BLOCKED_BY_LOCK_SCREEN = FIRST_BLOCK_REASON,
97 BLOCKED_BY_LOGIN_SCREEN, 98 BLOCKED_BY_LOGIN_SCREEN,
98 BLOCKED_BY_USER_ADDING_SCREEN, 99 BLOCKED_BY_USER_ADDING_SCREEN,
99 NUMBER_OF_BLOCK_REASONS 100 NUMBER_OF_BLOCK_REASONS
100 }; 101 };
101 102
103 // Returns the rotation currentl active for the display |id|.
104 static gfx::Display::Rotation GetActiveDisplayRotation(int64 id);
105
106 // Returns the rotation currently active for the internal display.
107 static gfx::Display::Rotation GetCurrentInternalDisplayRotation();
108
102 // Proxy to AshTestHelper::SupportsMultipleDisplays(). 109 // Proxy to AshTestHelper::SupportsMultipleDisplays().
103 static bool SupportsMultipleDisplays(); 110 static bool SupportsMultipleDisplays();
104 111
105 // Proxy to AshTestHelper::SupportsHostWindowResize(). 112 // Proxy to AshTestHelper::SupportsHostWindowResize().
106 static bool SupportsHostWindowResize(); 113 static bool SupportsHostWindowResize();
107 114
108 void set_start_session(bool start_session) { start_session_ = start_session; } 115 void set_start_session(bool start_session) { start_session_ = start_session; }
109 116
110 AshTestHelper* ash_test_helper() { return ash_test_helper_.get(); } 117 AshTestHelper* ash_test_helper() { return ash_test_helper_.get(); }
111 118
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 ~NoSessionAshTestBase() override {} 162 ~NoSessionAshTestBase() override {}
156 163
157 private: 164 private:
158 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); 165 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase);
159 }; 166 };
160 167
161 } // namespace test 168 } // namespace test
162 } // namespace ash 169 } // namespace ash
163 170
164 #endif // ASH_TEST_ASH_TEST_BASE_H_ 171 #endif // ASH_TEST_ASH_TEST_BASE_H_
OLDNEW
« no previous file with comments | « ash/system/overview/overview_button_tray_unittest.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698