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

Side by Side Diff: chrome/browser/extensions/updater/extension_updater_unittest.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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
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 <list> 5 #include <list>
6 #include <map> 6 #include <map>
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 fetcher = factory.GetFetcherByID(ExtensionDownloader::kExtensionFetcherId); 1482 fetcher = factory.GetFetcherByID(ExtensionDownloader::kExtensionFetcherId);
1483 EXPECT_TRUE(fetcher != NULL && fetcher->delegate() != NULL); 1483 EXPECT_TRUE(fetcher != NULL && fetcher->delegate() != NULL);
1484 EXPECT_TRUE(fetcher->GetLoadFlags() == kExpectedLoadFlags); 1484 EXPECT_TRUE(fetcher->GetLoadFlags() == kExpectedLoadFlags);
1485 1485
1486 // We need some CrxInstallers, and CrxInstallers require a real 1486 // We need some CrxInstallers, and CrxInstallers require a real
1487 // ExtensionService. Create one on the testing profile. Any action 1487 // ExtensionService. Create one on the testing profile. Any action
1488 // the CrxInstallers take is on the testing profile's extension 1488 // the CrxInstallers take is on the testing profile's extension
1489 // service, not on our mock |service|. This allows us to fake 1489 // service, not on our mock |service|. This allows us to fake
1490 // the CrxInstaller actions we want. 1490 // the CrxInstaller actions we want.
1491 TestingProfile profile; 1491 TestingProfile profile;
1492 static_cast<TestExtensionSystem*>( 1492 static_cast<TestExtensionSystem*>(ExtensionSystem::Get(&profile))
1493 ExtensionSystem::Get(&profile))-> 1493 ->CreateExtensionService(base::CommandLine::ForCurrentProcess(),
1494 CreateExtensionService( 1494 base::FilePath(), false);
1495 CommandLine::ForCurrentProcess(),
1496 base::FilePath(),
1497 false);
1498 ExtensionService* extension_service = 1495 ExtensionService* extension_service =
1499 ExtensionSystem::Get(&profile)->extension_service(); 1496 ExtensionSystem::Get(&profile)->extension_service();
1500 extension_service->set_extensions_enabled(true); 1497 extension_service->set_extensions_enabled(true);
1501 extension_service->set_show_extensions_prompts(false); 1498 extension_service->set_show_extensions_prompts(false);
1502 1499
1503 scoped_refptr<CrxInstaller> fake_crx1( 1500 scoped_refptr<CrxInstaller> fake_crx1(
1504 CrxInstaller::CreateSilent(extension_service)); 1501 CrxInstaller::CreateSilent(extension_service));
1505 scoped_refptr<CrxInstaller> fake_crx2( 1502 scoped_refptr<CrxInstaller> fake_crx2(
1506 CrxInstaller::CreateSilent(extension_service)); 1503 CrxInstaller::CreateSilent(extension_service));
1507 1504
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
2247 // -prodversionmin (shouldn't update if browser version too old) 2244 // -prodversionmin (shouldn't update if browser version too old)
2248 // -manifests & updates arriving out of order / interleaved 2245 // -manifests & updates arriving out of order / interleaved
2249 // -malformed update url (empty, file://, has query, has a # fragment, etc.) 2246 // -malformed update url (empty, file://, has query, has a # fragment, etc.)
2250 // -An extension gets uninstalled while updates are in progress (so it doesn't 2247 // -An extension gets uninstalled while updates are in progress (so it doesn't
2251 // "come back from the dead") 2248 // "come back from the dead")
2252 // -An extension gets manually updated to v3 while we're downloading v2 (ie 2249 // -An extension gets manually updated to v3 while we're downloading v2 (ie
2253 // you don't get downgraded accidentally) 2250 // you don't get downgraded accidentally)
2254 // -An update manifest mentions multiple updates 2251 // -An update manifest mentions multiple updates
2255 2252
2256 } // namespace extensions 2253 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/test_extension_system.cc ('k') | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698