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

Side by Side Diff: chrome/browser/chromeos/display/display_preferences_unittest.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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 "chrome/browser/chromeos/display/display_preferences.h" 5 #include "chrome/browser/chromeos/display/display_preferences.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 EXPECT_FALSE(stored_layout.mirrored); 1071 EXPECT_FALSE(stored_layout.mirrored);
1072 } 1072 }
1073 1073
1074 TEST_F(DisplayPreferencesTest, RestoreUnifiedMode) { 1074 TEST_F(DisplayPreferencesTest, RestoreUnifiedMode) {
1075 int64_t id1 = display::Screen::GetScreen()->GetPrimaryDisplay().id(); 1075 int64_t id1 = display::Screen::GetScreen()->GetPrimaryDisplay().id();
1076 display::DisplayIdList list = 1076 display::DisplayIdList list =
1077 display::test::CreateDisplayIdList2(id1, id1 + 1); 1077 display::test::CreateDisplayIdList2(id1, id1 + 1);
1078 StoreDisplayBoolPropertyForList(list, "default_unified", true); 1078 StoreDisplayBoolPropertyForList(list, "default_unified", true);
1079 StoreDisplayPropertyForList( 1079 StoreDisplayPropertyForList(
1080 list, "primary-id", 1080 list, "primary-id",
1081 base::MakeUnique<base::StringValue>(base::Int64ToString(id1))); 1081 base::MakeUnique<base::Value>(base::Int64ToString(id1)));
1082 LoadDisplayPreferences(false); 1082 LoadDisplayPreferences(false);
1083 1083
1084 // Should not restore to unified unless unified desktop is enabled. 1084 // Should not restore to unified unless unified desktop is enabled.
1085 UpdateDisplay("100x100,200x200"); 1085 UpdateDisplay("100x100,200x200");
1086 EXPECT_FALSE(display_manager()->IsInUnifiedMode()); 1086 EXPECT_FALSE(display_manager()->IsInUnifiedMode());
1087 1087
1088 // Restored to unified. 1088 // Restored to unified.
1089 display_manager()->SetUnifiedDesktopEnabled(true); 1089 display_manager()->SetUnifiedDesktopEnabled(true);
1090 StoreDisplayBoolPropertyForList(list, "default_unified", true); 1090 StoreDisplayBoolPropertyForList(list, "default_unified", true);
1091 LoadDisplayPreferences(false); 1091 LoadDisplayPreferences(false);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 1156
1157 EXPECT_EQ(gfx::Rect(0, 0, 200, 200), 1157 EXPECT_EQ(gfx::Rect(0, 0, 200, 200),
1158 display_manager()->GetDisplayForId(list[0]).bounds()); 1158 display_manager()->GetDisplayForId(list[0]).bounds());
1159 EXPECT_EQ(gfx::Rect(-200, 0, 200, 200), 1159 EXPECT_EQ(gfx::Rect(-200, 0, 200, 200),
1160 display_manager()->GetDisplayForId(list[1]).bounds()); 1160 display_manager()->GetDisplayForId(list[1]).bounds());
1161 EXPECT_EQ(gfx::Rect(-100, 200, 300, 300), 1161 EXPECT_EQ(gfx::Rect(-100, 200, 300, 300),
1162 display_manager()->GetDisplayForId(list[2]).bounds()); 1162 display_manager()->GetDisplayForId(list[2]).bounds());
1163 } 1163 }
1164 1164
1165 } // namespace chromeos 1165 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698