1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/xpconnect/tests/mochitest/test_bug618017.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,28 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=618017 1.8 + 1.9 +Parsing XML must not override the version. 1.10 +--> 1.11 +<head> 1.12 + <title>Test for Bug 618017</title> 1.13 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.14 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.15 +</head> 1.16 +<body> 1.17 + 1.18 +<script type='application/javascript;version=1.7'> 1.19 +let x = 12; 1.20 +function doLetEval() { 1.21 + ok(eval('let x = 13; x') === 13, 'let statement is valid syntax in version 1.7'); 1.22 +} 1.23 +</script> 1.24 + 1.25 +<script type='application/javascript;version=1.5'> 1.26 +doLetEval(); // Call to a function with a different version. 1.27 +</script> 1.28 + 1.29 +</body> 1.30 +</html> 1.31 +