mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 02:17:34 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
60
netwerk/wifi/tests/wifi_access_point_test.html
Normal file
60
netwerk/wifi/tests/wifi_access_point_test.html
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>hi</title>
|
||||
<script>
|
||||
|
||||
var count = 0;
|
||||
|
||||
|
||||
function test() {
|
||||
}
|
||||
|
||||
test.prototype =
|
||||
{
|
||||
onChange: function (accessPoints)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
|
||||
var d = document.getElementById("d");
|
||||
d.innerHTML = "";
|
||||
|
||||
for (var i=0; i<accessPoints.length; i++) {
|
||||
var a = accessPoints[i];
|
||||
d.innerHTML = d.innerHTML + "<p>" + a.mac + " " + a.ssid + " " + a.signal + "</p>";
|
||||
}
|
||||
|
||||
var c = document.getElementById("c");
|
||||
c.innerHTML = "<p>" + count++ + "</p>";
|
||||
|
||||
},
|
||||
|
||||
onError: function (value) {
|
||||
alert("error: " +value);
|
||||
},
|
||||
|
||||
QueryInterface: function(iid) {
|
||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
|
||||
if (iid.equals(Components.interfaces.nsIWifiListener) ||
|
||||
iid.equals(Components.interfaces.nsISupports))
|
||||
return this;
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
|
||||
|
||||
var listener = new test();
|
||||
var wifi_service = Components.classes["@mozilla.org/wifi/monitor;1"].getService(Components.interfaces.nsIWifiMonitor);
|
||||
|
||||
wifi_service.startWatching(listener);
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="d"><p></p></div>
|
||||
<div id="c"><p></p></div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue