| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 // There are a number of tests that still use toolstrips. Rather than | 47 // There are a number of tests that still use toolstrips. Rather than |
| 48 // selectively enabling each of them, enable toolstrips for all extension | 48 // selectively enabling each of them, enable toolstrips for all extension |
| 49 // tests. | 49 // tests. |
| 50 command_line->AppendSwitch(switches::kEnableExtensionToolstrips); | 50 command_line->AppendSwitch(switches::kEnableExtensionToolstrips); |
| 51 | 51 |
| 52 #if defined(OS_CHROMEOS) | 52 #if defined(OS_CHROMEOS) |
| 53 // This makes sure that we create the Default profile first, with no | 53 // This makes sure that we create the Default profile first, with no |
| 54 // ExtensionsService and then the real profile with one, as we do when | 54 // ExtensionsService and then the real profile with one, as we do when |
| 55 // running on chromeos. | 55 // running on chromeos. |
| 56 command_line->AppendSwitchWithValue( | 56 command_line->AppendSwitchASCII(switches::kLoginUser, |
| 57 switches::kLoginUser, "TestUser@gmail.com"); | 57 "TestUser@gmail.com"); |
| 58 command_line->AppendSwitchWithValue(switches::kLoginProfile, "user"); | 58 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); |
| 59 command_line->AppendSwitch(switches::kNoFirstRun); | 59 command_line->AppendSwitch(switches::kNoFirstRun); |
| 60 #endif | 60 #endif |
| 61 } | 61 } |
| 62 | 62 |
| 63 bool ExtensionBrowserTest::LoadExtensionImpl(const FilePath& path, | 63 bool ExtensionBrowserTest::LoadExtensionImpl(const FilePath& path, |
| 64 bool incognito_enabled) { | 64 bool incognito_enabled) { |
| 65 ExtensionsService* service = browser()->profile()->GetExtensionsService(); | 65 ExtensionsService* service = browser()->profile()->GetExtensionsService(); |
| 66 size_t num_before = service->extensions()->size(); | 66 size_t num_before = service->extensions()->size(); |
| 67 { | 67 { |
| 68 NotificationRegistrar registrar; | 68 NotificationRegistrar registrar; |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 MessageLoopForUI::current()->Quit(); | 348 MessageLoopForUI::current()->Quit(); |
| 349 } | 349 } |
| 350 break; | 350 break; |
| 351 } | 351 } |
| 352 | 352 |
| 353 default: | 353 default: |
| 354 NOTREACHED(); | 354 NOTREACHED(); |
| 355 break; | 355 break; |
| 356 } | 356 } |
| 357 } | 357 } |
| OLD | NEW |