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 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | |
michael@0 | 3 | /* |
michael@0 | 4 | * Any copyright is dedicated to the Public Domain. |
michael@0 | 5 | * http://creativecommons.org/licenses/publicdomain/ |
michael@0 | 6 | */ |
michael@0 | 7 | |
michael@0 | 8 | assertEq(testLenientAndStrict('var r = /foo/; r.source = "bar"; r.source', |
michael@0 | 9 | returns("foo"), raisesException(TypeError)), |
michael@0 | 10 | true); |
michael@0 | 11 | assertEq(testLenientAndStrict('var r = /foo/; delete r.source', |
michael@0 | 12 | returns(false), raisesException(TypeError)), |
michael@0 | 13 | true); |
michael@0 | 14 | |
michael@0 | 15 | assertEq(testLenientAndStrict('var r = /foo/; r.global = true; r.global', |
michael@0 | 16 | returns(false), raisesException(TypeError)), |
michael@0 | 17 | true); |
michael@0 | 18 | assertEq(testLenientAndStrict('var r = /foo/; delete r.global', |
michael@0 | 19 | returns(false), raisesException(TypeError)), |
michael@0 | 20 | true); |
michael@0 | 21 | |
michael@0 | 22 | assertEq(testLenientAndStrict('var r = /foo/; r.ignoreCase = true; r.ignoreCase', |
michael@0 | 23 | returns(false), raisesException(TypeError)), |
michael@0 | 24 | true); |
michael@0 | 25 | assertEq(testLenientAndStrict('var r = /foo/; delete r.ignoreCase', |
michael@0 | 26 | returns(false), raisesException(TypeError)), |
michael@0 | 27 | true); |
michael@0 | 28 | |
michael@0 | 29 | assertEq(testLenientAndStrict('var r = /foo/; r.multiline = true; r.multiline', |
michael@0 | 30 | returns(false), raisesException(TypeError)), |
michael@0 | 31 | true); |
michael@0 | 32 | assertEq(testLenientAndStrict('var r = /foo/; delete r.multiline', |
michael@0 | 33 | returns(false), raisesException(TypeError)), |
michael@0 | 34 | true); |
michael@0 | 35 | |
michael@0 | 36 | assertEq(testLenientAndStrict('var r = /foo/; r.lastIndex = 42; r.lastIndex', |
michael@0 | 37 | returns(42), returns(42)), |
michael@0 | 38 | true); |
michael@0 | 39 | assertEq(testLenientAndStrict('var r = /foo/; delete r.lastIndex', |
michael@0 | 40 | returns(false), raisesException(TypeError)), |
michael@0 | 41 | true); |
michael@0 | 42 | |
michael@0 | 43 | reportCompare(true, true); |