summaryrefslogtreecommitdiff
path: root/browser/base/content/test/head_plain.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/base/content/test/head_plain.js')
-rw-r--r--browser/base/content/test/head_plain.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/browser/base/content/test/head_plain.js b/browser/base/content/test/head_plain.js
new file mode 100644
index 000000000..62f9afb2e
--- /dev/null
+++ b/browser/base/content/test/head_plain.js
@@ -0,0 +1,15 @@
+
+function waitForCondition(condition, nextTest, errorMsg) {
+ var tries = 0;
+ var interval = setInterval(function() {
+ if (tries >= 30) {
+ ok(false, errorMsg);
+ moveOn();
+ }
+ if (condition()) {
+ moveOn();
+ }
+ tries++;
+ }, 100);
+ var moveOn = function() { clearInterval(interval); nextTest(); };
+}