| 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 #ifndef CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ | 5 #ifndef CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ |
| 6 #define CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ | 6 #define CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 193 |
| 194 // Sanitizers internally use some syscalls which non-SFI NaCl disallows. | 194 // Sanitizers internally use some syscalls which non-SFI NaCl disallows. |
| 195 #if defined(OS_LINUX) && !defined(ADDRESS_SANITIZER) && \ | 195 #if defined(OS_LINUX) && !defined(ADDRESS_SANITIZER) && \ |
| 196 !defined(THREAD_SANITIZER) && !defined(MEMORY_SANITIZER) && \ | 196 !defined(THREAD_SANITIZER) && !defined(MEMORY_SANITIZER) && \ |
| 197 !defined(LEAK_SANITIZER) | 197 !defined(LEAK_SANITIZER) |
| 198 # define MAYBE_NONSFI(test_case) test_case | 198 # define MAYBE_NONSFI(test_case) test_case |
| 199 #else | 199 #else |
| 200 # define MAYBE_NONSFI(test_case) DISABLED_##test_case | 200 # define MAYBE_NONSFI(test_case) DISABLED_##test_case |
| 201 #endif | 201 #endif |
| 202 | 202 |
| 203 // Currently, we only support it on x86-32 architecture. | 203 // Currently, we only support it on x86-32 or ARM architecture. |
| 204 // TODO(hidehiko,mazda): Enable this on ARM, too, when it is supported. | |
| 205 #if defined(OS_LINUX) && !defined(ADDRESS_SANITIZER) && \ | 204 #if defined(OS_LINUX) && !defined(ADDRESS_SANITIZER) && \ |
| 206 !defined(THREAD_SANITIZER) && !defined(MEMORY_SANITIZER) && \ | 205 !defined(THREAD_SANITIZER) && !defined(MEMORY_SANITIZER) && \ |
| 207 !defined(LEAK_SANITIZER) && defined(ARCH_CPU_X86) | 206 !defined(LEAK_SANITIZER) && \ |
| 207 (defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARMEL)) |
| 208 # define MAYBE_TRANSITIONAL_NONSFI(test_case) test_case | 208 # define MAYBE_TRANSITIONAL_NONSFI(test_case) test_case |
| 209 #else | 209 #else |
| 210 # define MAYBE_TRANSITIONAL_NONSFI(test_case) DISABLED_##test_case | 210 # define MAYBE_TRANSITIONAL_NONSFI(test_case) DISABLED_##test_case |
| 211 #endif | 211 #endif |
| 212 | 212 |
| 213 // Currently, translation from pexe to non-sfi nexe is supported only for | 213 // Currently, translation from pexe to non-sfi nexe is supported only for |
| 214 // x86-32 or ARM binary. | 214 // x86-32 or ARM binary. |
| 215 #if defined(OS_LINUX) && (defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARMEL)) | 215 #if defined(OS_LINUX) && (defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARMEL)) |
| 216 # define MAYBE_PNACL_NONSFI(test_case) test_case | 216 # define MAYBE_PNACL_NONSFI(test_case) test_case |
| 217 #else | 217 #else |
| 218 # define MAYBE_PNACL_NONSFI(test_case) DISABLED_##test_case | 218 # define MAYBE_PNACL_NONSFI(test_case) DISABLED_##test_case |
| 219 #endif | 219 #endif |
| 220 | 220 |
| 221 // Similar to MAYBE_NACL_HELPER_NONSFI, this is not available on ARM yet. | |
| 222 // TODO(hidehiko,mazda): Merge this to the MAYBE_PNACL_NONSFI when it is | |
| 223 // supported on ARM. | |
| 224 #if defined(OS_LINUX) && defined(ARCH_CPU_X86) | |
| 225 # define MAYBE_PNACL_TRANSITIONAL_NONSFI(test_case) test_case | |
| 226 #else | |
| 227 # define MAYBE_PNACL_TRANSITIONAL_NONSFI(test_case) DISABLED_##test_case | |
| 228 #endif | |
| 229 | |
| 230 | |
| 231 #define NACL_BROWSER_TEST_F(suite, name, body) \ | 221 #define NACL_BROWSER_TEST_F(suite, name, body) \ |
| 232 IN_PROC_BROWSER_TEST_F(suite##Newlib, name) \ | 222 IN_PROC_BROWSER_TEST_F(suite##Newlib, name) \ |
| 233 body \ | 223 body \ |
| 234 IN_PROC_BROWSER_TEST_F(suite##GLibc, MAYBE_GLIBC(name)) \ | 224 IN_PROC_BROWSER_TEST_F(suite##GLibc, MAYBE_GLIBC(name)) \ |
| 235 body \ | 225 body \ |
| 236 IN_PROC_BROWSER_TEST_F(suite##Pnacl, MAYBE_PNACL(name)) \ | 226 IN_PROC_BROWSER_TEST_F(suite##Pnacl, MAYBE_PNACL(name)) \ |
| 237 body | 227 body |
| 238 | 228 |
| 239 #endif // CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ | 229 #endif // CHROME_TEST_NACL_NACL_BROWSERTEST_UTIL_H_ |
| OLD | NEW |