Skip to content

Commit 75abb80

Browse files
committed
Merge pull request tiff#1 from packagethief/master
Update calls to stop(), which now takes an increment, not a timeout value
2 parents 64b77bc + 9fa1e18 commit 75abb80

10 files changed

+30
-60
lines changed

test/dom/copy_attributes_test.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ test("Basic Tests", function() {
2626
});
2727

2828

29-
test("Test copying attributes from one element to another element which is in an iframe", function() {
29+
asyncTest("Test copying attributes from one element to another element which is in an iframe", function() {
3030
expect(1);
31-
stop(2000);
3231

3332
var that = this;
3433

test/dom/copy_styles_test.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,8 @@ test("Advanced tests", function() {
6969
});
7070

7171

72-
test("Test copying styles from one element to another element which is in an iframe", function() {
72+
asyncTest("Test copying styles from one element to another element which is in an iframe", function() {
7373
expect(1);
74-
stop(2000);
7574

7675
var that = this;
7776

test/dom/get_as_dom_test.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ test("HTML5 elements", function() {
3838
});
3939

4040

41-
test("Different document context", function() {
41+
asyncTest("Different document context", function() {
4242
expect(2);
43-
stop(5000);
4443

4544
new wysihtml5.dom.Sandbox(function(sandbox) {
4645
var result;

test/dom/has_element_with_class_name_test.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ if ("querySelector" in document || wysihtml5.browser.supportsNativeGetElementsBy
99
});
1010

1111

12-
test("Basic test", function() {
13-
stop(4000);
12+
asyncTest("Basic test", function() {
1413
expect(3);
1514

1615
new wysihtml5.dom.Sandbox(function(sandbox) {

test/dom/has_element_with_tag_name_test.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ module("wysihtml5.dom.hasElementWithTagName", {
88
});
99

1010

11-
test("Basic test", function() {
12-
stop(4000);
11+
asyncTest("Basic test", function() {
1312
expect(3);
1413

1514
new wysihtml5.dom.Sandbox(function(sandbox) {

test/dom/insert_css_test.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ module("wysihtml5.dom.insertCSS", {
77
}
88
});
99

10-
test("Basic Tests with IE=Edge", function() {
10+
asyncTest("Basic Tests with IE=Edge", function() {
1111
expect(3);
12-
stop();
1312

1413
new wysihtml5.dom.Sandbox(function(sandbox) {
1514
var doc = sandbox.getDocument(),
@@ -31,9 +30,8 @@ test("Basic Tests with IE=Edge", function() {
3130
}, { uaCompatible: "IE=Edge" }).insertInto(document.body);
3231
});
3332

34-
test("Basic Tests with IE=7", function() {
33+
asyncTest("Basic Tests with IE=7", function() {
3534
expect(3);
36-
stop();
3735

3836
new wysihtml5.dom.Sandbox(function(sandbox) {
3937
var doc = sandbox.getDocument(),

test/dom/observe_test.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@ test("Test detaching events", function() {
6363
QUnit.triggerEvent(this.element, "click");
6464
});
6565

66-
test("Advanced test observing within a sandboxed iframe", function() {
66+
asyncTest("Advanced test observing within a sandboxed iframe", function() {
6767
expect(2);
68-
stop(2000);
6968

7069
var sandbox = new wysihtml5.dom.Sandbox(function() {
7170
var element = sandbox.getDocument().createElement("div");

test/dom/sandbox_test.js

+8-16
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ module("wysihtml5.dom.Sandbox", {
2929
});
3030

3131

32-
test("Basic Test", function() {
32+
asyncTest("Basic Test", function() {
3333
expect(8);
34-
stop(5000);
3534

3635
var sandbox = new wysihtml5.dom.Sandbox(function(param) {
3736
equals(param, sandbox, "The parameter passed into the readyCallback is the sandbox instance");
@@ -62,9 +61,8 @@ test("Basic Test", function() {
6261
});
6362

6463

65-
test("Security test #1", function() {
64+
asyncTest("Security test #1", function() {
6665
expect(14);
67-
stop(5000);
6866

6967
var that = this;
7068

@@ -101,9 +99,8 @@ test("Security test #1", function() {
10199
});
102100

103101

104-
test("Security test #2", function() {
102+
asyncTest("Security test #2", function() {
105103
expect(2);
106-
stop(5000);
107104

108105
var sandbox = new wysihtml5.dom.Sandbox(function() {
109106
var html = '<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" onerror="#{script}" onload="try { window.parent._hackedCookie=document.cookie; } catch(e){}; try { window.parent._hackedVariable=1; } catch(e) {}">';
@@ -121,9 +118,8 @@ test("Security test #2", function() {
121118
});
122119

123120

124-
test("Check charset & doctype", function() {
121+
asyncTest("Check charset & doctype", function() {
125122
expect(3);
126-
stop(5000);
127123

128124
var that = this;
129125

@@ -146,8 +142,7 @@ test("Check charset & doctype", function() {
146142
});
147143

148144

149-
test("Check insertion of single stylesheet", function() {
150-
stop(5000);
145+
asyncTest("Check insertion of single stylesheet", function() {
151146
expect(1);
152147

153148
new wysihtml5.dom.Sandbox(function(sandbox) {
@@ -160,8 +155,7 @@ test("Check insertion of single stylesheet", function() {
160155
});
161156

162157

163-
test("Check insertion of multiple stylesheets", function() {
164-
stop(5000);
158+
asyncTest("Check insertion of multiple stylesheets", function() {
165159
expect(1);
166160

167161
new wysihtml5.dom.Sandbox(function(sandbox) {
@@ -177,8 +171,7 @@ test("Check insertion of multiple stylesheets", function() {
177171
});
178172

179173

180-
test("Check X-UA-Compatible meta tag #1", function() {
181-
stop(5000);
174+
asyncTest("Check X-UA-Compatible meta tag #1", function() {
182175
expect(2);
183176

184177
new wysihtml5.dom.Sandbox(function(sandbox) {
@@ -193,8 +186,7 @@ test("Check X-UA-Compatible meta tag #1", function() {
193186
});
194187

195188

196-
test("Check X-UA-Compatible meta tag #2", function() {
197-
stop(5000);
189+
asyncTest("Check X-UA-Compatible meta tag #2", function() {
198190
expect(3);
199191

200192
new wysihtml5.dom.Sandbox(function(sandbox) {

test/editor_test.js

+13-26
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ if (wysihtml5.browser.supported()) {
3939
}
4040
});
4141

42-
test("Basic test", function() {
42+
asyncTest("Basic test", function() {
4343
expect(16);
44-
stop(2000);
4544

4645
var that = this;
4746

@@ -82,9 +81,8 @@ if (wysihtml5.browser.supported()) {
8281
});
8382

8483

85-
test("Check setting of name as class name on iframe and iframe's body", function() {
84+
asyncTest("Check setting of name as class name on iframe and iframe's body", function() {
8685
expect(4);
87-
stop(2000);
8886

8987
this.textareaElement.className = "death-star";
9088

@@ -105,9 +103,8 @@ if (wysihtml5.browser.supported()) {
105103
});
106104

107105

108-
test("Check textarea with box-sizing: border-box;", function() {
106+
asyncTest("Check textarea with box-sizing: border-box;", function() {
109107
expect(1);
110-
stop(2000);
111108

112109
var that = this;
113110

@@ -134,9 +131,8 @@ if (wysihtml5.browser.supported()) {
134131
});
135132

136133

137-
test("Check whether attributes are copied", function() {
134+
asyncTest("Check whether attributes are copied", function() {
138135
expect(1);
139-
stop(2000);
140136

141137
var that = this;
142138

@@ -148,9 +144,8 @@ if (wysihtml5.browser.supported()) {
148144
});
149145

150146

151-
test("Check events", function() {
147+
asyncTest("Check events", function() {
152148
expect(8);
153-
stop(2000);
154149

155150
var that = this;
156151

@@ -206,9 +201,8 @@ if (wysihtml5.browser.supported()) {
206201
});
207202

208203

209-
test("Check sync (basic)", function() {
204+
asyncTest("Check sync (basic)", function() {
210205
expect(1);
211-
stop(2500);
212206

213207
var that = this;
214208

@@ -225,9 +219,8 @@ if (wysihtml5.browser.supported()) {
225219
});
226220

227221

228-
test("Check sync (advanced)", function() {
222+
asyncTest("Check sync (advanced)", function() {
229223
expect(5);
230-
stop(4000);
231224

232225
var that = this;
233226

@@ -272,9 +265,8 @@ if (wysihtml5.browser.supported()) {
272265
});
273266

274267

275-
test("Check placeholder", function() {
268+
asyncTest("Check placeholder", function() {
276269
expect(13);
277-
stop(3000);
278270

279271
var that = this;
280272

@@ -322,9 +314,8 @@ if (wysihtml5.browser.supported()) {
322314
});
323315

324316

325-
test("Check public api", function() {
317+
asyncTest("Check public api", function() {
326318
expect(14);
327-
stop(2000);
328319

329320
var that = this;
330321

@@ -372,9 +363,8 @@ if (wysihtml5.browser.supported()) {
372363
});
373364

374365

375-
test("Parser (default parser method with parserRules as object", function() {
366+
asyncTest("Parser (default parser method with parserRules as object", function() {
376367
expect(2);
377-
stop(3000);
378368

379369
var parserRules = {
380370
tags: {
@@ -402,9 +392,8 @@ if (wysihtml5.browser.supported()) {
402392
});
403393

404394

405-
test("Parser (custom parser method with parserRules as object", function() {
395+
asyncTest("Parser (custom parser method with parserRules as object", function() {
406396
expect(7);
407-
stop(3000);
408397

409398
var that = this,
410399
parserRules = { script: undefined },
@@ -434,9 +423,8 @@ if (wysihtml5.browser.supported()) {
434423
});
435424

436425

437-
test("Inserting an element which causes the textContent/innerText of the contentEditable element to be empty works correctly", function() {
426+
asyncTest("Inserting an element which causes the textContent/innerText of the contentEditable element to be empty works correctly", function() {
438427
expect(2);
439-
stop(2000);
440428

441429
var that = this;
442430

@@ -462,8 +450,7 @@ if (wysihtml5.browser.supported()) {
462450
});
463451

464452

465-
test("Check for stylesheets", function() {
466-
stop(2000);
453+
asyncTest("Check for stylesheets", function() {
467454
expect(5);
468455

469456
var that = this;

test/incompatible_test.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ module("wysihtml5 - Incompatible", {
1414
});
1515

1616

17-
test("Basic test", function() {
17+
asyncTest("Basic test", function() {
1818
expect(12);
19-
stop(2000);
2019

2120
var that = this;
2221

0 commit comments

Comments
 (0)