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.
1 // Any copyright is dedicated to the Public Domain.
2 // http://creativecommons.org/licenses/publicdomain/
4 // Test off-thread parsing.
6 load(libdir + 'asserts.js');
8 if (workerThreadCount() === 0)
9 quit(0);
11 offThreadCompileScript('Math.sin(Math.PI/2)');
12 assertEq(runOffThreadScript(), 1);
14 offThreadCompileScript('a string which cannot be reduced to the start symbol');
15 assertThrowsInstanceOf(runOffThreadScript, SyntaxError);
17 offThreadCompileScript('smerg;');
18 assertThrowsInstanceOf(runOffThreadScript, ReferenceError);
20 offThreadCompileScript('throw "blerg";');
21 assertThrowsValue(runOffThreadScript, 'blerg');