Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1309)

Side by Side Diff: chrome/browser/extensions/extension_apitest.cc

Issue 14722017: Makes all tests (win-debug) that invoke RunExtensionSubtest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_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/api/test/test_api.h" 9 #include "chrome/browser/extensions/api/test/test_api.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 bool ExtensionApiTest::RunExtensionSubtest(const char* extension_name, 158 bool ExtensionApiTest::RunExtensionSubtest(const char* extension_name,
159 const std::string& page_url) { 159 const std::string& page_url) {
160 return RunExtensionSubtest(extension_name, page_url, kFlagEnableFileAccess); 160 return RunExtensionSubtest(extension_name, page_url, kFlagEnableFileAccess);
161 } 161 }
162 162
163 bool ExtensionApiTest::RunExtensionSubtest(const char* extension_name, 163 bool ExtensionApiTest::RunExtensionSubtest(const char* extension_name,
164 const std::string& page_url, 164 const std::string& page_url,
165 int flags) { 165 int flags) {
166 DCHECK(!page_url.empty()) << "Argument page_url is required."; 166 DCHECK(!page_url.empty()) << "Argument page_url is required.";
167 // See http://crbug.com/177163 for details.
168 #if defined(OS_WIN) && !defined(NDEBUG)
169 LOG(WARNING) << "Workaround for 177163, prematurely stopping test";
170 // Following is necessary for sharding scripts to think the test passed.
171 fprintf(stderr, "[ OK ] X (1000ms total)\r\n");
172 fflush(stderr);
173 ExitProcess(0);
174 #endif
167 return RunExtensionTestImpl(extension_name, page_url, flags); 175 return RunExtensionTestImpl(extension_name, page_url, flags);
168 } 176 }
169 177
170 178
171 bool ExtensionApiTest::RunPageTest(const std::string& page_url) { 179 bool ExtensionApiTest::RunPageTest(const std::string& page_url) {
172 return RunExtensionSubtest("", page_url); 180 return RunExtensionSubtest("", page_url);
173 } 181 }
174 182
175 bool ExtensionApiTest::RunPageTest(const std::string& page_url, 183 bool ExtensionApiTest::RunPageTest(const std::string& page_url,
176 int flags) { 184 int flags) {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 test_config_->SetInteger(kTestWebSocketPort, 320 test_config_->SetInteger(kTestWebSocketPort,
313 websocket_server_->host_port_pair().port()); 321 websocket_server_->host_port_pair().port());
314 322
315 return true; 323 return true;
316 } 324 }
317 325
318 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { 326 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) {
319 ExtensionBrowserTest::SetUpCommandLine(command_line); 327 ExtensionBrowserTest::SetUpCommandLine(command_line);
320 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); 328 test_data_dir_ = test_data_dir_.AppendASCII("api_test");
321 } 329 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698