| OLD | NEW |
| 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 "chrome/browser/extensions/extension_browsertest.h" | 5 #include "chrome/browser/extensions/extension_browsertest.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // We don't want any warning bubbles for, e.g., unpacked extensions. | 131 // We don't want any warning bubbles for, e.g., unpacked extensions. |
| 132 ExtensionMessageBubbleFactory::set_override_for_tests( | 132 ExtensionMessageBubbleFactory::set_override_for_tests( |
| 133 ExtensionMessageBubbleFactory::OVERRIDE_DISABLED); | 133 ExtensionMessageBubbleFactory::OVERRIDE_DISABLED); |
| 134 | 134 |
| 135 #if defined(OS_CHROMEOS) | 135 #if defined(OS_CHROMEOS) |
| 136 if (set_chromeos_user_) { | 136 if (set_chromeos_user_) { |
| 137 // This makes sure that we create the Default profile first, with no | 137 // This makes sure that we create the Default profile first, with no |
| 138 // ExtensionService and then the real profile with one, as we do when | 138 // ExtensionService and then the real profile with one, as we do when |
| 139 // running on chromeos. | 139 // running on chromeos. |
| 140 command_line->AppendSwitchASCII(chromeos::switches::kLoginUser, | 140 command_line->AppendSwitchASCII(chromeos::switches::kLoginUser, |
| 141 "TestUser@gmail.com"); | 141 "testuser@gmail.com"); |
| 142 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); | 142 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); |
| 143 } | 143 } |
| 144 #endif | 144 #endif |
| 145 } | 145 } |
| 146 | 146 |
| 147 void ExtensionBrowserTest::SetUpOnMainThread() { | 147 void ExtensionBrowserTest::SetUpOnMainThread() { |
| 148 InProcessBrowserTest::SetUpOnMainThread(); | 148 InProcessBrowserTest::SetUpOnMainThread(); |
| 149 observer_.reset(new ExtensionTestNotificationObserver(browser())); | 149 observer_.reset(new ExtensionTestNotificationObserver(browser())); |
| 150 if (extension_service()->updater()) { | 150 if (extension_service()->updater()) { |
| 151 extension_service()->updater()->SetExtensionCacheForTesting( | 151 extension_service()->updater()->SetExtensionCacheForTesting( |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( | 654 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( |
| 655 profile(), extension_id, script); | 655 profile(), extension_id, script); |
| 656 } | 656 } |
| 657 | 657 |
| 658 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( | 658 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( |
| 659 const std::string& extension_id, | 659 const std::string& extension_id, |
| 660 const std::string& script) { | 660 const std::string& script) { |
| 661 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( | 661 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( |
| 662 profile(), extension_id, script); | 662 profile(), extension_id, script); |
| 663 } | 663 } |
| OLD | NEW |