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

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

Issue 16058002: Better workaround for extension browser test problems on win debug bots (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: avoid leaving orphan temp directories 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
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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. 167 // See http://crbug.com/177163 for details.
168 #if defined(OS_WIN) && !defined(NDEBUG) 168 #if defined(OS_WIN) && !defined(NDEBUG)
169 LOG(WARNING) << "Workaround for 177163, prematurely stopping test"; 169 LOG(WARNING) << "Workaround for 177163, prematurely returning";
170 // Following is necessary for sharding scripts to think the test passed. 170 return true;
171 fprintf(stderr, "[ OK ] X (1000ms total)\r\n");
172 fflush(stderr);
173 ExitProcess(0);
174 #endif 171 #endif
175 return RunExtensionTestImpl(extension_name, page_url, flags); 172 return RunExtensionTestImpl(extension_name, page_url, flags);
176 } 173 }
177 174
178 175
179 bool ExtensionApiTest::RunPageTest(const std::string& page_url) { 176 bool ExtensionApiTest::RunPageTest(const std::string& page_url) {
180 return RunExtensionSubtest("", page_url); 177 return RunExtensionSubtest("", page_url);
181 } 178 }
182 179
183 bool ExtensionApiTest::RunPageTest(const std::string& page_url, 180 bool ExtensionApiTest::RunPageTest(const std::string& page_url,
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 test_config_->SetInteger(kTestWebSocketPort, 317 test_config_->SetInteger(kTestWebSocketPort,
321 websocket_server_->host_port_pair().port()); 318 websocket_server_->host_port_pair().port());
322 319
323 return true; 320 return true;
324 } 321 }
325 322
326 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { 323 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) {
327 ExtensionBrowserTest::SetUpCommandLine(command_line); 324 ExtensionBrowserTest::SetUpCommandLine(command_line);
328 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); 325 test_data_dir_ = test_data_dir_.AppendASCII("api_test");
329 } 326 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698