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

Side by Side Diff: chrome/browser/background/background_application_list_model_unittest.cc

Issue 14757022: Add a non-blocking "OneShotEvent" class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a test for the behavior within a Post()ed callback Created 7 years, 7 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 | chrome/browser/extensions/extension_service.h » ('j') | 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 // 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 29 matching lines...) Expand all
40 } 40 }
41 41
42 class BackgroundApplicationListModelTest : public ExtensionServiceTestBase { 42 class BackgroundApplicationListModelTest : public ExtensionServiceTestBase {
43 public: 43 public:
44 BackgroundApplicationListModelTest() {} 44 BackgroundApplicationListModelTest() {}
45 virtual ~BackgroundApplicationListModelTest() {} 45 virtual ~BackgroundApplicationListModelTest() {}
46 46
47 protected: 47 protected:
48 void InitializeAndLoadEmptyExtensionService() { 48 void InitializeAndLoadEmptyExtensionService() {
49 InitializeEmptyExtensionService(); 49 InitializeEmptyExtensionService();
50 service_->OnLoadedInstalledExtensions(); /* Sends EXTENSIONS_READY */ 50 service_->Init(); /* Sends EXTENSIONS_READY */
51 } 51 }
52 52
53 bool IsBackgroundApp(const Extension& app) { 53 bool IsBackgroundApp(const Extension& app) {
54 return BackgroundApplicationListModel::IsBackgroundApp(app, 54 return BackgroundApplicationListModel::IsBackgroundApp(app,
55 profile_.get()); 55 profile_.get());
56 } 56 }
57 }; 57 };
58 58
59 // Returns a barebones test Extension object with the specified |name|. The 59 // Returns a barebones test Extension object with the specified |name|. The
60 // returned extension will include background permission iff 60 // returned extension will include background permission iff
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 break; 370 break;
371 case 2: 371 case 2:
372 TogglePermission(service, &extensions, model.get(), &expected, &count); 372 TogglePermission(service, &extensions, model.get(), &expected, &count);
373 break; 373 break;
374 default: 374 default:
375 NOTREACHED(); 375 NOTREACHED();
376 break; 376 break;
377 } 377 }
378 } 378 }
379 } 379 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698