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

Side by Side Diff: test/browser/elemHideEmulation.js

Issue 29378674: Issue 4962 - Fix the tests.- Fix syntax in chrome/content/elemHideEmulation.js to use ES5Regress… (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: formatting fixes Created March 8, 2017, 12:42 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
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 Eyeo GmbH 3 * Copyright (C) 2006-2017 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 }, 122 },
123 function(selectors) 123 function(selectors)
124 { 124 {
125 if (!selectors.length) 125 if (!selectors.length)
126 return; 126 return;
127 var selector = selectors.join(", "); 127 var selector = selectors.join(", ");
128 insertStyleRule(selector + "{display: none !important;}"); 128 insertStyleRule(selector + "{display: none !important;}");
129 } 129 }
130 ); 130 );
131 131
132 elemHideEmulation.load(function() 132 elemHideEmulation.apply();
133 { 133 callback();
Wladimir Palant 2017/03/08 10:31:50 I'm undecided between simplifying the unit test (r
hub 2017/03/08 13:34:21 My take was to avoid logic changes to fix the test
Felix Dahlke 2017/03/08 20:35:49 No strong opinion, but I think we should simplify
hub 2017/03/08 20:39:48 I can make that part of bug #3143 since there will
Felix Dahlke 2017/03/08 21:44:56 Fine by me.
134 elemHideEmulation.apply();
135 callback();
136 });
137 } 134 }
138 135
139 exports.testVerbatimPropertySelector = function(test) 136 exports.testVerbatimPropertySelector = function(test)
140 { 137 {
141 var toHide = createElementWithStyle("{background-color: #000}"); 138 var toHide = createElementWithStyle("{background-color: #000}");
142 applyElemHideEmulation( 139 applyElemHideEmulation(
143 ["[-abp-properties='background-color: rgb(0, 0, 0)']"], 140 ["[-abp-properties='background-color: rgb(0, 0, 0)']"],
144 function() 141 function()
145 { 142 {
146 expectHidden(test, toHide); 143 expectHidden(test, toHide);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 expectVisible(test, toHide); 208 expectVisible(test, toHide);
212 insertStyleRule("#" + toHide.id + " {background-color: #000}"); 209 insertStyleRule("#" + toHide.id + " {background-color: #000}");
213 window.setTimeout(function() 210 window.setTimeout(function()
214 { 211 {
215 expectHidden(test, toHide); 212 expectHidden(test, toHide);
216 test.done(); 213 test.done();
217 }, 0); 214 }, 0);
218 } 215 }
219 ); 216 );
220 }; 217 };
OLDNEW
« chrome/content/elemHideEmulation.js ('K') | « chrome/content/elemHideEmulation.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld