| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| </head> |
| <body> |
| <script> |
| test(function() { |
| description('Test that trying to create a URLPattern with a very large input string will not crash.'); |
| const largeSize = 500_000_000; |
| const largeString = "\u0000".repeat(largeSize); |
| |
| assert_throws_js(TypeError, function() { |
| debug("Attemping to set large string as input to URLPattern..."); |
| let urlPattern = new URLPattern(largeString); |
| }); |
| }); |
| |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |
| </html> |