Index: test/browser/elemHideEmulation.js |
=================================================================== |
--- a/test/browser/elemHideEmulation.js |
+++ b/test/browser/elemHideEmulation.js |
@@ -14,16 +14,17 @@ |
* You should have received a copy of the GNU General Public License |
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
*/ |
"use strict"; |
const {ElemHideEmulation, setTestMode, |
getTestInfo} = require("../../lib/content/elemHideEmulation"); |
+const {timeout} = require("./_utils"); |
const REFRESH_INTERVAL = 200; |
let testDocument = null; |
exports.setUp = function(callback) |
{ |
setTestMode(); |
@@ -39,24 +40,16 @@ |
{ |
let iframe = testDocument.defaultView.frameElement; |
iframe.parentNode.removeChild(iframe); |
testDocument = null; |
callback(); |
}; |
-function timeout(delay) |
-{ |
- return new Promise((resolve, reject) => |
- { |
- window.setTimeout(resolve, delay); |
- }); |
-} |
- |
function unexpectedError(test, error) |
{ |
console.error(error); |
test.ok(false, "Unexpected error: " + error); |
} |
function expectHidden(test, element, id) |
{ |