| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/common/pref_names.h" | 9 #include "chrome/common/pref_names.h" |
| 10 #include "chrome/common/render_messages.h" |
| 10 #include "chrome/common/render_messages_params.h" | 11 #include "chrome/common/render_messages_params.h" |
| 11 #include "chrome/test/testing_pref_service.h" | 12 #include "chrome/test/testing_pref_service.h" |
| 12 | 13 |
| 13 // static | 14 // static |
| 14 const int MockBalloonCollection::kMockBalloonSpace = 5; | 15 const int MockBalloonCollection::kMockBalloonSpace = 5; |
| 15 | 16 |
| 16 // static | 17 // static |
| 17 std::string DesktopNotificationsTest::log_output_; | 18 std::string DesktopNotificationsTest::log_output_; |
| 18 | 19 |
| 19 void MockBalloonCollection::Add(const Notification& notification, | 20 void MockBalloonCollection::Add(const Notification& notification, |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 } | 424 } |
| 424 | 425 |
| 425 // Now change the position to upper left. Confirm that the X value for the | 426 // Now change the position to upper left. Confirm that the X value for the |
| 426 // balloons gets smaller. | 427 // balloons gets smaller. |
| 427 profile_->GetPrefs()->SetInteger(prefs::kDesktopNotificationPosition, | 428 profile_->GetPrefs()->SetInteger(prefs::kDesktopNotificationPosition, |
| 428 BalloonCollection::UPPER_LEFT); | 429 BalloonCollection::UPPER_LEFT); |
| 429 | 430 |
| 430 int current_x = (*balloons.begin())->GetPosition().x(); | 431 int current_x = (*balloons.begin())->GetPosition().x(); |
| 431 EXPECT_LT(current_x, last_x); | 432 EXPECT_LT(current_x, last_x); |
| 432 } | 433 } |
| OLD | NEW |