Bug 957899 - WakeLock should QI nsISupports, r=bz

This commit is contained in:
Andrea Marchesini 2014-01-09 15:20:25 +01:00
parent 7638e4f3eb
commit 866b6b0d13
3 changed files with 17 additions and 0 deletions

View File

@ -25,6 +25,7 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(WakeLock)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(WakeLock)
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMEventListener)
NS_INTERFACE_MAP_ENTRY(nsIDOMEventListener)
NS_INTERFACE_MAP_ENTRY(nsIObserver)
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)

View File

@ -1,5 +1,6 @@
[DEFAULT]
[test_bug957899.html]
[test_power_basics.html]
[test_power_set_cpusleepallowed.html]
[test_power_set_screen_brightness.html]

View File

@ -0,0 +1,15 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test bug 957899 - Crash in WakeLock</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
</head>
<body>
<script type="application/javascript">
var wl = navigator.requestWakeLock('a');
ok(wl, "WakeLock created!");
ok(!(wl instanceof XPathEvaluator), "Crashing?");
</script>
</body>
</html>