OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/display/resolution_notification_controller.h" | 5 #include "ash/display/resolution_notification_controller.h" |
6 | 6 |
7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
8 #include "ash/screen_util.h" | 8 #include "ash/screen_util.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/test/ash_test_base.h" | 10 #include "ash/test/ash_test_base.h" |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "grit/ash_strings.h" | 13 #include "grit/ash_strings.h" |
14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
15 #include "ui/gfx/size.h" | 15 #include "ui/gfx/geometry/size.h" |
16 #include "ui/message_center/message_center.h" | 16 #include "ui/message_center/message_center.h" |
17 #include "ui/message_center/notification.h" | 17 #include "ui/message_center/notification.h" |
18 #include "ui/message_center/notification_list.h" | 18 #include "ui/message_center/notification_list.h" |
19 | 19 |
20 namespace ash { | 20 namespace ash { |
21 namespace { | 21 namespace { |
22 | 22 |
23 base::string16 ExpectedNotificationMessage(int64 display_id, | 23 base::string16 ExpectedNotificationMessage(int64 display_id, |
24 const gfx::Size& new_resolution) { | 24 const gfx::Size& new_resolution) { |
25 return l10n_util::GetStringFUTF16( | 25 return l10n_util::GetStringFUTF16( |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 ClickOnNotificationButton(0); | 414 ClickOnNotificationButton(0); |
415 RunAllPendingInMessageLoop(); | 415 RunAllPendingInMessageLoop(); |
416 EXPECT_FALSE(IsNotificationVisible()); | 416 EXPECT_FALSE(IsNotificationVisible()); |
417 EXPECT_EQ(0, accept_count()); | 417 EXPECT_EQ(0, accept_count()); |
418 EXPECT_TRUE(display_manager->GetSelectedModeForDisplayId(id2, &mode)); | 418 EXPECT_TRUE(display_manager->GetSelectedModeForDisplayId(id2, &mode)); |
419 EXPECT_EQ("250x250", mode.size.ToString()); | 419 EXPECT_EQ("250x250", mode.size.ToString()); |
420 EXPECT_EQ(58.0f, mode.refresh_rate); | 420 EXPECT_EQ(58.0f, mode.refresh_rate); |
421 } | 421 } |
422 | 422 |
423 } // namespace ash | 423 } // namespace ash |
OLD | NEW |