dom/power/test/test_bug957893.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/power/test/test_bug957893.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,24 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <title>Test bug 957893 - Crash in WakeLock</title>
     1.8 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     1.9 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.10 +</head>
    1.11 +<body>
    1.12 + <script type="application/javascript">
    1.13 +  SimpleTest.waitForExplicitFinish();
    1.14 +  function test() {
    1.15 +    try {
    1.16 +      var wl = navigator.requestWakeLock('');
    1.17 +      ok(false, "RequestWakeLock throws an exception!");
    1.18 +    } catch(e) {
    1.19 +      ok(true, "RequestWakeLock throws an exception!");
    1.20 +    }
    1.21 +    info("Still alive!");
    1.22 +    SimpleTest.finish();
    1.23 +  }
    1.24 +  SpecialPowers.pushPrefEnv({"set": [["dom.wakelock.enabled", true]]}, test);
    1.25 + </script>
    1.26 +</body>
    1.27 +</html>

mercurial