OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/display_configurator.h" | 5 #include "ui/display/chromeos/display_configurator.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 outputs.push_back(&outputs_[i]); | 220 outputs.push_back(&outputs_[i]); |
221 native_display_delegate_->set_outputs(outputs); | 221 native_display_delegate_->set_outputs(outputs); |
222 | 222 |
223 if (send_events) { | 223 if (send_events) { |
224 configurator_.OnConfigurationChanged(); | 224 configurator_.OnConfigurationChanged(); |
225 EXPECT_TRUE(test_api_.TriggerConfigureTimeout()); | 225 EXPECT_TRUE(test_api_.TriggerConfigureTimeout()); |
226 } | 226 } |
227 } | 227 } |
228 | 228 |
229 void Init(bool panel_fitting_enabled) { | 229 void Init(bool panel_fitting_enabled) { |
230 configurator_.Init(std::unique_ptr<NativeDisplayDelegate>(), | 230 configurator_.Init(nullptr, panel_fitting_enabled); |
231 panel_fitting_enabled); | |
232 } | 231 } |
233 | 232 |
234 // Initializes |configurator_| with a single internal display. | 233 // Initializes |configurator_| with a single internal display. |
235 void InitWithSingleOutput() { | 234 void InitWithSingleOutput() { |
236 UpdateOutputs(1, false); | 235 UpdateOutputs(1, false); |
237 EXPECT_EQ(kNoActions, log_->GetActionsAndClear()); | 236 EXPECT_EQ(kNoActions, log_->GetActionsAndClear()); |
238 configurator_.Init(std::unique_ptr<NativeDisplayDelegate>(), false); | 237 configurator_.Init(nullptr, false); |
239 | 238 |
240 EXPECT_EQ(kNoActions, log_->GetActionsAndClear()); | 239 EXPECT_EQ(kNoActions, log_->GetActionsAndClear()); |
241 configurator_.ForceInitialConfigure(0); | 240 configurator_.ForceInitialConfigure(0); |
242 EXPECT_EQ(JoinActions(kInitXRandR, kGrab, | 241 EXPECT_EQ(JoinActions(kInitXRandR, kGrab, |
243 GetFramebufferAction(small_mode_.size(), &outputs_[0], | 242 GetFramebufferAction(small_mode_.size(), &outputs_[0], |
244 NULL).c_str(), | 243 NULL).c_str(), |
245 GetCrtcAction(outputs_[0], &small_mode_, | 244 GetCrtcAction(outputs_[0], &small_mode_, |
246 gfx::Point(0, 0)).c_str(), | 245 gfx::Point(0, 0)).c_str(), |
247 kForceDPMS, kUngrab, NULL), | 246 kForceDPMS, kUngrab, NULL), |
248 log_->GetActionsAndClear()); | 247 log_->GetActionsAndClear()); |
(...skipping 1704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1953 GetCrtcAction(outputs_[1], &big_mode_, | 1952 GetCrtcAction(outputs_[1], &big_mode_, |
1954 gfx::Point(0, small_mode_.size().height() + | 1953 gfx::Point(0, small_mode_.size().height() + |
1955 DisplayConfigurator::kVerticalGap)) | 1954 DisplayConfigurator::kVerticalGap)) |
1956 .c_str(), | 1955 .c_str(), |
1957 kUngrab, NULL), | 1956 kUngrab, NULL), |
1958 log_->GetActionsAndClear()); | 1957 log_->GetActionsAndClear()); |
1959 } | 1958 } |
1960 | 1959 |
1961 } // namespace test | 1960 } // namespace test |
1962 } // namespace ui | 1961 } // namespace ui |
OLD | NEW |