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

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
« no previous file with comments | « chrome/browser/chromeos/display/display_preferences.cc ('k') | ui/display/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ad2f453bfb958d1e1b4b4a19c7172770afe41685..bc0cb3f8a790c7c9f1e981e801feb8572439a1cb 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 = display::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 = display::DisplayIdListToString(list);
DictionaryPrefUpdate update(&local_state_, prefs::kSecondaryDisplays);
base::DictionaryValue* pref_data = update.Get();
@@ -987,7 +988,7 @@ TEST_F(DisplayPreferencesTest, SaveUnifiedMode) {
local_state()->GetDictionary(prefs::kSecondaryDisplays);
const base::DictionaryValue* new_value = nullptr;
EXPECT_TRUE(secondary_displays->GetDictionary(
- ash::DisplayIdListToString(list), &new_value));
+ display::DisplayIdListToString(list), &new_value));
display::DisplayLayout stored_layout;
EXPECT_TRUE(ash::JsonToDisplayLayout(*new_value, &stored_layout));
@@ -1010,14 +1011,14 @@ 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));
+ display::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));
+ display::DisplayIdListToString(list), &new_value));
EXPECT_TRUE(ash::JsonToDisplayLayout(*new_value, &stored_layout));
EXPECT_TRUE(stored_layout.default_unified);
EXPECT_FALSE(stored_layout.mirrored);
@@ -1026,7 +1027,7 @@ TEST_F(DisplayPreferencesTest, SaveUnifiedMode) {
display_manager->SetDefaultMultiDisplayModeForCurrentDisplays(
ash::DisplayManager::EXTENDED);
ASSERT_TRUE(secondary_displays->GetDictionary(
- ash::DisplayIdListToString(list), &new_value));
+ display::DisplayIdListToString(list), &new_value));
EXPECT_TRUE(ash::JsonToDisplayLayout(*new_value, &stored_layout));
EXPECT_FALSE(stored_layout.default_unified);
EXPECT_FALSE(stored_layout.mirrored);
@@ -1093,7 +1094,7 @@ TEST_F(DisplayPreferencesTest, SaveThreeDisplays) {
local_state()->GetDictionary(prefs::kSecondaryDisplays);
const base::DictionaryValue* new_value = nullptr;
EXPECT_TRUE(secondary_displays->GetDictionary(
- ash::DisplayIdListToString(list), &new_value));
+ display::DisplayIdListToString(list), &new_value));
}
TEST_F(DisplayPreferencesTest, RestoreThreeDisplays) {
« no previous file with comments | « chrome/browser/chromeos/display/display_preferences.cc ('k') | ui/display/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698