diff options
Diffstat (limited to 'js/xpconnect/tests/mochitest/test_bug618017.html')
-rw-r--r-- | js/xpconnect/tests/mochitest/test_bug618017.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/js/xpconnect/tests/mochitest/test_bug618017.html b/js/xpconnect/tests/mochitest/test_bug618017.html new file mode 100644 index 000000000..c5b815e8d --- /dev/null +++ b/js/xpconnect/tests/mochitest/test_bug618017.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=618017 + +Parsing XML must not override the version. +--> +<head> + <title>Test for Bug 618017</title> + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> +</head> +<body> + +<script type='application/javascript;version=1.7'> +let x = 12; +function doLetEval() { + ok(eval('let x = 13; x') === 13, 'let statement is valid syntax in version 1.7'); +} +</script> + +<script type='application/javascript;version=1.5'> +doLetEval(); // Call to a function with a different version. +</script> + +</body> +</html> + |