| 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 <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 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 IN_PROC_BROWSER_TEST_F(NaClBrowserTestNewlibStderrPM, RedirectFg1) { | 431 IN_PROC_BROWSER_TEST_F(NaClBrowserTestNewlibStderrPM, RedirectFg1) { |
| 432 RunNaClIntegrationTest(FILE_PATH_LITERAL( | 432 RunNaClIntegrationTest(FILE_PATH_LITERAL( |
| 433 "pm_redir_test.html?stream=stderr&thread=fg&delay_us=1000000")); | 433 "pm_redir_test.html?stream=stderr&thread=fg&delay_us=1000000")); |
| 434 } | 434 } |
| 435 | 435 |
| 436 IN_PROC_BROWSER_TEST_F(NaClBrowserTestNewlibStderrPM, RedirectBg1) { | 436 IN_PROC_BROWSER_TEST_F(NaClBrowserTestNewlibStderrPM, RedirectBg1) { |
| 437 RunNaClIntegrationTest(FILE_PATH_LITERAL( | 437 RunNaClIntegrationTest(FILE_PATH_LITERAL( |
| 438 "pm_redir_test.html?stream=stderr&thread=bg&delay_us=1000000")); | 438 "pm_redir_test.html?stream=stderr&thread=bg&delay_us=1000000")); |
| 439 } | 439 } |
| 440 | 440 |
| 441 class NaClBrowserTestNewlibExtension : public NaClBrowserTestNewlib { | |
| 442 public: | |
| 443 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | |
| 444 NaClBrowserTestNewlib::SetUpCommandLine(command_line); | |
| 445 base::FilePath src_root; | |
| 446 ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &src_root)); | |
| 447 | |
| 448 base::FilePath document_root; | |
| 449 ASSERT_TRUE(GetDocumentRoot(&document_root)); | |
| 450 | |
| 451 // Document root is relative to source root, and source root may not be CWD. | |
| 452 command_line->AppendSwitchPath(switches::kLoadExtension, | |
| 453 src_root.Append(document_root)); | |
| 454 } | |
| 455 }; | |
| 456 | |
| 457 // TODO(ncbray) support glibc and PNaCl | 441 // TODO(ncbray) support glibc and PNaCl |
| 458 IN_PROC_BROWSER_TEST_F(NaClBrowserTestNewlibExtension, MimeHandler) { | 442 IN_PROC_BROWSER_TEST_F(NaClBrowserTestNewlibExtension, MimeHandler) { |
| 459 RunNaClIntegrationTest(FILE_PATH_LITERAL( | 443 RunNaClIntegrationTest(FILE_PATH_LITERAL( |
| 460 "ppapi_extension_mime_handler.html")); | 444 "ppapi_extension_mime_handler.html")); |
| 461 } | 445 } |
| 462 | 446 |
| 463 } // namespace | 447 } // namespace |
| OLD | NEW |