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

Unified Diff: chrome/browser/chromeos/display/display_preferences_unittest.cc

Issue 2286523002: Relocate reuseable portions of ash/display/display_util.* (Closed)
Patch Set: fixed ozone build Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/display/display_preferences_unittest.cc
diff --git a/chrome/browser/chromeos/display/display_preferences_unittest.cc b/chrome/browser/chromeos/display/display_preferences_unittest.cc
index 89aa5a18f2937b87115e7d64bcd049c14e27ef70..819745210cf453d50cde457bc3a7e7b87ae5ffe2 100644
--- a/chrome/browser/chromeos/display/display_preferences_unittest.cc
+++ b/chrome/browser/chromeos/display/display_preferences_unittest.cc
@@ -37,6 +37,7 @@
#include "ui/display/chromeos/display_configurator.h"
#include "ui/display/manager/display_layout_builder.h"
#include "ui/display/manager/display_layout_store.h"
+#include "ui/display/manager/display_manager_utilities.h"
#include "ui/display/screen.h"
#include "ui/gfx/geometry/vector3d_f.h"
#include "ui/message_center/message_center.h"
@@ -109,7 +110,7 @@ class DisplayPreferencesTest : public ash::test::AshTestBase {
display::DisplayPlacement::Position position,
int offset,
int64_t primary_id) {
- std::string name = ash::DisplayIdListToString(list);
+ std::string name = ui::DisplayIdListToString(list);
DictionaryPrefUpdate update(&local_state_, prefs::kSecondaryDisplays);
display::DisplayLayout display_layout;
display_layout.placement_list.emplace_back(position, offset);
@@ -131,7 +132,7 @@ class DisplayPreferencesTest : public ash::test::AshTestBase {
void StoreDisplayPropertyForList(const display::DisplayIdList& list,
std::string key,
std::unique_ptr<base::Value> value) {
- std::string name = ash::DisplayIdListToString(list);
+ std::string name = ui::DisplayIdListToString(list);
DictionaryPrefUpdate update(&local_state_, prefs::kSecondaryDisplays);
base::DictionaryValue* pref_data = update.Get();
@@ -984,8 +985,8 @@ TEST_F(DisplayPreferencesTest, SaveUnifiedMode) {
const base::DictionaryValue* secondary_displays =
local_state()->GetDictionary(prefs::kSecondaryDisplays);
const base::DictionaryValue* new_value = nullptr;
- EXPECT_TRUE(secondary_displays->GetDictionary(
- ash::DisplayIdListToString(list), &new_value));
+ EXPECT_TRUE(secondary_displays->GetDictionary(ui::DisplayIdListToString(list),
+ &new_value));
display::DisplayLayout stored_layout;
EXPECT_TRUE(ash::JsonToDisplayLayout(*new_value, &stored_layout));
@@ -1007,15 +1008,15 @@ TEST_F(DisplayPreferencesTest, SaveUnifiedMode) {
// Mirror mode should remember if the default mode was unified.
display_manager->SetMirrorMode(true);
- ASSERT_TRUE(secondary_displays->GetDictionary(
- ash::DisplayIdListToString(list), &new_value));
+ ASSERT_TRUE(secondary_displays->GetDictionary(ui::DisplayIdListToString(list),
+ &new_value));
EXPECT_TRUE(ash::JsonToDisplayLayout(*new_value, &stored_layout));
EXPECT_TRUE(stored_layout.default_unified);
EXPECT_TRUE(stored_layout.mirrored);
display_manager->SetMirrorMode(false);
- ASSERT_TRUE(secondary_displays->GetDictionary(
- ash::DisplayIdListToString(list), &new_value));
+ ASSERT_TRUE(secondary_displays->GetDictionary(ui::DisplayIdListToString(list),
+ &new_value));
EXPECT_TRUE(ash::JsonToDisplayLayout(*new_value, &stored_layout));
EXPECT_TRUE(stored_layout.default_unified);
EXPECT_FALSE(stored_layout.mirrored);
@@ -1023,8 +1024,8 @@ TEST_F(DisplayPreferencesTest, SaveUnifiedMode) {
// Exit unified mode.
display_manager->SetDefaultMultiDisplayModeForCurrentDisplays(
ash::DisplayManager::EXTENDED);
- ASSERT_TRUE(secondary_displays->GetDictionary(
- ash::DisplayIdListToString(list), &new_value));
+ ASSERT_TRUE(secondary_displays->GetDictionary(ui::DisplayIdListToString(list),
+ &new_value));
EXPECT_TRUE(ash::JsonToDisplayLayout(*new_value, &stored_layout));
EXPECT_FALSE(stored_layout.default_unified);
EXPECT_FALSE(stored_layout.mirrored);
@@ -1090,8 +1091,8 @@ TEST_F(DisplayPreferencesTest, SaveThreeDisplays) {
const base::DictionaryValue* secondary_displays =
local_state()->GetDictionary(prefs::kSecondaryDisplays);
const base::DictionaryValue* new_value = nullptr;
- EXPECT_TRUE(secondary_displays->GetDictionary(
- ash::DisplayIdListToString(list), &new_value));
+ EXPECT_TRUE(secondary_displays->GetDictionary(ui::DisplayIdListToString(list),
+ &new_value));
}
TEST_F(DisplayPreferencesTest, RestoreThreeDisplays) {

Powered by Google App Engine
This is Rietveld 408576698