| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/environment.h" | 6 #include "base/environment.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
| 10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 IN_PROC_BROWSER_TEST_F(NaClGdbTest, Empty) { | 35 IN_PROC_BROWSER_TEST_F(NaClGdbTest, Empty) { |
| 36 FilePath mock_nacl_gdb_file; | 36 FilePath mock_nacl_gdb_file; |
| 37 scoped_ptr<base::Environment> env(base::Environment::Create()); | 37 scoped_ptr<base::Environment> env(base::Environment::Create()); |
| 38 std::string content; | 38 std::string content; |
| 39 // TODO(halyavin): Make this test to work on Windows 32-bit. Currently this | 39 // TODO(halyavin): Make this test to work on Windows 32-bit. Currently this |
| 40 // is not possible because NaCl doesn't work without sandbox since 1Gb of | 40 // is not possible because NaCl doesn't work without sandbox since 1Gb of |
| 41 // space is not reserved. We can't reserve 1Gb of space because | 41 // space is not reserved. We can't reserve 1Gb of space because |
| 42 // base::LaunchProcess doesn't support creating suspended processes. We need | 42 // base::LaunchProcess doesn't support creating suspended processes. We need |
| 43 // to either add suspended process support to base::LaunchProcess or use | 43 // to either add suspended process support to base::LaunchProcess or use |
| 44 // Win API. | 44 // Win API. |
| 45 #if defined(OS_WIN) |
| 45 if (base::win::OSInfo::GetInstance()->wow64_status() == | 46 if (base::win::OSInfo::GetInstance()->wow64_status() == |
| 46 base::win::OSInfo::WOW64_DISABLED) { | 47 base::win::OSInfo::WOW64_DISABLED) { |
| 47 return; | 48 return; |
| 48 } | 49 } |
| 50 #endif |
| 49 EXPECT_TRUE(file_util::CreateTemporaryFile(&mock_nacl_gdb_file)); | 51 EXPECT_TRUE(file_util::CreateTemporaryFile(&mock_nacl_gdb_file)); |
| 50 env->SetVar("MOCK_NACL_GDB", mock_nacl_gdb_file.AsUTF8Unsafe()); | 52 env->SetVar("MOCK_NACL_GDB", mock_nacl_gdb_file.AsUTF8Unsafe()); |
| 51 RunTestViaHTTP("Empty"); | 53 RunTestViaHTTP("Empty"); |
| 52 env->UnSetVar("MOCK_NACL_GDB"); | 54 env->UnSetVar("MOCK_NACL_GDB"); |
| 53 EXPECT_TRUE(file_util::ReadFileToString(mock_nacl_gdb_file, &content)); | 55 EXPECT_TRUE(file_util::ReadFileToString(mock_nacl_gdb_file, &content)); |
| 54 EXPECT_STREQ("PASS", content.c_str()); | 56 EXPECT_STREQ("PASS", content.c_str()); |
| 55 EXPECT_TRUE(file_util::Delete(mock_nacl_gdb_file, false)); | 57 EXPECT_TRUE(file_util::Delete(mock_nacl_gdb_file, false)); |
| 56 } | 58 } |
| OLD | NEW |