OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 10 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 public: | 258 public: |
259 ~DownloadNotificationTestBase() override {} | 259 ~DownloadNotificationTestBase() override {} |
260 | 260 |
261 void SetUpCommandLine(base::CommandLine* command_line) override { | 261 void SetUpCommandLine(base::CommandLine* command_line) override { |
262 // TODO(yoshiki): Remove this after the download notification launches. | 262 // TODO(yoshiki): Remove this after the download notification launches. |
263 command_line->AppendSwitchASCII(switches::kEnableDownloadNotification, | 263 command_line->AppendSwitchASCII(switches::kEnableDownloadNotification, |
264 "enabled"); | 264 "enabled"); |
265 } | 265 } |
266 | 266 |
267 void SetUpOnMainThread() override { | 267 void SetUpOnMainThread() override { |
268 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 268 ASSERT_TRUE(embedded_test_server()->Start()); |
269 | 269 |
270 content::BrowserThread::PostTask( | 270 content::BrowserThread::PostTask( |
271 content::BrowserThread::IO, FROM_HERE, | 271 content::BrowserThread::IO, FROM_HERE, |
272 base::Bind(&net::URLRequestSlowDownloadJob::AddUrlHandler)); | 272 base::Bind(&net::URLRequestSlowDownloadJob::AddUrlHandler)); |
273 } | 273 } |
274 | 274 |
275 content::DownloadManager* GetDownloadManager(Browser* browser) { | 275 content::DownloadManager* GetDownloadManager(Browser* browser) { |
276 return content::BrowserContext::GetDownloadManager(browser->profile()); | 276 return content::BrowserContext::GetDownloadManager(browser->profile()); |
277 } | 277 } |
278 }; | 278 }; |
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1243 EXPECT_EQ(message_center::NOTIFICATION_TYPE_BASE_FORMAT, | 1243 EXPECT_EQ(message_center::NOTIFICATION_TYPE_BASE_FORMAT, |
1244 GetNotification(notification_id_user1)->type()); | 1244 GetNotification(notification_id_user1)->type()); |
1245 EXPECT_EQ(message_center::NOTIFICATION_TYPE_BASE_FORMAT, | 1245 EXPECT_EQ(message_center::NOTIFICATION_TYPE_BASE_FORMAT, |
1246 GetNotification(notification_id_user2_1)->type()); | 1246 GetNotification(notification_id_user2_1)->type()); |
1247 // Normal notifications for user2. | 1247 // Normal notifications for user2. |
1248 EXPECT_EQ(message_center::NOTIFICATION_TYPE_BASE_FORMAT, | 1248 EXPECT_EQ(message_center::NOTIFICATION_TYPE_BASE_FORMAT, |
1249 GetNotification(notification_id_user2_1)->type()); | 1249 GetNotification(notification_id_user2_1)->type()); |
1250 EXPECT_EQ(message_center::NOTIFICATION_TYPE_BASE_FORMAT, | 1250 EXPECT_EQ(message_center::NOTIFICATION_TYPE_BASE_FORMAT, |
1251 GetNotification(notification_id_user2_2)->type()); | 1251 GetNotification(notification_id_user2_2)->type()); |
1252 } | 1252 } |
OLD | NEW |