test_bug618017.html 676 B

1234567891011121314151617181920212223242526272829
  1. <!DOCTYPE html>
  2. <html>
  3. <!--
  4. https://bugzilla.mozilla.org/show_bug.cgi?id=618017
  5. Parsing XML must not override the version.
  6. -->
  7. <head>
  8. <title>Test for Bug 618017</title>
  9. <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  10. <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
  11. </head>
  12. <body>
  13. <script type='application/javascript;version=1.7'>
  14. let x = 12;
  15. function doLetEval() {
  16. ok(eval('let x = 13; x') === 13, 'let statement is valid syntax in version 1.7');
  17. }
  18. </script>
  19. <script type='application/javascript;version=1.5'>
  20. doLetEval(); // Call to a function with a different version.
  21. </script>
  22. </body>
  23. </html>