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

Side by Side Diff: chrome/browser/extensions/crx_installer_browsertest.cc

Issue 308003005: app_list: Drive app integration. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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
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 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "chrome/browser/download/download_crx_util.h" 7 #include "chrome/browser/download/download_crx_util.h"
8 #include "chrome/browser/extensions/browser_action_test_util.h" 8 #include "chrome/browser/extensions/browser_action_test_util.h"
9 #include "chrome/browser/extensions/crx_installer.h" 9 #include "chrome/browser/extensions/crx_installer.h"
10 #include "chrome/browser/extensions/extension_browsertest.h" 10 #include "chrome/browser/extensions/extension_browsertest.h"
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 531
532 EXPECT_FALSE(base::PathExists(extension_path)); 532 EXPECT_FALSE(base::PathExists(extension_path));
533 } 533 }
534 #endif 534 #endif
535 535
536 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, DoNotSync) { 536 IN_PROC_BROWSER_TEST_F(ExtensionCrxInstallerTest, DoNotSync) {
537 ExtensionService* service = extensions::ExtensionSystem::Get( 537 ExtensionService* service = extensions::ExtensionSystem::Get(
538 browser()->profile())->extension_service(); 538 browser()->profile())->extension_service();
539 scoped_refptr<CrxInstaller> crx_installer( 539 scoped_refptr<CrxInstaller> crx_installer(
540 CrxInstaller::CreateSilent(service)); 540 CrxInstaller::CreateSilent(service));
541 crx_installer->set_install_flag(kInstallFlagDoNotSync, true); 541 crx_installer->set_do_not_sync(true);
542 crx_installer->InstallCrx(test_data_dir_.AppendASCII("good.crx")); 542 crx_installer->InstallCrx(test_data_dir_.AppendASCII("good.crx"));
543 EXPECT_TRUE(WaitForCrxInstallerDone()); 543 EXPECT_TRUE(WaitForCrxInstallerDone());
544 ASSERT_TRUE(crx_installer->extension()); 544 ASSERT_TRUE(crx_installer->extension());
545 545
546 const ExtensionPrefs* extension_prefs = 546 const ExtensionPrefs* extension_prefs =
547 ExtensionPrefs::Get(browser()->profile()); 547 ExtensionPrefs::Get(browser()->profile());
548 EXPECT_TRUE(extension_prefs->DoNotSync(crx_installer->extension()->id())); 548 EXPECT_TRUE(extension_prefs->DoNotSync(crx_installer->extension()->id()));
549 EXPECT_FALSE(extensions::util::ShouldSyncApp(crx_installer->extension(), 549 EXPECT_FALSE(extensions::util::ShouldSyncApp(crx_installer->extension(),
550 browser()->profile())); 550 browser()->profile()));
551 } 551 }
552 552
553 } // namespace extensions 553 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698