dom/indexedDB/test/bfcache_iframe1.html

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 <!DOCTYPE html>
     2 <html>
     3 <head>
     4   <script>
     5   var request = indexedDB.open(parent.location, 1);
     6   request.onupgradeneeded = function(e) {
     7     var db = e.target.result;
     8     // This should never be called
     9     db.onversionchange = function(e) {
    10       db.transaction(["mystore"]).objectStore("mystore").put({ hello: "fail" }, 42);
    11     }
    12     var trans = e.target.transaction;
    13     if (db.objectStoreNames.contains("mystore")) {
    14       db.deleteObjectStore("mystore");
    15     }
    16     var store = db.createObjectStore("mystore");
    17     store.add({ hello: "world" }, 42);
    18     trans.oncomplete = function() {
    19       parent.postMessage("go", "http://mochi.test:8888");
    20     }
    21   };
    22   </script>
    23 </head>
    24 <body>
    25   This is page one.
    26 </body>
    27 </html>

mercurial