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/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } | 109 } |
110 } | 110 } |
111 return NULL; | 111 return NULL; |
112 } | 112 } |
113 | 113 |
114 void ExtensionBrowserTest::SetUp() { | 114 void ExtensionBrowserTest::SetUp() { |
115 test_extension_cache_.reset(new extensions::ExtensionCacheFake()); | 115 test_extension_cache_.reset(new extensions::ExtensionCacheFake()); |
116 InProcessBrowserTest::SetUp(); | 116 InProcessBrowserTest::SetUp(); |
117 } | 117 } |
118 | 118 |
119 void ExtensionBrowserTest::SetUpCommandLine(CommandLine* command_line) { | 119 void ExtensionBrowserTest::SetUpCommandLine(base::CommandLine* command_line) { |
120 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); | 120 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); |
121 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); | 121 test_data_dir_ = test_data_dir_.AppendASCII("extensions"); |
122 observer_.reset(new ExtensionTestNotificationObserver(browser())); | 122 observer_.reset(new ExtensionTestNotificationObserver(browser())); |
123 | 123 |
124 #if defined(OS_CHROMEOS) | 124 #if defined(OS_CHROMEOS) |
125 if (set_chromeos_user_) { | 125 if (set_chromeos_user_) { |
126 // This makes sure that we create the Default profile first, with no | 126 // This makes sure that we create the Default profile first, with no |
127 // ExtensionService and then the real profile with one, as we do when | 127 // ExtensionService and then the real profile with one, as we do when |
128 // running on chromeos. | 128 // running on chromeos. |
129 command_line->AppendSwitchASCII(chromeos::switches::kLoginUser, | 129 command_line->AppendSwitchASCII(chromeos::switches::kLoginUser, |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
661 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( | 661 return extensions::browsertest_util::ExecuteScriptInBackgroundPage( |
662 profile(), extension_id, script); | 662 profile(), extension_id, script); |
663 } | 663 } |
664 | 664 |
665 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( | 665 bool ExtensionBrowserTest::ExecuteScriptInBackgroundPageNoWait( |
666 const std::string& extension_id, | 666 const std::string& extension_id, |
667 const std::string& script) { | 667 const std::string& script) { |
668 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( | 668 return extensions::browsertest_util::ExecuteScriptInBackgroundPageNoWait( |
669 profile(), extension_id, script); | 669 profile(), extension_id, script); |
670 } | 670 } |
OLD | NEW |