From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../webkit/PerformanceTests/six-speed/tests/defaults.es5 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 third_party/webkit/PerformanceTests/six-speed/tests/defaults.es5 (limited to 'third_party/webkit/PerformanceTests/six-speed/tests/defaults.es5') diff --git a/third_party/webkit/PerformanceTests/six-speed/tests/defaults.es5 b/third_party/webkit/PerformanceTests/six-speed/tests/defaults.es5 new file mode 100644 index 0000000000..eec3f0d2e7 --- /dev/null +++ b/third_party/webkit/PerformanceTests/six-speed/tests/defaults.es5 @@ -0,0 +1,14 @@ +function fn(arg, other) { + arg = arg === undefined ? 1 : arg; + other = other === undefined ? 3 : other; + return other; +} + +assertEqual(fn(), 3); +assertEqual(fn(1, 2), 2); + +test(function() { + fn(); + fn(2); + fn(2, 4); +}); -- cgit v1.2.3