OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/extensions/extension_browsertest.h" | 5 #include "chrome/browser/extensions/extension_browsertest.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 } | 74 } |
75 size_t num_after = service->extensions()->size(); | 75 size_t num_after = service->extensions()->size(); |
76 if (num_after != (num_before + 1)) | 76 if (num_after != (num_before + 1)) |
77 return false; | 77 return false; |
78 | 78 |
79 if (incognito_enabled) { | 79 if (incognito_enabled) { |
80 // Enable the incognito bit in the extension prefs. The call to | 80 // Enable the incognito bit in the extension prefs. The call to |
81 // OnExtensionInstalled ensures the other extension prefs are set up with | 81 // OnExtensionInstalled ensures the other extension prefs are set up with |
82 // the defaults. | 82 // the defaults. |
83 Extension* extension = service->extensions()->at(num_after - 1); | 83 Extension* extension = service->extensions()->at(num_after - 1); |
84 service->extension_prefs()->OnExtensionInstalled(extension); | 84 service->extension_prefs()->OnExtensionInstalled( |
| 85 extension, Extension::ENABLED, false); |
85 service->SetIsIncognitoEnabled(extension, true); | 86 service->SetIsIncognitoEnabled(extension, true); |
86 } | 87 } |
87 | 88 |
88 return WaitForExtensionHostsToLoad(); | 89 return WaitForExtensionHostsToLoad(); |
89 } | 90 } |
90 | 91 |
91 bool ExtensionBrowserTest::LoadExtension(const FilePath& path) { | 92 bool ExtensionBrowserTest::LoadExtension(const FilePath& path) { |
92 return LoadExtensionImpl(path, false); | 93 return LoadExtensionImpl(path, false); |
93 } | 94 } |
94 | 95 |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 MessageLoopForUI::current()->Quit(); | 349 MessageLoopForUI::current()->Quit(); |
349 } | 350 } |
350 break; | 351 break; |
351 } | 352 } |
352 | 353 |
353 default: | 354 default: |
354 NOTREACHED(); | 355 NOTREACHED(); |
355 break; | 356 break; |
356 } | 357 } |
357 } | 358 } |
OLD | NEW |