| OLD | NEW |
| 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 <map> | 5 #include <map> |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 // the CrxInstaller actions we want. | 810 // the CrxInstaller actions we want. |
| 811 TestingProfile profile; | 811 TestingProfile profile; |
| 812 profile.CreateExtensionService( | 812 profile.CreateExtensionService( |
| 813 CommandLine::ForCurrentProcess(), | 813 CommandLine::ForCurrentProcess(), |
| 814 FilePath(), | 814 FilePath(), |
| 815 false); | 815 false); |
| 816 profile.GetExtensionService()->set_extensions_enabled(true); | 816 profile.GetExtensionService()->set_extensions_enabled(true); |
| 817 profile.GetExtensionService()->set_show_extensions_prompts(false); | 817 profile.GetExtensionService()->set_show_extensions_prompts(false); |
| 818 | 818 |
| 819 scoped_refptr<CrxInstaller> fake_crx1( | 819 scoped_refptr<CrxInstaller> fake_crx1( |
| 820 profile.GetExtensionService()->MakeCrxInstaller(NULL)); | 820 CrxInstaller::Create(profile.GetExtensionService(), NULL)); |
| 821 scoped_refptr<CrxInstaller> fake_crx2( | 821 scoped_refptr<CrxInstaller> fake_crx2( |
| 822 profile.GetExtensionService()->MakeCrxInstaller(NULL)); | 822 CrxInstaller::Create(profile.GetExtensionService(), NULL)); |
| 823 | 823 |
| 824 if (updates_start_running) { | 824 if (updates_start_running) { |
| 825 // Add fake CrxInstaller to be returned by service.UpdateExtension(). | 825 // Add fake CrxInstaller to be returned by service.UpdateExtension(). |
| 826 service.AddFakeCrxInstaller(id1, fake_crx1.get()); | 826 service.AddFakeCrxInstaller(id1, fake_crx1.get()); |
| 827 service.AddFakeCrxInstaller(id2, fake_crx2.get()); | 827 service.AddFakeCrxInstaller(id2, fake_crx2.get()); |
| 828 } else { | 828 } else { |
| 829 // If we don't add fake CRX installers, the mock service fakes a failure | 829 // If we don't add fake CRX installers, the mock service fakes a failure |
| 830 // starting the install. | 830 // starting the install. |
| 831 } | 831 } |
| 832 | 832 |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 | 1259 |
| 1260 // TODO(asargent) - (http://crbug.com/12780) add tests for: | 1260 // TODO(asargent) - (http://crbug.com/12780) add tests for: |
| 1261 // -prodversionmin (shouldn't update if browser version too old) | 1261 // -prodversionmin (shouldn't update if browser version too old) |
| 1262 // -manifests & updates arriving out of order / interleaved | 1262 // -manifests & updates arriving out of order / interleaved |
| 1263 // -malformed update url (empty, file://, has query, has a # fragment, etc.) | 1263 // -malformed update url (empty, file://, has query, has a # fragment, etc.) |
| 1264 // -An extension gets uninstalled while updates are in progress (so it doesn't | 1264 // -An extension gets uninstalled while updates are in progress (so it doesn't |
| 1265 // "come back from the dead") | 1265 // "come back from the dead") |
| 1266 // -An extension gets manually updated to v3 while we're downloading v2 (ie | 1266 // -An extension gets manually updated to v3 while we're downloading v2 (ie |
| 1267 // you don't get downgraded accidentally) | 1267 // you don't get downgraded accidentally) |
| 1268 // -An update manifest mentions multiple updates | 1268 // -An update manifest mentions multiple updates |
| OLD | NEW |