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

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

Issue 9569027: Revert 124471 - Fix unit_tests on cros. Looks like I forgot another instance of CreateInstance() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/chromeos/notifications/desktop_notifications_unittest.h " 5 #include "chrome/browser/chromeos/notifications/desktop_notifications_unittest.h "
6 6
7 #include "base/stringprintf.h" 7 #include "base/stringprintf.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/browser/prefs/pref_service.h" 10 #include "chrome/browser/prefs/pref_service.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 DesktopNotificationsTest::DesktopNotificationsTest() 107 DesktopNotificationsTest::DesktopNotificationsTest()
108 : ui_thread_(BrowserThread::UI, &message_loop_) { 108 : ui_thread_(BrowserThread::UI, &message_loop_) {
109 } 109 }
110 110
111 DesktopNotificationsTest::~DesktopNotificationsTest() { 111 DesktopNotificationsTest::~DesktopNotificationsTest() {
112 } 112 }
113 113
114 void DesktopNotificationsTest::SetUp() { 114 void DesktopNotificationsTest::SetUp() {
115 #if defined(USE_AURA) 115 #if defined(USE_AURA)
116 // Make sure a root window has been instantiated. 116 // Make sure a root window has been instantiated.
117 ash::Shell::CreateInstance(NULL); 117 ash::Shell::GetRootWindow();
118 #endif 118 #endif
119 browser::RegisterLocalState(&local_state_); 119 browser::RegisterLocalState(&local_state_);
120 profile_.reset(new TestingProfile()); 120 profile_.reset(new TestingProfile());
121 balloon_collection_ = new MockBalloonCollection(); 121 balloon_collection_ = new MockBalloonCollection();
122 ui_manager_.reset(NotificationUIManager::Create(&local_state_, 122 ui_manager_.reset(NotificationUIManager::Create(&local_state_,
123 balloon_collection_)); 123 balloon_collection_));
124 service_.reset(new DesktopNotificationService(profile(), ui_manager_.get())); 124 service_.reset(new DesktopNotificationService(profile(), ui_manager_.get()));
125 log_output_.clear(); 125 log_output_.clear();
126 } 126 }
127 127
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 MessageLoopForUI::current()->RunAllPending(); 312 MessageLoopForUI::current()->RunAllPending();
313 EXPECT_EQ(1, balloon_collection_->count()); 313 EXPECT_EQ(1, balloon_collection_->count());
314 Balloon* balloon = (*balloon_collection_->balloons().begin()); 314 Balloon* balloon = (*balloon_collection_->balloons().begin());
315 GURL data_url = balloon->notification().content_url(); 315 GURL data_url = balloon->notification().content_url();
316 EXPECT_EQ(std::string::npos, data_url.spec().find("<script>")); 316 EXPECT_EQ(std::string::npos, data_url.spec().find("<script>"));
317 EXPECT_EQ(std::string::npos, data_url.spec().find("<i>")); 317 EXPECT_EQ(std::string::npos, data_url.spec().find("<i>"));
318 } 318 }
319 319
320 } // namespace chromeos 320 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698