dom/indexedDB/test/test_globalObjects_content.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/indexedDB/test/test_globalObjects_content.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,38 @@
     1.4 +<!--
     1.5 +  Any copyright is dedicated to the Public Domain.
     1.6 +  http://creativecommons.org/publicdomain/zero/1.0/
     1.7 +-->
     1.8 +<html>
     1.9 +<head>
    1.10 +  <title>Indexed Database Property Test</title>
    1.11 +
    1.12 +  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.13 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.14 +
    1.15 +  <script type="text/javascript;version=1.7">
    1.16 +  function testSteps()
    1.17 +  {
    1.18 +    const name = window.location.pathname;
    1.19 +
    1.20 +    // Test for IDBKeyRange and indexedDB availability in content windows.
    1.21 +    let keyRange = IDBKeyRange.only(42);
    1.22 +    ok(keyRange, "Got keyRange");
    1.23 +
    1.24 +    let request = indexedDB.open(name, 1);
    1.25 +    request.onerror = errorHandler;
    1.26 +    request.onsuccess = grabEventAndContinueHandler;
    1.27 +    let event = yield undefined;
    1.28 +
    1.29 +    let db = event.target.result;
    1.30 +    ok(db, "Got database");
    1.31 +
    1.32 +    finishTest();
    1.33 +    yield undefined;
    1.34 +  }
    1.35 +  </script>
    1.36 +  <script type="text/javascript;version=1.7" src="helpers.js"></script>
    1.37 +</head>
    1.38 +
    1.39 +<body onload="runTest();"></body>
    1.40 +
    1.41 +</html>

mercurial