Skip to content
Snippets Groups Projects
Commit 457fe6c0 authored by Jed Parsons's avatar Jed Parsons
Browse files

replaced setTimeout with event subscription/handler

parent 0264fc78
No related branches found
No related tags found
No related merge requests found
......@@ -3,11 +3,11 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
(function() {
"use strict";
var bid = BrowserID,
errorDisplay = bid.ErrorDisplay;
var bid = BrowserID;
module("shared/error-display", {
setup: function() {
......@@ -18,17 +18,20 @@
}
});
asyncTest("can initialize and open the error display", function() {
asyncTest("can initialize and open the error display", function openErrorDisplay() {
bid.DOM.bindEvent(window, "resize", resized_once);
$("#error").show();
bid.ErrorDisplay.start("#error");
bid.ErrorDisplay.open();
setTimeout(function() {
function resized_once(event) {
bid.DOM.unbindEvent(window, "resize", resized_once);
ok($("#moreInfo").is(":visible"), "expanded info is visible");
start();
}, 100);
});
}
});
}());
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment