| OLD | NEW |
| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 std::string GetPrefURLForApp(Profile* profile, const base::string16& appid) { | 55 std::string GetPrefURLForApp(Profile* profile, const base::string16& appid) { |
| 56 const base::DictionaryValue* pref = GetPrefs(profile); | 56 const base::DictionaryValue* pref = GetPrefs(profile); |
| 57 EXPECT_TRUE(pref->HasKey(base::UTF16ToUTF8(appid))); | 57 EXPECT_TRUE(pref->HasKey(base::UTF16ToUTF8(appid))); |
| 58 const base::DictionaryValue* value; | 58 const base::DictionaryValue* value; |
| 59 pref->GetDictionaryWithoutPathExpansion(base::UTF16ToUTF8(appid), &value); | 59 pref->GetDictionaryWithoutPathExpansion(base::UTF16ToUTF8(appid), &value); |
| 60 std::string url; | 60 std::string url; |
| 61 value->GetString("url", &url); | 61 value->GetString("url", &url); |
| 62 return url; | 62 return url; |
| 63 } | 63 } |
| 64 | 64 |
| 65 base::MessageLoop message_loop_; |
| 65 scoped_ptr<base::CommandLine> command_line_; | 66 scoped_ptr<base::CommandLine> command_line_; |
| 66 }; | 67 }; |
| 67 | 68 |
| 68 class MockBackgroundContents : public BackgroundContents { | 69 class MockBackgroundContents : public BackgroundContents { |
| 69 public: | 70 public: |
| 70 explicit MockBackgroundContents(Profile* profile) | 71 explicit MockBackgroundContents(Profile* profile) |
| 71 : appid_(base::ASCIIToUTF16("app_id")), | 72 : appid_(base::ASCIIToUTF16("app_id")), |
| 72 profile_(profile) { | 73 profile_(profile) { |
| 73 } | 74 } |
| 74 MockBackgroundContents(Profile* profile, const std::string& id) | 75 MockBackgroundContents(Profile* profile, const std::string& id) |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 CreateCrashNotification(extension); | 386 CreateCrashNotification(extension); |
| 386 CreateCrashNotification(extension); | 387 CreateCrashNotification(extension); |
| 387 | 388 |
| 388 message_center::MessageCenter* message_center = | 389 message_center::MessageCenter* message_center = |
| 389 message_center::MessageCenter::Get(); | 390 message_center::MessageCenter::Get(); |
| 390 message_center::NotificationList::Notifications notifications = | 391 message_center::NotificationList::Notifications notifications = |
| 391 message_center->GetVisibleNotifications(); | 392 message_center->GetVisibleNotifications(); |
| 392 ASSERT_EQ(1u, notifications.size()); | 393 ASSERT_EQ(1u, notifications.size()); |
| 393 } | 394 } |
| 394 #endif | 395 #endif |
| OLD | NEW |