js/src/jit-test/tests/basic/test-jitinfo.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 // Test for the shell's FakeDOMObject constructor. This test
     2 // ensures the fuzzers know about this object.
     3 function f() {
     4     var res = 0;
     5     var d = new FakeDOMObject();
     6     assertEq(d !== new FakeDOMObject(), true);
     8     for (var i=0; i<100; i++) {
     9 	var x = d.x;
    10 	assertEq(typeof x, "number");
    12 	d.x = 10;
    13 	d.x = undefined;
    15 	d.x = FakeDOMObject.prototype.x;
    16 	FakeDOMObject.prototype.x = d.x;
    17 	FakeDOMObject.prototype.doFoo();
    19 	assertEq(d.doFoo(), 0);
    20 	assertEq(d.doFoo(1), 1);
    21 	assertEq(d.doFoo(1, 2), 2);
    22     }
    23 }
    24 f();

mercurial