| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 using extensions::ExtensionCreator; | 55 using extensions::ExtensionCreator; |
| 56 using extensions::FeatureSwitch; | 56 using extensions::FeatureSwitch; |
| 57 using extensions::Manifest; | 57 using extensions::Manifest; |
| 58 | 58 |
| 59 ExtensionBrowserTest::ExtensionBrowserTest() | 59 ExtensionBrowserTest::ExtensionBrowserTest() |
| 60 : loaded_(false), | 60 : loaded_(false), |
| 61 installed_(false), | 61 installed_(false), |
| 62 #if defined(OS_CHROMEOS) | 62 #if defined(OS_CHROMEOS) |
| 63 set_chromeos_user_(true), | 63 set_chromeos_user_(true), |
| 64 #endif | 64 #endif |
| 65 current_channel_(chrome::VersionInfo::CHANNEL_DEV), | 65 // Default channel is STABLE but override with UNKNOWN so that unlaunched |
| 66 // or incomplete APIs can write tests. |
| 67 current_channel_(chrome::VersionInfo::CHANNEL_UNKNOWN), |
| 66 override_prompt_for_external_extensions_( | 68 override_prompt_for_external_extensions_( |
| 67 FeatureSwitch::prompt_for_external_extensions(), | 69 FeatureSwitch::prompt_for_external_extensions(), |
| 68 false), | 70 false), |
| 69 profile_(NULL) { | 71 profile_(NULL) { |
| 70 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); | 72 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 71 } | 73 } |
| 72 | 74 |
| 73 ExtensionBrowserTest::~ExtensionBrowserTest() { | 75 ExtensionBrowserTest::~ExtensionBrowserTest() { |
| 74 } | 76 } |
| 75 | 77 |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 EXPECT_EQ(expected_hosts, num_hosts); | 608 EXPECT_EQ(expected_hosts, num_hosts); |
| 607 return host; | 609 return host; |
| 608 } | 610 } |
| 609 | 611 |
| 610 std::string ExtensionBrowserTest::ExecuteScriptInBackgroundPage( | 612 std::string ExtensionBrowserTest::ExecuteScriptInBackgroundPage( |
| 611 const std::string& extension_id, | 613 const std::string& extension_id, |
| 612 const std::string& script) { | 614 const std::string& script) { |
| 613 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( | 615 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( |
| 614 profile(), extension_id, script); | 616 profile(), extension_id, script); |
| 615 } | 617 } |
| OLD | NEW |