| 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/prefs/testing_pref_service.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/notifications/balloon_notification_ui_manager.h" | 10 #include "chrome/browser/notifications/balloon_notification_ui_manager.h" |
| 11 #include "chrome/browser/notifications/fake_balloon_view.h" | 11 #include "chrome/browser/notifications/fake_balloon_view.h" |
| 12 #include "chrome/browser/prefs/browser_prefs.h" | 12 #include "chrome/browser/prefs/browser_prefs.h" |
| 13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
| 14 #include "chrome/test/base/testing_browser_process.h" | 14 #include "chrome/test/base/testing_browser_process.h" |
| 15 #include "chrome/test/base/testing_profile.h" | 15 #include "chrome/test/base/testing_profile.h" |
| 16 #include "chrome/test/base/testing_profile_manager.h" | 16 #include "chrome/test/base/testing_profile_manager.h" |
| 17 #include "content/public/common/show_desktop_notification_params.h" | 17 #include "content/public/common/show_desktop_notification_params.h" |
| 18 #include "ui/base/ime/input_method_initializer.h" | 18 #include "ui/base/ime/input_method_initializer.h" |
| 19 #include "ui/message_center/message_center.h" | 19 #include "ui/message_center/message_center.h" |
| 20 | 20 |
| 21 #if defined(USE_ASH) | 21 #if defined(USE_ASH) |
| 22 #include "ash/shell.h" | 22 #include "ash/shell.h" |
| 23 #include "ash/test/test_shell_delegate.h" | 23 #include "ash/test/test_shell_delegate.h" |
| 24 #include "ui/aura/env.h" | 24 #include "ui/aura/env.h" |
| 25 #include "ui/aura/root_window.h" | 25 #include "ui/aura/window_event_dispatcher.h" |
| 26 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 26 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
| 27 #include "ui/compositor/test/context_factories_for_test.h" | 27 #include "ui/compositor/test/context_factories_for_test.h" |
| 28 #endif | 28 #endif |
| 29 | 29 |
| 30 #if defined(USE_AURA) | 30 #if defined(USE_AURA) |
| 31 #include "ui/views/corewm/wm_state.h" | 31 #include "ui/views/corewm/wm_state.h" |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 | 34 |
| 35 using content::BrowserThread; | 35 using content::BrowserThread; |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 } | 575 } |
| 576 | 576 |
| 577 // Now change the position to upper left. Confirm that the X value for the | 577 // Now change the position to upper left. Confirm that the X value for the |
| 578 // balloons gets smaller. | 578 // balloons gets smaller. |
| 579 local_state_.SetInteger(prefs::kDesktopNotificationPosition, | 579 local_state_.SetInteger(prefs::kDesktopNotificationPosition, |
| 580 BalloonCollection::UPPER_LEFT); | 580 BalloonCollection::UPPER_LEFT); |
| 581 | 581 |
| 582 int current_x = (*balloons.begin())->GetPosition().x(); | 582 int current_x = (*balloons.begin())->GetPosition().x(); |
| 583 EXPECT_LT(current_x, last_x); | 583 EXPECT_LT(current_x, last_x); |
| 584 } | 584 } |
| OLD | NEW |