OLD | NEW |
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 Loading... |
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(); |
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 Loading... |
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 }; |
OLD | NEW |