| OLD | NEW |
| 1 (function() | 1 (function() |
| 2 { | 2 { |
| 3 let server = null; | 3 let server = null; |
| 4 let frame = null; | 4 let frame = null; |
| 5 | 5 |
| 6 module("Pop-up blocker", { | 6 module("Pop-up blocker", { |
| 7 setup: function() | 7 setup: function() |
| 8 { | 8 { |
| 9 prepareFilterComponents.call(this, true); | 9 prepareFilterComponents.call(this, true); |
| 10 preparePrefs.call(this); | 10 preparePrefs.call(this); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 browser.contentWindow.close(); | 98 browser.contentWindow.close(); |
| 99 }, false); | 99 }, false); |
| 100 }); | 100 }); |
| 101 } | 101 } |
| 102 | 102 |
| 103 function onTabClose(event) | 103 function onTabClose(event) |
| 104 { | 104 { |
| 105 wnd.gBrowser.tabContainer.removeEventListener("TabClose", onTabClose, fals
e); | 105 wnd.gBrowser.tabContainer.removeEventListener("TabClose", onTabClose, fals
e); |
| 106 ok(result == successful, "Opening tab with filter " + filter.text); | 106 ok(result == successful, "Opening tab with filter " + filter.text); |
| 107 var keys = []; | 107 var keys = []; |
| 108 for (key in defaultMatcher.blacklist.keywordByFilter) | 108 for (let key in defaultMatcher.blacklist.keywordByFilter) |
| 109 keys.push(key); | 109 keys.push(key); |
| 110 | 110 |
| 111 FilterStorage.removeFilter(filter); | 111 FilterStorage.removeFilter(filter); |
| 112 start(); | 112 start(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 wnd.gBrowser.tabContainer.addEventListener("TabOpen", onTabOpen, false); | 115 wnd.gBrowser.tabContainer.addEventListener("TabOpen", onTabOpen, false); |
| 116 wnd.gBrowser.tabContainer.addEventListener("TabClose", onTabClose, false); | 116 wnd.gBrowser.tabContainer.addEventListener("TabClose", onTabClose, false); |
| 117 let timeout = window.setTimeout(onTabClose, 1000); // In case the tab isn
't opened | 117 let timeout = window.setTimeout(onTabClose, 1000); // In case the tab isn
't opened |
| 118 | 118 |
| 119 frame.contentDocument.getElementById("link").click(); | 119 frame.contentDocument.getElementById("link").click(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 for (let [filter, result] of tests) | 122 for (let [filter, result] of tests) |
| 123 asyncTest(filter, runTest.bind(null, Filter.fromText(filter), result)); | 123 asyncTest(filter, runTest.bind(null, Filter.fromText(filter), result)); |
| 124 })(); | 124 })(); |
| OLD | NEW |