Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: chrome/content/tests/popupBlocker.js

Issue 6309214725079040: Issue 1409 - Fix some errors in adblockplustest (Closed)
Patch Set: Created Sept. 19, 2014, 10:35 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/content/tests/matcher.js ('k') | chrome/content/tests/synchronizer.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 })();
OLDNEW
« no previous file with comments | « chrome/content/tests/matcher.js ('k') | chrome/content/tests/synchronizer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld