summaryrefslogtreecommitdiffstats
path: root/toolkit/components/passwordmgr/test/chrome_timeout.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/components/passwordmgr/test/chrome_timeout.js')
-rw-r--r--toolkit/components/passwordmgr/test/chrome_timeout.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/toolkit/components/passwordmgr/test/chrome_timeout.js b/toolkit/components/passwordmgr/test/chrome_timeout.js
new file mode 100644
index 000000000..9049d0bea
--- /dev/null
+++ b/toolkit/components/passwordmgr/test/chrome_timeout.js
@@ -0,0 +1,11 @@
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+
+addMessageListener('setTimeout', msg => {
+ let timer = Cc['@mozilla.org/timer;1'].createInstance(Ci.nsITimer);
+ timer.init(_ => {
+ sendAsyncMessage('timeout');
+ }, msg.delay, Ci.nsITimer.TYPE_ONE_SHOT);
+});
+
+sendAsyncMessage('ready');