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_apitest.h" | 5 #include "chrome/browser/extensions/extension_apitest.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "chrome/browser/extensions/extension_test_api.h" | 9 #include "chrome/browser/extensions/extension_test_api.h" |
10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 ExtensionService* service = browser()->profile()->GetExtensionService(); | 146 ExtensionService* service = browser()->profile()->GetExtensionService(); |
147 const Extension* extension = | 147 const Extension* extension = |
148 service->GetExtensionById(last_loaded_extension_id_, false); | 148 service->GetExtensionById(last_loaded_extension_id_, false); |
149 if (!extension) | 149 if (!extension) |
150 return false; | 150 return false; |
151 | 151 |
152 url = extension->GetResourceURL(page_url); | 152 url = extension->GetResourceURL(page_url); |
153 } | 153 } |
154 | 154 |
155 LOG(ERROR) << "Loading page url: " << url.spec(); | |
156 ui_test_utils::NavigateToURL(browser(), url); | 155 ui_test_utils::NavigateToURL(browser(), url); |
157 } | 156 } |
158 | 157 |
159 if (!catcher.GetNextResult()) { | 158 if (!catcher.GetNextResult()) { |
160 message_ = catcher.message(); | 159 message_ = catcher.message(); |
161 return false; | 160 return false; |
162 } else { | 161 } else { |
163 return true; | 162 return true; |
164 } | 163 } |
165 } | 164 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 test_config_->SetInteger(kTestServerPort, | 202 test_config_->SetInteger(kTestServerPort, |
204 test_server()->host_port_pair().port()); | 203 test_server()->host_port_pair().port()); |
205 | 204 |
206 return true; | 205 return true; |
207 } | 206 } |
208 | 207 |
209 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { | 208 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { |
210 ExtensionBrowserTest::SetUpCommandLine(command_line); | 209 ExtensionBrowserTest::SetUpCommandLine(command_line); |
211 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); | 210 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); |
212 } | 211 } |
OLD | NEW |