| 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 |
| 11 | 11 |
| 12 #define TELEMETRY 1 | 12 #define TELEMETRY 1 |
| 13 | 13 |
| 14 #include "chrome/test/nacl/nacl_browsertest_util.h" | 14 #include "chrome/test/nacl/nacl_browsertest_util.h" |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 // These tests fail on Linux ASAN bots: <http://crbug.com/161709>. | 18 #if defined(OS_WIN) |
| 19 #if defined(OS_LINUX) && defined(ADDRESS_SANITIZER) | 19 # define MAYBE_SysconfNprocessorsOnln DISABLED_SysconfNprocessorsOnln |
| 20 #define MAYBE_SimpleLoad DISABLED_SimpleLoad | |
| 21 #define MAYBE_ExitStatus0 DISABLED_ExitStatus0 | |
| 22 #define MAYBE_ExitStatus254 DISABLED_ExitStatus254 | |
| 23 #define MAYBE_ExitStatusNeg2 DISABLED_ExitStatusNeg2 | |
| 24 #define MAYBE_PPAPICore DISABLED_PPAPICore | |
| 25 #define MAYBE_ProgressEvents DISABLED_ProgressEvents | |
| 26 #define MAYBE_PnaclMimeType DISABLED_PnaclMimeType | |
| 27 #define MAYBE_CrossOriginCORS DISABLED_CrossOriginCORS | |
| 28 #define MAYBE_CrossOriginFail DISABLED_CrossOriginFail | |
| 29 #define MAYBE_SameOriginCookie DISABLED_SameOriginCookie | |
| 30 #define MAYBE_CORSNoCookie DISABLED_CORSNoCookie | |
| 31 #define MAYBE_SysconfNprocessorsOnln DISABLED_SysconfNprocessorsOnln | |
| 32 #else | 20 #else |
| 33 #define MAYBE_SimpleLoad SimpleLoad | |
| 34 #define MAYBE_ExitStatus0 ExitStatus0 | |
| 35 #define MAYBE_ExitStatus254 ExitStatus254 | |
| 36 #define MAYBE_ExitStatusNeg2 ExitStatusNeg2 | |
| 37 #define MAYBE_PPAPICore PPAPICore | |
| 38 #define MAYBE_ProgressEvents ProgressEvents | |
| 39 #define MAYBE_PnaclMimeType PnaclMimeType | |
| 40 #define MAYBE_CrossOriginCORS CrossOriginCORS | |
| 41 #define MAYBE_CrossOriginFail CrossOriginFail | |
| 42 #define MAYBE_SameOriginCookie SameOriginCookie | |
| 43 #define MAYBE_CORSNoCookie CORSNoCookie | |
| 44 # if defined(OS_WIN) | |
| 45 # define MAYBE_SysconfNprocessorsOnln DISABLED_SysconfNprocessorsOnln | |
| 46 # else | |
| 47 # define MAYBE_SysconfNprocessorsOnln SysconfNprocessorsOnln | 21 # define MAYBE_SysconfNprocessorsOnln SysconfNprocessorsOnln |
| 48 # endif | |
| 49 #endif | 22 #endif |
| 50 | 23 |
| 51 NACL_BROWSER_TEST_F(NaClBrowserTest, MAYBE_SimpleLoad, { | 24 NACL_BROWSER_TEST_F(NaClBrowserTest, SimpleLoad, { |
| 52 RunLoadTest(FILE_PATH_LITERAL("nacl_load_test.html")); | 25 RunLoadTest(FILE_PATH_LITERAL("nacl_load_test.html")); |
| 53 }) | 26 }) |
| 54 | 27 |
| 55 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnaclWithOldCache, | 28 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnaclWithOldCache, |
| 56 MAYBE_PNACL(SimpleLoad)) { | 29 MAYBE_PNACL(SimpleLoad)) { |
| 57 RunLoadTest(FILE_PATH_LITERAL("nacl_load_test.html")); | 30 RunLoadTest(FILE_PATH_LITERAL("nacl_load_test.html")); |
| 58 } | 31 } |
| 59 | 32 |
| 60 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnaclWithOldCache, | 33 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnaclWithOldCache, |
| 61 MAYBE_PNACL(PnaclErrorHandling)) { | 34 MAYBE_PNACL(PnaclErrorHandling)) { |
| 62 RunNaClIntegrationTest(FILE_PATH_LITERAL("pnacl_error_handling.html")); | 35 RunNaClIntegrationTest(FILE_PATH_LITERAL("pnacl_error_handling.html")); |
| 63 } | 36 } |
| 64 | 37 |
| 65 NACL_BROWSER_TEST_F(NaClBrowserTest, MAYBE_ExitStatus0, { | 38 NACL_BROWSER_TEST_F(NaClBrowserTest, ExitStatus0, { |
| 66 RunNaClIntegrationTest(FILE_PATH_LITERAL( | 39 RunNaClIntegrationTest(FILE_PATH_LITERAL( |
| 67 "pm_exit_status_test.html?trigger=exit0&expected_exit=0")); | 40 "pm_exit_status_test.html?trigger=exit0&expected_exit=0")); |
| 68 }) | 41 }) |
| 69 | 42 |
| 70 NACL_BROWSER_TEST_F(NaClBrowserTest, MAYBE_ExitStatus254, { | 43 NACL_BROWSER_TEST_F(NaClBrowserTest, ExitStatus254, { |
| 71 RunNaClIntegrationTest(FILE_PATH_LITERAL( | 44 RunNaClIntegrationTest(FILE_PATH_LITERAL( |
| 72 "pm_exit_status_test.html?trigger=exit254&expected_exit=254")); | 45 "pm_exit_status_test.html?trigger=exit254&expected_exit=254")); |
| 73 }) | 46 }) |
| 74 | 47 |
| 75 NACL_BROWSER_TEST_F(NaClBrowserTest, MAYBE_ExitStatusNeg2, { | 48 NACL_BROWSER_TEST_F(NaClBrowserTest, ExitStatusNeg2, { |
| 76 RunNaClIntegrationTest(FILE_PATH_LITERAL( | 49 RunNaClIntegrationTest(FILE_PATH_LITERAL( |
| 77 "pm_exit_status_test.html?trigger=exitneg2&expected_exit=254")); | 50 "pm_exit_status_test.html?trigger=exitneg2&expected_exit=254")); |
| 78 }) | 51 }) |
| 79 | 52 |
| 80 NACL_BROWSER_TEST_F(NaClBrowserTest, MAYBE_PPAPICore, { | 53 NACL_BROWSER_TEST_F(NaClBrowserTest, PPAPICore, { |
| 81 RunNaClIntegrationTest(FILE_PATH_LITERAL("ppapi_ppb_core.html")); | 54 RunNaClIntegrationTest(FILE_PATH_LITERAL("ppapi_ppb_core.html")); |
| 82 }) | 55 }) |
| 83 | 56 |
| 84 NACL_BROWSER_TEST_F(NaClBrowserTest, MAYBE_ProgressEvents, { | 57 NACL_BROWSER_TEST_F(NaClBrowserTest, ProgressEvents, { |
| 85 RunNaClIntegrationTest(FILE_PATH_LITERAL("ppapi_progress_events.html")); | 58 RunNaClIntegrationTest(FILE_PATH_LITERAL("ppapi_progress_events.html")); |
| 86 }) | 59 }) |
| 87 | 60 |
| 88 NACL_BROWSER_TEST_F(NaClBrowserTest, MAYBE_PnaclMimeType, { | 61 NACL_BROWSER_TEST_F(NaClBrowserTest, PnaclMimeType, { |
| 89 RunLoadTest(FILE_PATH_LITERAL("pnacl_mime_type.html")); | 62 RunLoadTest(FILE_PATH_LITERAL("pnacl_mime_type.html")); |
| 90 }) | 63 }) |
| 91 | 64 |
| 92 // Some versions of Visual Studio does not like preprocessor | 65 // Some versions of Visual Studio does not like preprocessor |
| 93 // conditionals inside the argument of a macro, so we put the | 66 // conditionals inside the argument of a macro, so we put the |
| 94 // conditionals on a helper function. We are already in an anonymous | 67 // conditionals on a helper function. We are already in an anonymous |
| 95 // namespace, so the name of the helper is not visible in external | 68 // namespace, so the name of the helper is not visible in external |
| 96 // scope. | 69 // scope. |
| 97 #if defined(OS_POSIX) | 70 #if defined(OS_POSIX) |
| 98 base::FilePath::StringType NumberOfCoresAsFilePathString() { | 71 base::FilePath::StringType NumberOfCoresAsFilePathString() { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 #endif | 110 #endif |
| 138 | 111 |
| 139 NACL_BROWSER_TEST_F(NaClBrowserTest, MAYBE_SysconfNprocessorsOnln, { | 112 NACL_BROWSER_TEST_F(NaClBrowserTest, MAYBE_SysconfNprocessorsOnln, { |
| 140 base::FilePath::StringType path = | 113 base::FilePath::StringType path = |
| 141 FILE_PATH_LITERAL("sysconf_nprocessors_onln_test.html?cpu_count="); | 114 FILE_PATH_LITERAL("sysconf_nprocessors_onln_test.html?cpu_count="); |
| 142 path = path + NumberOfCoresAsFilePathString(); | 115 path = path + NumberOfCoresAsFilePathString(); |
| 143 PathTelemetry(path); | 116 PathTelemetry(path); |
| 144 RunNaClIntegrationTest(path); | 117 RunNaClIntegrationTest(path); |
| 145 }) | 118 }) |
| 146 | 119 |
| 147 IN_PROC_BROWSER_TEST_F(NaClBrowserTestStatic, MAYBE_CrossOriginCORS) { | 120 IN_PROC_BROWSER_TEST_F(NaClBrowserTestStatic, CrossOriginCORS) { |
| 148 RunLoadTest(FILE_PATH_LITERAL("cross_origin/cors.html")); | 121 RunLoadTest(FILE_PATH_LITERAL("cross_origin/cors.html")); |
| 149 } | 122 } |
| 150 | 123 |
| 151 IN_PROC_BROWSER_TEST_F(NaClBrowserTestStatic, MAYBE_CrossOriginFail) { | 124 IN_PROC_BROWSER_TEST_F(NaClBrowserTestStatic, CrossOriginFail) { |
| 152 RunLoadTest(FILE_PATH_LITERAL("cross_origin/fail.html")); | 125 RunLoadTest(FILE_PATH_LITERAL("cross_origin/fail.html")); |
| 153 } | 126 } |
| 154 | 127 |
| 155 IN_PROC_BROWSER_TEST_F(NaClBrowserTestStatic, MAYBE_SameOriginCookie) { | 128 IN_PROC_BROWSER_TEST_F(NaClBrowserTestStatic, SameOriginCookie) { |
| 156 RunLoadTest(FILE_PATH_LITERAL("cross_origin/same_origin_cookie.html")); | 129 RunLoadTest(FILE_PATH_LITERAL("cross_origin/same_origin_cookie.html")); |
| 157 } | 130 } |
| 158 | 131 |
| 159 IN_PROC_BROWSER_TEST_F(NaClBrowserTestStatic, MAYBE_CORSNoCookie) { | 132 IN_PROC_BROWSER_TEST_F(NaClBrowserTestStatic, CORSNoCookie) { |
| 160 RunLoadTest(FILE_PATH_LITERAL("cross_origin/cors_no_cookie.html")); | 133 RunLoadTest(FILE_PATH_LITERAL("cross_origin/cors_no_cookie.html")); |
| 161 } | 134 } |
| 162 | 135 |
| 163 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl, | 136 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl, |
| 164 MAYBE_PNACL(PnaclErrorHandling)) { | 137 MAYBE_PNACL(PnaclErrorHandling)) { |
| 165 RunNaClIntegrationTest(FILE_PATH_LITERAL("pnacl_error_handling.html")); | 138 RunNaClIntegrationTest(FILE_PATH_LITERAL("pnacl_error_handling.html")); |
| 166 } | 139 } |
| 167 | 140 |
| 168 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl, | 141 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl, |
| 169 MAYBE_PNACL(PnaclNMFOptionsO0)) { | 142 MAYBE_PNACL(PnaclNMFOptionsO0)) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 186 "pnacl_dyncode_syscall_disabled.html")); | 159 "pnacl_dyncode_syscall_disabled.html")); |
| 187 } | 160 } |
| 188 | 161 |
| 189 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl, | 162 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl, |
| 190 MAYBE_PNACL(PnaclExceptionHandlingDisabled)) { | 163 MAYBE_PNACL(PnaclExceptionHandlingDisabled)) { |
| 191 RunNaClIntegrationTest(FILE_PATH_LITERAL( | 164 RunNaClIntegrationTest(FILE_PATH_LITERAL( |
| 192 "pnacl_exception_handling_disabled.html")); | 165 "pnacl_exception_handling_disabled.html")); |
| 193 } | 166 } |
| 194 | 167 |
| 195 } // namespace | 168 } // namespace |
| OLD | NEW |