Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | // Copyright 2009 the Sputnik authors. All rights reserved. |
michael@0 | 2 | // This code is governed by the BSD license found in the LICENSE file. |
michael@0 | 3 | |
michael@0 | 4 | /** |
michael@0 | 5 | * HORIZONTAL TAB (U+0009) between any two tokens is allowed |
michael@0 | 6 | * |
michael@0 | 7 | * @path ch07/7.2/S7.2_A1.1_T1.js |
michael@0 | 8 | * @description Insert HORIZONTAL TAB(\u0009 and \t) between tokens of var x=1 |
michael@0 | 9 | */ |
michael@0 | 10 | |
michael@0 | 11 | // CHECK#1 |
michael@0 | 12 | eval("\u0009var\u0009x\u0009=\u00091\u0009"); |
michael@0 | 13 | if (x !== 1) { |
michael@0 | 14 | $ERROR('#1: eval("\\u0009var\\u0009x\\u0009=\\u00091\\u0009"); x === 1. Actual: ' + (x)); |
michael@0 | 15 | } |
michael@0 | 16 | |
michael@0 | 17 | //CHECK#2 |
michael@0 | 18 | eval("\u0009" + "var" + "\u0009" + "x" + "\u0009" + "=" + "\u0009" + "1" + "\u0009"); |
michael@0 | 19 | if (x !== 1) { |
michael@0 | 20 | $ERROR('#2: eval("\\u0009" + "var" + "\\u0009" + "x" + "\\u0009" + "=" + "\\u0009" + "1" + "\\u0009"); x === 1. Actual: ' + (x)); |
michael@0 | 21 | } |
michael@0 | 22 | |
michael@0 | 23 | //CHECK#3 |
michael@0 | 24 | eval("\tvar\tx\t=\t1\t"); |
michael@0 | 25 | if (x !== 1) { |
michael@0 | 26 | $ERROR('#3: eval("\\tvar\\tx\\t=\\t1\\t"); x === 1. Actual: ' + (x)); |
michael@0 | 27 | } |
michael@0 | 28 | |
michael@0 | 29 | //CHECK#4 |
michael@0 | 30 | eval("\t" + "var" + "\t" + "x" + "\t" + "=" + "\t" + "1" + "\t"); |
michael@0 | 31 | if (x !== 1) { |
michael@0 | 32 | $ERROR('#4: eval("\\t" + "var" + "\\t" + "x" + "\\t" + "=" + "\\t" + "1" + "\\t"); x === 1. Actual: ' + (x)); |
michael@0 | 33 | } |
michael@0 | 34 | |
michael@0 | 35 | //CHECK#5 |
michael@0 | 36 | eval("\u0009" + "var" + "\t" + "x" + "\u0009" + "=" + "\t" + "1" + "\u0009"); |
michael@0 | 37 | if (x !== 1) { |
michael@0 | 38 | $ERROR('#5: eval("\\u0009" + "var" + "\\t" + "x" + "\\u0009" + "=" + "\\t" + "1" + "\\u0009"); x === 1. Actual: ' + (x)); |
michael@0 | 39 | } |
michael@0 | 40 |