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

Delta Between Two Patch Sets: chrome/content/tests/popupBlocker.js

Issue 29331996: Issue 3244 - Pop-up blocker unit tests broken in E10S mode (Closed)
Left Patch Set: Issue 3244 - Pop-up blocker unit tests broken in E10S mode Created Dec. 29, 2015, 10:51 p.m.
Right Patch Set: Issue 3244 - Pop-up blocker unit tests broken in E10S mode Created Feb. 4, 2016, 11:29 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « chrome/content/common.js ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 (function() 1 (function()
2 { 2 {
3 let tabs = SDK.require("sdk/tabs"); 3 let tabs = SDK.require("sdk/tabs");
4 let modelFor = SDK.require("sdk/model/core").modelFor;
Wladimir Palant 2016/01/06 12:54:36 So, do you want to remove this? ;)
5 let server = null; 4 let server = null;
6 let tab = null; 5 let tab = null;
7 6
8 module("Pop-up blocker", { 7 module("Pop-up blocker", {
9 beforeEach: function() 8 beforeEach: function()
10 { 9 {
11 prepareFilterComponents.call(this, true); 10 prepareFilterComponents.call(this, true);
12 preparePrefs.call(this); 11 preparePrefs.call(this);
13 12
14 server = new nsHttpServer(); 13 server = new nsHttpServer();
(...skipping 27 matching lines...) Expand all
42 let body = '<html><body>OK</body></html>'; 41 let body = '<html><body>OK</body></html>';
43 response.bodyOutputStream.write(body, body.length); 42 response.bodyOutputStream.write(body, body.length);
44 }); 43 });
45 44
46 tabs.open({ 45 tabs.open({
47 url: "http://127.0.0.1:1234/test", 46 url: "http://127.0.0.1:1234/test",
48 inBackground: false, 47 inBackground: false,
49 onReady: function(aTab) 48 onReady: function(aTab)
50 { 49 {
51 tab = aTab; 50 tab = aTab;
52 var worker = tab.attach({ 51 start();
53 contentScript: "(" + function()
54 {
55 if (document.getElementById("link"))
56 self.port.emit("done");
57 } + ")()"
58 });
Wladimir Palant 2016/01/06 12:54:36 As mentioned before, I don't think that clicking t
59
60 worker.port.once("done", start)
Wladimir Palant 2016/01/06 12:54:36 Nit: Missing semicolon here.
61 } 52 }
62 }); 53 });
63 54
64 stop(); 55 stop();
65 }, 56 },
66 afterEach: function() 57 afterEach: function()
67 { 58 {
68 restoreFilterComponents.call(this); 59 restoreFilterComponents.call(this);
69 restorePrefs.call(this); 60 restorePrefs.call(this);
70 61
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 contentScript: "(" + function() 134 contentScript: "(" + function()
144 { 135 {
145 document.getElementById('link').click(); 136 document.getElementById('link').click();
146 } + ")()" 137 } + ")()"
147 }); 138 });
148 } 139 }
149 140
150 for (let [filter, result] of tests) 141 for (let [filter, result] of tests)
151 asyncTest(filter, runTest.bind(null, Filter.fromText(filter), result)); 142 asyncTest(filter, runTest.bind(null, Filter.fromText(filter), result));
152 })(); 143 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld