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

Side by Side Diff: chrome/test/nacl/nacl_browsertest.cc

Issue 2630443003: Add thread checks to NaClBrowser, and make it leaky (Closed)
Patch Set: Update NaClGdbDebugStubTest Created 3 years, 10 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
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 <stdio.h> 5 #include <stdio.h>
6 #if defined(OS_POSIX) 6 #if defined(OS_POSIX)
7 #include <unistd.h> 7 #include <unistd.h>
8 #elif defined(OS_WIN) 8 #elif defined(OS_WIN)
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 cmd.AppendArgPath(script); 303 cmd.AppendArgPath(script);
304 cmd.AppendArg(base::IntToString(debug_stub_port)); 304 cmd.AppendArg(base::IntToString(debug_stub_port));
305 cmd.AppendArg("continue"); 305 cmd.AppendArg("continue");
306 LOG(INFO) << cmd.GetCommandLineString(); 306 LOG(INFO) << cmd.GetCommandLineString();
307 *test_process = base::LaunchProcess(cmd, base::LaunchOptions()); 307 *test_process = base::LaunchProcess(cmd, base::LaunchOptions());
308 } 308 }
309 309
310 void RunWithTestDebugger(const base::FilePath::StringType& test_url) { 310 void RunWithTestDebugger(const base::FilePath::StringType& test_url) {
311 base::Process test_script; 311 base::Process test_script;
312 std::unique_ptr<base::Environment> env(base::Environment::Create()); 312 std::unique_ptr<base::Environment> env(base::Environment::Create());
313 nacl::NaClBrowser::GetInstance()->SetGdbDebugStubPortListener( 313 nacl::NaClBrowser::SetGdbDebugStubPortListenerForTest(
314 base::Bind(&NaClBrowserTestPnaclDebug::StartTestScript, 314 base::Bind(&NaClBrowserTestPnaclDebug::StartTestScript,
315 base::Unretained(this), &test_script)); 315 base::Unretained(this), &test_script));
316 // Turn on debug stub logging. 316 // Turn on debug stub logging.
317 env->SetVar("NACLVERBOSITY", "1"); 317 env->SetVar("NACLVERBOSITY", "1");
318 RunLoadTest(test_url); 318 RunLoadTest(test_url);
319 env->UnSetVar("NACLVERBOSITY"); 319 env->UnSetVar("NACLVERBOSITY");
320 nacl::NaClBrowser::GetInstance()->ClearGdbDebugStubPortListener(); 320 nacl::NaClBrowser::ClearGdbDebugStubPortListenerForTest();
321 int exit_code; 321 int exit_code;
322 LOG(INFO) << "Waiting for script to exit (which waits for embed to die)."; 322 LOG(INFO) << "Waiting for script to exit (which waits for embed to die).";
323 test_script.WaitForExit(&exit_code); 323 test_script.WaitForExit(&exit_code);
324 EXPECT_EQ(0, exit_code); 324 EXPECT_EQ(0, exit_code);
325 } 325 }
326 }; 326 };
327 327
328 // Test with the NaCl debug flag turned on, but mask off every URL 328 // Test with the NaCl debug flag turned on, but mask off every URL
329 // so that nothing is actually debugged. 329 // so that nothing is actually debugged.
330 class NaClBrowserTestPnaclDebugMasked : public NaClBrowserTestPnaclDebug { 330 class NaClBrowserTestPnaclDebugMasked : public NaClBrowserTestPnaclDebug {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 } 434 }
435 435
436 // TODO(ncbray) support glibc and PNaCl 436 // TODO(ncbray) support glibc and PNaCl
437 // flaky: crbug.com/375894 437 // flaky: crbug.com/375894
438 IN_PROC_BROWSER_TEST_F(NaClBrowserTestNewlibExtension, DISABLED_MimeHandler) { 438 IN_PROC_BROWSER_TEST_F(NaClBrowserTestNewlibExtension, DISABLED_MimeHandler) {
439 RunNaClIntegrationTest(FILE_PATH_LITERAL( 439 RunNaClIntegrationTest(FILE_PATH_LITERAL(
440 "ppapi_extension_mime_handler.html")); 440 "ppapi_extension_mime_handler.html"));
441 } 441 }
442 442
443 } // namespace 443 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698