OLD | NEW |
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/notifications/desktop_notifications_unittest.h" | 5 #include "chrome/browser/notifications/desktop_notifications_unittest.h" |
6 | 6 |
| 7 #include "base/prefs/testing_pref_service.h" |
7 #include "base/string_util.h" | 8 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/notifications/balloon_notification_ui_manager.h" | 10 #include "chrome/browser/notifications/balloon_notification_ui_manager.h" |
10 #include "chrome/browser/notifications/fake_balloon_view.h" | 11 #include "chrome/browser/notifications/fake_balloon_view.h" |
11 #include "chrome/browser/prefs/browser_prefs.h" | 12 #include "chrome/browser/prefs/browser_prefs.h" |
12 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
13 #include "chrome/test/base/testing_pref_service.h" | |
14 #include "content/public/common/show_desktop_notification_params.h" | 14 #include "content/public/common/show_desktop_notification_params.h" |
15 | 15 |
16 #if defined(USE_ASH) | 16 #if defined(USE_ASH) |
17 #include "ash/shell.h" | 17 #include "ash/shell.h" |
18 #include "ash/test/test_shell_delegate.h" | 18 #include "ash/test/test_shell_delegate.h" |
19 #include "chrome/browser/ui/aura/active_desktop_monitor.h" | 19 #include "chrome/browser/ui/aura/active_desktop_monitor.h" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
21 #include "ui/aura/env.h" | 21 #include "ui/aura/env.h" |
22 #include "ui/aura/root_window.h" | 22 #include "ui/aura/root_window.h" |
23 #endif | 23 #endif |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 } | 471 } |
472 | 472 |
473 // Now change the position to upper left. Confirm that the X value for the | 473 // Now change the position to upper left. Confirm that the X value for the |
474 // balloons gets smaller. | 474 // balloons gets smaller. |
475 local_state_.SetInteger(prefs::kDesktopNotificationPosition, | 475 local_state_.SetInteger(prefs::kDesktopNotificationPosition, |
476 BalloonCollection::UPPER_LEFT); | 476 BalloonCollection::UPPER_LEFT); |
477 | 477 |
478 int current_x = (*balloons.begin())->GetPosition().x(); | 478 int current_x = (*balloons.begin())->GetPosition().x(); |
479 EXPECT_LT(current_x, last_x); | 479 EXPECT_LT(current_x, last_x); |
480 } | 480 } |
OLD | NEW |