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
3 // found in the LICENSE file.
5 #ifndef ASH_TEST_DISPLAY_MANAGER_TEST_API_H_
6 #define ASH_TEST_DISPLAY_MANAGER_TEST_API_H_
11 #include "ash/display/display_manager.h"
12 #include "base/basictypes.h"
13 #include "ui/display/types/display_constants.h"
28 class DisplayManagerTestApi
{
30 // Test if moving a mouse to |point_in_screen| warps it to another
32 static bool TestIfMouseWarpsAt(ui::test::EventGenerator
& event_generator
,
33 const gfx::Point
& point_in_screen
);
35 explicit DisplayManagerTestApi(DisplayManager
* display_manager
);
36 virtual ~DisplayManagerTestApi();
38 // Update the display configuration as given in |display_specs|. The format of
39 // |display_spec| is a list of comma separated spec for each displays. Please
40 // refer to the comment in |ash::DisplayInfo::CreateFromSpec| for the format
41 // of the display spec.
42 void UpdateDisplay(const std::string
& display_specs
);
44 // Set the 1st display as an internal display and returns the display Id for
45 // the internal display.
46 int64
SetFirstDisplayAsInternalDisplay();
48 // Sets the display id for internal display and
49 // update the display mode list if necessary.
50 void SetInternalDisplayId(int64 id
);
52 // Don't update the display when the root window's size was changed.
53 void DisableChangeDisplayUponHostResize();
55 // Sets the available color profiles for |display_id|.
56 void SetAvailableColorProfiles(
58 const std::vector
<ui::ColorCalibrationProfile
>& profiles
);
60 // Sets the default multi display mode.
61 void SetDefaultMultiDisplayMode(DisplayManager::MultiDisplayMode mode
);
64 DisplayManager
* display_manager_
; // not owned
66 DISALLOW_COPY_AND_ASSIGN(DisplayManagerTestApi
);
72 #endif // ASH_TEST_DISPLAY_MANAGER_TEST_API_H_