OLD | NEW |
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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 public: | 29 public: |
30 AshTestBase(); | 30 AshTestBase(); |
31 virtual ~AshTestBase(); | 31 virtual ~AshTestBase(); |
32 | 32 |
33 MessageLoopForUI* message_loop() { return &message_loop_; } | 33 MessageLoopForUI* message_loop() { return &message_loop_; } |
34 | 34 |
35 // testing::Test: | 35 // testing::Test: |
36 virtual void SetUp() OVERRIDE; | 36 virtual void SetUp() OVERRIDE; |
37 virtual void TearDown() OVERRIDE; | 37 virtual void TearDown() OVERRIDE; |
38 | 38 |
39 // Change the primary monitor's configuration to use |bounds| | 39 // Change the primary display's configuration to use |bounds| |
40 // and |scale|. | 40 // and |scale|. |
41 void ChangeMonitorConfig(float scale, const gfx::Rect& bounds); | 41 void ChangeDisplayConfig(float scale, const gfx::Rect& bounds); |
42 | 42 |
43 // Update the display configuration as given in |display_specs|. The | 43 // Update the display configuration as given in |display_specs|. The |
44 // format of |display_spec| is a list of comma separated spec for | 44 // format of |display_spec| is a list of comma separated spec for |
45 // each displays. Please refer to the comment in | 45 // each displays. Please refer to the comment in |
46 // | aura::MonitorManager::CreateMonitorFromSpec| for the format of | 46 // | aura::DisplayManager::CreateDisplayFromSpec| for the format of |
47 // the display spec. | 47 // the display spec. |
48 void UpdateMonitor(const std::string& display_specs); | 48 void UpdateDisplay(const std::string& display_specs); |
49 | 49 |
50 protected: | 50 protected: |
51 void RunAllPendingInMessageLoop(); | 51 void RunAllPendingInMessageLoop(); |
52 | 52 |
53 private: | 53 private: |
54 MessageLoopForUI message_loop_; | 54 MessageLoopForUI message_loop_; |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(AshTestBase); | 56 DISALLOW_COPY_AND_ASSIGN(AshTestBase); |
57 }; | 57 }; |
58 | 58 |
59 } // namespace test | 59 } // namespace test |
60 } // namespace ash | 60 } // namespace ash |
61 | 61 |
62 #endif // ASH_TEST_ASH_TEST_BASE_H_ | 62 #endif // ASH_TEST_ASH_TEST_BASE_H_ |
OLD | NEW |