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

Side by Side Diff: chrome/browser/chromeos/customization_document_unittest.cc

Issue 217483004: Create AppListSyncableService with BrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 8 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/profiles/chrome_browser_main_extra_parts_profiles.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/customization_document.h" 5 #include "chrome/browser/chromeos/customization_document.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/prefs/testing_pref_service.h" 8 #include "base/prefs/testing_pref_service.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 AddExpectedManifest(kDummyCustomizationID, kGoodServicesManifest); 379 AddExpectedManifest(kDummyCustomizationID, kGoodServicesManifest);
380 380
381 ServicesCustomizationDocument* doc = 381 ServicesCustomizationDocument* doc =
382 ServicesCustomizationDocument::GetInstance(); 382 ServicesCustomizationDocument::GetInstance();
383 EXPECT_FALSE(doc->IsReady()); 383 EXPECT_FALSE(doc->IsReady());
384 384
385 scoped_ptr<TestingProfile> profile = CreateProfile(); 385 scoped_ptr<TestingProfile> profile = CreateProfile();
386 extensions::ExternalLoader* loader = doc->CreateExternalLoader(profile.get()); 386 extensions::ExternalLoader* loader = doc->CreateExternalLoader(profile.get());
387 EXPECT_TRUE(loader); 387 EXPECT_TRUE(loader);
388 388
389 app_list::AppListSyncableServiceFactory::GetInstance()->
390 SetTestingFactoryAndUse(
391 profile.get(),
392 &app_list::AppListSyncableServiceFactory::BuildInstanceFor);
393
389 MockExternalProviderVisitor visitor; 394 MockExternalProviderVisitor visitor;
390 scoped_ptr<extensions::ExternalProviderImpl> provider( 395 scoped_ptr<extensions::ExternalProviderImpl> provider(
391 new extensions::ExternalProviderImpl( 396 new extensions::ExternalProviderImpl(
392 &visitor, 397 &visitor,
393 loader, 398 loader,
394 profile.get(), 399 profile.get(),
395 extensions::Manifest::EXTERNAL_PREF, 400 extensions::Manifest::EXTERNAL_PREF,
396 extensions::Manifest::EXTERNAL_PREF_DOWNLOAD, 401 extensions::Manifest::EXTERNAL_PREF_DOWNLOAD,
397 extensions::Extension::FROM_WEBSTORE | 402 extensions::Extension::FROM_WEBSTORE |
398 extensions::Extension::WAS_INSTALLED_BY_DEFAULT)); 403 extensions::Extension::WAS_INSTALLED_BY_DEFAULT));
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _, _, _, _, _)) 468 EXPECT_CALL(visitor, OnExternalExtensionUpdateUrlFound(_, _, _, _, _, _))
464 .Times(0); 469 .Times(0);
465 EXPECT_CALL(visitor, OnExternalProviderReady(_)) 470 EXPECT_CALL(visitor, OnExternalProviderReady(_))
466 .Times(1); 471 .Times(1);
467 472
468 RunUntilIdle(); 473 RunUntilIdle();
469 EXPECT_TRUE(doc->IsReady()); 474 EXPECT_TRUE(doc->IsReady());
470 } 475 }
471 476
472 } // namespace chromeos 477 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698