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 | <!-- |
michael@0 | 2 | Any copyright is dedicated to the Public Domain. |
michael@0 | 3 | http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 4 | --> |
michael@0 | 5 | <html> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Indexed Database Property Test</title> |
michael@0 | 8 | |
michael@0 | 9 | <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 10 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 11 | |
michael@0 | 12 | <script type="text/javascript;version=1.7"> |
michael@0 | 13 | function testSteps() |
michael@0 | 14 | { |
michael@0 | 15 | const name = window.location.pathname; |
michael@0 | 16 | |
michael@0 | 17 | let request = indexedDB.open(name, 1); |
michael@0 | 18 | request.onerror = errorHandler; |
michael@0 | 19 | request.onsuccess = grabEventAndContinueHandler; |
michael@0 | 20 | let event = yield undefined; |
michael@0 | 21 | |
michael@0 | 22 | let db = event.target.result; |
michael@0 | 23 | db.onerror = errorHandler; |
michael@0 | 24 | |
michael@0 | 25 | if (SpecialPowers.isMainProcess()) { |
michael@0 | 26 | request = db.mozCreateFileHandle("random.bin", "binary/random"); |
michael@0 | 27 | request.onsuccess = grabEventAndContinueHandler; |
michael@0 | 28 | event = yield undefined; |
michael@0 | 29 | |
michael@0 | 30 | let fileHandle = event.target.result; |
michael@0 | 31 | ok(fileHandle, "Got filehandle"); |
michael@0 | 32 | } |
michael@0 | 33 | else { |
michael@0 | 34 | try { |
michael@0 | 35 | db.mozCreateFileHandle("random.bin", "binary/random"); |
michael@0 | 36 | ok(false, "Should have thrown!"); |
michael@0 | 37 | } |
michael@0 | 38 | catch (ex) { |
michael@0 | 39 | ok(true, "MozCreateFileHandle threw"); |
michael@0 | 40 | } |
michael@0 | 41 | } |
michael@0 | 42 | |
michael@0 | 43 | finishTest(); |
michael@0 | 44 | yield undefined; |
michael@0 | 45 | } |
michael@0 | 46 | </script> |
michael@0 | 47 | <script type="text/javascript;version=1.7" src="helpers.js"></script> |
michael@0 | 48 | |
michael@0 | 49 | </head> |
michael@0 | 50 | |
michael@0 | 51 | <body onload="runTest();"></body> |
michael@0 | 52 | |
michael@0 | 53 | </html> |