| 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" | 
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  101     : ui_thread_(BrowserThread::UI, &message_loop_), |  101     : ui_thread_(BrowserThread::UI, &message_loop_), | 
|  102       balloon_collection_(NULL) { |  102       balloon_collection_(NULL) { | 
|  103 } |  103 } | 
|  104  |  104  | 
|  105 DesktopNotificationsTest::~DesktopNotificationsTest() { |  105 DesktopNotificationsTest::~DesktopNotificationsTest() { | 
|  106 } |  106 } | 
|  107  |  107  | 
|  108 void DesktopNotificationsTest::SetUp() { |  108 void DesktopNotificationsTest::SetUp() { | 
|  109   ui::InitializeInputMethodForTesting(); |  109   ui::InitializeInputMethodForTesting(); | 
|  110 #if defined(USE_AURA) |  110 #if defined(USE_AURA) | 
|  111   wm_state_.reset(new views::corewm::WMState); |  111   wm_state_.reset(new wm::WMState); | 
|  112 #endif |  112 #endif | 
|  113 #if defined(USE_ASH) |  113 #if defined(USE_ASH) | 
|  114   ui::ScopedAnimationDurationScaleMode normal_duration_mode( |  114   ui::ScopedAnimationDurationScaleMode normal_duration_mode( | 
|  115       ui::ScopedAnimationDurationScaleMode::ZERO_DURATION); |  115       ui::ScopedAnimationDurationScaleMode::ZERO_DURATION); | 
|  116   // The message center is notmally initialized on |g_browser_process| which |  116   // The message center is notmally initialized on |g_browser_process| which | 
|  117   // is not created for these tests. |  117   // is not created for these tests. | 
|  118   message_center::MessageCenter::Initialize(); |  118   message_center::MessageCenter::Initialize(); | 
|  119   // The ContextFactory must exist before any Compositors are created. |  119   // The ContextFactory must exist before any Compositors are created. | 
|  120   bool enable_pixel_output = false; |  120   bool enable_pixel_output = false; | 
|  121   ui::InitializeContextFactoryForTests(enable_pixel_output); |  121   ui::InitializeContextFactoryForTests(enable_pixel_output); | 
| (...skipping 453 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 |