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 "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "base/environment.h" | 15 #include "base/environment.h" |
16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
18 #include "chrome/test/nacl/nacl_browsertest_util.h" | 18 #include "chrome/test/nacl/nacl_browsertest_util.h" |
| 19 #include "components/nacl/common/nacl_switches.h" |
| 20 #include "content/public/common/content_switches.h" |
19 | 21 |
20 namespace { | 22 namespace { |
21 | 23 |
22 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
23 // crbug.com/98721 | 25 // crbug.com/98721 |
24 # define MAYBE_Crash DISABLED_Crash | 26 # define MAYBE_Crash DISABLED_Crash |
25 # define MAYBE_SysconfNprocessorsOnln DISABLED_SysconfNprocessorsOnln | 27 # define MAYBE_SysconfNprocessorsOnln DISABLED_SysconfNprocessorsOnln |
26 #else | 28 #else |
27 # define MAYBE_Crash Crash | 29 # define MAYBE_Crash Crash |
28 # define MAYBE_SysconfNprocessorsOnln SysconfNprocessorsOnln | 30 # define MAYBE_SysconfNprocessorsOnln SysconfNprocessorsOnln |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 182 } |
181 | 183 |
182 IN_PROC_BROWSER_TEST_F(NaClBrowserTestStatic, CORSNoCookie) { | 184 IN_PROC_BROWSER_TEST_F(NaClBrowserTestStatic, CORSNoCookie) { |
183 RunLoadTest(FILE_PATH_LITERAL("cross_origin/cors_no_cookie.html")); | 185 RunLoadTest(FILE_PATH_LITERAL("cross_origin/cors_no_cookie.html")); |
184 } | 186 } |
185 | 187 |
186 IN_PROC_BROWSER_TEST_F(NaClBrowserTestStatic, RelativeManifest) { | 188 IN_PROC_BROWSER_TEST_F(NaClBrowserTestStatic, RelativeManifest) { |
187 RunLoadTest(FILE_PATH_LITERAL("manifest/relative_manifest.html")); | 189 RunLoadTest(FILE_PATH_LITERAL("manifest/relative_manifest.html")); |
188 } | 190 } |
189 | 191 |
| 192 class NaClBrowserTestPnaclDebugURL : public NaClBrowserTestPnacl { |
| 193 public: |
| 194 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 195 NaClBrowserTestPnacl::SetUpCommandLine(command_line); |
| 196 // Turn on debugging to influence the PNaCl URL loaded |
| 197 command_line->AppendSwitch(switches::kEnableNaClDebug); |
| 198 // On windows, the debug stub requires --no-sandbox: |
| 199 // crbug.com/265624 |
| 200 #if defined(OS_WIN) |
| 201 command_line->AppendSwitch(switches::kNoSandbox); |
| 202 #endif |
| 203 // Don't actually debug the app though. |
| 204 command_line->AppendSwitchASCII(switches::kNaClDebugMask, |
| 205 "!<all_urls>"); |
| 206 } |
| 207 }; |
| 208 |
| 209 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnaclDebugURL, |
| 210 MAYBE_PNACL(PnaclDebugURLFlagAndURL)) { |
| 211 RunLoadTest(FILE_PATH_LITERAL( |
| 212 "pnacl_debug_url.html?nmf_file=pnacl_has_debug.nmf")); |
| 213 } |
| 214 |
| 215 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnaclDebugURL, |
| 216 MAYBE_PNACL(PnaclDebugURLFlagNoURL)) { |
| 217 RunLoadTest(FILE_PATH_LITERAL( |
| 218 "pnacl_debug_url.html?nmf_file=pnacl_no_debug.nmf")); |
| 219 } |
| 220 |
| 221 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl, |
| 222 MAYBE_PNACL(PnaclDebugURLFlagOff)) { |
| 223 RunLoadTest(FILE_PATH_LITERAL( |
| 224 "pnacl_debug_url.html?nmf_file=pnacl_has_debug_flag_off.nmf")); |
| 225 } |
| 226 |
190 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl, | 227 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl, |
191 MAYBE_PNACL(PnaclErrorHandling)) { | 228 MAYBE_PNACL(PnaclErrorHandling)) { |
192 RunNaClIntegrationTest(FILE_PATH_LITERAL("pnacl_error_handling.html")); | 229 RunNaClIntegrationTest(FILE_PATH_LITERAL("pnacl_error_handling.html")); |
193 } | 230 } |
194 | 231 |
195 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl, | 232 IN_PROC_BROWSER_TEST_F(NaClBrowserTestPnacl, |
196 MAYBE_PNACL(PnaclNMFOptionsO0)) { | 233 MAYBE_PNACL(PnaclNMFOptionsO0)) { |
197 RunLoadTest(FILE_PATH_LITERAL("pnacl_options.html?use_nmf=o_0")); | 234 RunLoadTest(FILE_PATH_LITERAL("pnacl_options.html?use_nmf=o_0")); |
198 } | 235 } |
199 | 236 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 } | 342 } |
306 }; | 343 }; |
307 | 344 |
308 // TODO(ncbray) support glibc and PNaCl | 345 // TODO(ncbray) support glibc and PNaCl |
309 IN_PROC_BROWSER_TEST_F(NaClBrowserTestNewlibExtension, MimeHandler) { | 346 IN_PROC_BROWSER_TEST_F(NaClBrowserTestNewlibExtension, MimeHandler) { |
310 RunNaClIntegrationTest(FILE_PATH_LITERAL( | 347 RunNaClIntegrationTest(FILE_PATH_LITERAL( |
311 "ppapi_extension_mime_handler.html")); | 348 "ppapi_extension_mime_handler.html")); |
312 } | 349 } |
313 | 350 |
314 } // namespace | 351 } // namespace |
OLD | NEW |