Sat, 03 Jan 2015 20:18:00 +0100
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 /**
2 * Any copyright is dedicated to the Public Domain.
3 * http://creativecommons.org/publicdomain/zero/1.0/
4 */
6 var testGenerator = testSteps();
8 function testSteps()
9 {
10 const name = this.window ? window.location.pathname : "Splendid Test";
12 let request = indexedDB.open(name, 1);
13 request.onerror = errorHandler;
14 request.onupgradeneeded = grabEventAndContinueHandler;
15 let event = yield undefined;
17 let db = request.result;
19 ok(event.target === request, "Good event target");
21 let objectStore = db.createObjectStore("foo", { keyPath: null });
22 let key = 10;
24 request = objectStore.add({}, key);
25 request.onerror = errorHandler;
26 request.onsuccess = grabEventAndContinueHandler;
27 event = yield undefined;
29 is(request.result, key, "Correct key");
31 request = objectStore.add({}, key);
32 request.addEventListener("error", new ExpectError("ConstraintError", true));
33 request.onsuccess = unexpectedSuccessHandler;
34 yield undefined;
36 finishTest();
37 yield undefined;
38 }