summaryrefslogtreecommitdiffstats
path: root/netwerk/wifi/tests/wifi_access_point_test.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /netwerk/wifi/tests/wifi_access_point_test.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'netwerk/wifi/tests/wifi_access_point_test.html')
-rw-r--r--netwerk/wifi/tests/wifi_access_point_test.html60
1 files changed, 60 insertions, 0 deletions
diff --git a/netwerk/wifi/tests/wifi_access_point_test.html b/netwerk/wifi/tests/wifi_access_point_test.html
new file mode 100644
index 000000000..974a6be15
--- /dev/null
+++ b/netwerk/wifi/tests/wifi_access_point_test.html
@@ -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>