| 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 // TODO(rickcam): Bug 73183: Add unit tests for image loading | 5 // TODO(rickcam): Bug 73183: Add unit tests for image loading |
| 6 | 6 |
| 7 #include <cstdlib> | 7 #include <cstdlib> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "chrome/browser/background/background_application_list_model.h" | 10 #include "chrome/browser/background/background_application_list_model.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 } | 41 } |
| 42 | 42 |
| 43 class BackgroundApplicationListModelTest : public ExtensionServiceTestBase { | 43 class BackgroundApplicationListModelTest : public ExtensionServiceTestBase { |
| 44 public: | 44 public: |
| 45 BackgroundApplicationListModelTest() {} | 45 BackgroundApplicationListModelTest() {} |
| 46 virtual ~BackgroundApplicationListModelTest() {} | 46 virtual ~BackgroundApplicationListModelTest() {} |
| 47 | 47 |
| 48 protected: | 48 protected: |
| 49 void InitializeAndLoadEmptyExtensionService() { | 49 void InitializeAndLoadEmptyExtensionService() { |
| 50 InitializeEmptyExtensionService(); | 50 InitializeEmptyExtensionService(); |
| 51 service_->OnLoadedInstalledExtensions(); /* Sends EXTENSIONS_READY */ | 51 service_->Init(); /* Sends EXTENSIONS_READY */ |
| 52 } | 52 } |
| 53 | 53 |
| 54 bool IsBackgroundApp(const Extension& app) { | 54 bool IsBackgroundApp(const Extension& app) { |
| 55 return BackgroundApplicationListModel::IsBackgroundApp(app, | 55 return BackgroundApplicationListModel::IsBackgroundApp(app, |
| 56 profile_.get()); | 56 profile_.get()); |
| 57 } | 57 } |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 // Returns a barebones test Extension object with the specified |name|. The | 60 // Returns a barebones test Extension object with the specified |name|. The |
| 61 // returned extension will include background permission iff | 61 // returned extension will include background permission iff |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 break; | 371 break; |
| 372 case 2: | 372 case 2: |
| 373 TogglePermission(service, &extensions, model.get(), &expected, &count); | 373 TogglePermission(service, &extensions, model.get(), &expected, &count); |
| 374 break; | 374 break; |
| 375 default: | 375 default: |
| 376 NOTREACHED(); | 376 NOTREACHED(); |
| 377 break; | 377 break; |
| 378 } | 378 } |
| 379 } | 379 } |
| 380 } | 380 } |
| OLD | NEW |