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

Side by Side Diff: ash/display/display_manager_unittest.cc

Issue 2613493002: Fix namespace for src/ui/display/. (Closed)
Patch Set: Rebase. Created 3 years, 11 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
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 #include "ui/display/manager/display_manager.h" 5 #include "ui/display/manager/display_manager.h"
6 6
7 #include "ash/accelerators/accelerator_commands_aura.h" 7 #include "ash/accelerators/accelerator_commands_aura.h"
8 #include "ash/common/material_design/material_design_controller.h" 8 #include "ash/common/material_design/material_design_controller.h"
9 #include "ash/common/wm/window_state.h" 9 #include "ash/common/wm/window_state.h"
10 #include "ash/display/display_configuration_controller.h" 10 #include "ash/display/display_configuration_controller.h"
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 // the internal display. 1539 // the internal display.
1540 TEST_P(DisplayManagerTest, FHD125DefaultsTo08UIScalingNoOverride) { 1540 TEST_P(DisplayManagerTest, FHD125DefaultsTo08UIScalingNoOverride) {
1541 int64_t display_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); 1541 int64_t display_id = display::Screen::GetScreen()->GetPrimaryDisplay().id();
1542 1542
1543 display_id++; 1543 display_id++;
1544 display::test::ScopedSetInternalDisplayId set_internal(display_manager(), 1544 display::test::ScopedSetInternalDisplayId set_internal(display_manager(),
1545 display_id); 1545 display_id);
1546 const gfx::Insets dummy_overscan_insets; 1546 const gfx::Insets dummy_overscan_insets;
1547 display_manager()->RegisterDisplayProperty( 1547 display_manager()->RegisterDisplayProperty(
1548 display_id, display::Display::ROTATE_0, 1.0f, &dummy_overscan_insets, 1548 display_id, display::Display::ROTATE_0, 1.0f, &dummy_overscan_insets,
1549 gfx::Size(), 1.0f, ui::ColorCalibrationProfile(), nullptr); 1549 gfx::Size(), 1.0f, display::ColorCalibrationProfile(), nullptr);
1550 1550
1551 // Setup the display modes with UI-scale. 1551 // Setup the display modes with UI-scale.
1552 display::ManagedDisplayInfo native_display_info = 1552 display::ManagedDisplayInfo native_display_info =
1553 CreateDisplayInfo(display_id, gfx::Rect(0, 0, 1920, 1080)); 1553 CreateDisplayInfo(display_id, gfx::Rect(0, 0, 1920, 1080));
1554 native_display_info.set_device_scale_factor(1.25); 1554 native_display_info.set_device_scale_factor(1.25);
1555 1555
1556 const scoped_refptr<display::ManagedDisplayMode>& base_mode( 1556 const scoped_refptr<display::ManagedDisplayMode>& base_mode(
1557 new display::ManagedDisplayMode(gfx::Size(1920, 1080), 60.0f, false, 1557 new display::ManagedDisplayMode(gfx::Size(1920, 1080), 60.0f, false,
1558 false)); 1558 false));
1559 display::ManagedDisplayInfo::ManagedDisplayModeList mode_list = 1559 display::ManagedDisplayInfo::ManagedDisplayModeList mode_list =
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
2499 1.25f, 2499 1.25f,
2500 display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor()); 2500 display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor());
2501 EXPECT_TRUE(IsTextSubpixelPositioningEnabled()); 2501 EXPECT_TRUE(IsTextSubpixelPositioningEnabled());
2502 EXPECT_EQ(gfx::FontRenderParams::HINTING_NONE, GetFontHintingParams()); 2502 EXPECT_EQ(gfx::FontRenderParams::HINTING_NONE, GetFontHintingParams());
2503 } 2503 }
2504 2504
2505 TEST_P(DisplayManagerTest, CheckInitializationOfRotationProperty) { 2505 TEST_P(DisplayManagerTest, CheckInitializationOfRotationProperty) {
2506 int64_t id = display_manager()->GetDisplayAt(0).id(); 2506 int64_t id = display_manager()->GetDisplayAt(0).id();
2507 display_manager()->RegisterDisplayProperty( 2507 display_manager()->RegisterDisplayProperty(
2508 id, display::Display::ROTATE_90, 1.0f, nullptr, gfx::Size(), 1.0f, 2508 id, display::Display::ROTATE_90, 1.0f, nullptr, gfx::Size(), 1.0f,
2509 ui::COLOR_PROFILE_STANDARD, nullptr); 2509 display::COLOR_PROFILE_STANDARD, nullptr);
2510 2510
2511 const display::ManagedDisplayInfo& info = 2511 const display::ManagedDisplayInfo& info =
2512 display_manager()->GetDisplayInfo(id); 2512 display_manager()->GetDisplayInfo(id);
2513 2513
2514 EXPECT_EQ(display::Display::ROTATE_90, 2514 EXPECT_EQ(display::Display::ROTATE_90,
2515 info.GetRotation(display::Display::ROTATION_SOURCE_USER)); 2515 info.GetRotation(display::Display::ROTATION_SOURCE_USER));
2516 EXPECT_EQ(display::Display::ROTATE_90, 2516 EXPECT_EQ(display::Display::ROTATE_90,
2517 info.GetRotation(display::Display::ROTATION_SOURCE_ACTIVE)); 2517 info.GetRotation(display::Display::ROTATION_SOURCE_ACTIVE));
2518 } 2518 }
2519 2519
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2557 const display::DisplayLayout& stored = 2557 const display::DisplayLayout& stored =
2558 layout_store->GetRegisteredDisplayLayout(list); 2558 layout_store->GetRegisteredDisplayLayout(list);
2559 2559
2560 EXPECT_EQ(id1, stored.placement_list[0].parent_display_id); 2560 EXPECT_EQ(id1, stored.placement_list[0].parent_display_id);
2561 EXPECT_EQ(id2, stored.placement_list[0].display_id); 2561 EXPECT_EQ(id2, stored.placement_list[0].display_id);
2562 } 2562 }
2563 2563
2564 #endif // OS_CHROMEOS 2564 #endif // OS_CHROMEOS
2565 2565
2566 } // namespace ash 2566 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_error_observer_chromeos_unittest.cc ('k') | ash/display/projecting_observer_chromeos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698