Chromium Code Reviews| Index: chrome/browser/download/notification/download_notification_item_unittest.cc |
| diff --git a/chrome/browser/download/notification/download_notification_item_unittest.cc b/chrome/browser/download/notification/download_notification_item_unittest.cc |
| index 693ee03dc6064ce0c6d9be0aa566508ed70934d0..867e7989c41dfa0f1953d690540d83b39eb00ecb 100644 |
| --- a/chrome/browser/download/notification/download_notification_item_unittest.cc |
| +++ b/chrome/browser/download/notification/download_notification_item_unittest.cc |
| @@ -7,6 +7,9 @@ |
| #include "base/run_loop.h" |
| #include "base/test/test_simple_task_runner.h" |
| #include "base/thread_task_runner_handle.h" |
| +#include "chrome/test/base/testing_browser_process.h" |
| +#include "chrome/test/base/testing_profile.h" |
| +#include "chrome/test/base/testing_profile_manager.h" |
| #include "content/public/test/mock_download_item.h" |
| #include "content/public/test/mock_download_manager.h" |
| #include "testing/gmock/include/gmock/gmock.h" |
| @@ -121,8 +124,12 @@ class DownloadNotificationItemTest : public testing::Test { |
| } |
| void CreateDownloadNotificationItem() { |
| - download_notification_item_.reset( |
| - new DownloadNotificationItem(download_item_.get(), &delegate_)); |
| + TestingProfileManager profile_manager(TestingBrowserProcess::GetGlobal()); |
| + ASSERT_TRUE(profile_manager.SetUp()); |
|
asanka
2015/03/24 18:36:15
Move the TestingProfileManager construction and Se
yoshiki
2015/03/25 05:30:25
Done. I moved the construction of Profile as well.
|
| + Profile* profile = profile_manager.CreateTestingProfile("test-user"); |
|
asanka
2015/03/24 18:36:15
Can't we at least test whether two notifications c
yoshiki
2015/03/25 05:30:25
That's good idea. But I think the multi-user test
asanka
2015/03/25 21:04:48
It would be great if such a test was part of this
|
| + |
| + download_notification_item_.reset(new DownloadNotificationItem( |
| + download_item_.get(), profile, &delegate_)); |
| } |
| scoped_refptr<base::TestSimpleTaskRunner> runner_; |