Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Side by Side Diff: chrome/browser/notifications/desktop_notifications_unittest.cc

Issue 10698111: browser: Move more files into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/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/browser/prefs/browser_prefs.h" 9 #include "chrome/browser/prefs/browser_prefs.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 92
93 void DesktopNotificationsTest::SetUp() { 93 void DesktopNotificationsTest::SetUp() {
94 #if defined(USE_ASH) 94 #if defined(USE_ASH)
95 WebKit::initialize(webkit_platform_support_.Get()); 95 WebKit::initialize(webkit_platform_support_.Get());
96 // MockBalloonCollection retrieves information about the screen on creation. 96 // MockBalloonCollection retrieves information about the screen on creation.
97 // So it is necessary to make sure the desktop gets created first. 97 // So it is necessary to make sure the desktop gets created first.
98 ash::Shell::CreateInstance(NULL); 98 ash::Shell::CreateInstance(NULL);
99 #endif 99 #endif
100 100
101 browser::RegisterLocalState(&local_state_); 101 chrome::RegisterLocalState(&local_state_);
102 profile_.reset(new TestingProfile()); 102 profile_.reset(new TestingProfile());
103 balloon_collection_ = new MockBalloonCollection(); 103 balloon_collection_ = new MockBalloonCollection();
104 ui_manager_.reset(NotificationUIManager::Create(&local_state_, 104 ui_manager_.reset(NotificationUIManager::Create(&local_state_,
105 balloon_collection_)); 105 balloon_collection_));
106 service_.reset(new DesktopNotificationService(profile(), ui_manager_.get())); 106 service_.reset(new DesktopNotificationService(profile(), ui_manager_.get()));
107 log_output_.clear(); 107 log_output_.clear();
108 } 108 }
109 109
110 void DesktopNotificationsTest::TearDown() { 110 void DesktopNotificationsTest::TearDown() {
111 service_.reset(NULL); 111 service_.reset(NULL);
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 465 }
466 466
467 // Now change the position to upper left. Confirm that the X value for the 467 // Now change the position to upper left. Confirm that the X value for the
468 // balloons gets smaller. 468 // balloons gets smaller.
469 local_state_.SetInteger(prefs::kDesktopNotificationPosition, 469 local_state_.SetInteger(prefs::kDesktopNotificationPosition,
470 BalloonCollection::UPPER_LEFT); 470 BalloonCollection::UPPER_LEFT);
471 471
472 int current_x = (*balloons.begin())->GetPosition().x(); 472 int current_x = (*balloons.begin())->GetPosition().x();
473 EXPECT_LT(current_x, last_x); 473 EXPECT_LT(current_x, last_x);
474 } 474 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_log_unittest.cc ('k') | chrome/browser/policy/cloud_policy_refresh_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698