Permalink
Browse files

Merge pull request #1 from packagethief/master

Update calls to stop(), which now takes an increment, not a timeout value
  • Loading branch information...
2 parents 64b77bc + 9fa1e18 commit 75abb800a0462d8ed3e23f6faac6a4ca538e4b55 @tiff tiff committed Nov 1, 2011
View
3 test/dom/copy_attributes_test.js
@@ -26,9 +26,8 @@ test("Basic Tests", function() {
});
-test("Test copying attributes from one element to another element which is in an iframe", function() {
+asyncTest("Test copying attributes from one element to another element which is in an iframe", function() {
expect(1);
- stop(2000);
var that = this;
View
3 test/dom/copy_styles_test.js
@@ -69,9 +69,8 @@ test("Advanced tests", function() {
});
-test("Test copying styles from one element to another element which is in an iframe", function() {
+asyncTest("Test copying styles from one element to another element which is in an iframe", function() {
expect(1);
- stop(2000);
var that = this;
View
3 test/dom/get_as_dom_test.js
@@ -38,9 +38,8 @@ test("HTML5 elements", function() {
});
-test("Different document context", function() {
+asyncTest("Different document context", function() {
expect(2);
- stop(5000);
new wysihtml5.dom.Sandbox(function(sandbox) {
var result;
View
3 test/dom/has_element_with_class_name_test.js
@@ -9,8 +9,7 @@ if ("querySelector" in document || wysihtml5.browser.supportsNativeGetElementsBy
});
- test("Basic test", function() {
- stop(4000);
+ asyncTest("Basic test", function() {
expect(3);
new wysihtml5.dom.Sandbox(function(sandbox) {
View
3 test/dom/has_element_with_tag_name_test.js
@@ -8,8 +8,7 @@ module("wysihtml5.dom.hasElementWithTagName", {
});
-test("Basic test", function() {
- stop(4000);
+asyncTest("Basic test", function() {
expect(3);
new wysihtml5.dom.Sandbox(function(sandbox) {
View
6 test/dom/insert_css_test.js
@@ -7,9 +7,8 @@ module("wysihtml5.dom.insertCSS", {
}
});
-test("Basic Tests with IE=Edge", function() {
+asyncTest("Basic Tests with IE=Edge", function() {
expect(3);
- stop();
new wysihtml5.dom.Sandbox(function(sandbox) {
var doc = sandbox.getDocument(),
@@ -31,9 +30,8 @@ test("Basic Tests with IE=Edge", function() {
}, { uaCompatible: "IE=Edge" }).insertInto(document.body);
});
-test("Basic Tests with IE=7", function() {
+asyncTest("Basic Tests with IE=7", function() {
expect(3);
- stop();
new wysihtml5.dom.Sandbox(function(sandbox) {
var doc = sandbox.getDocument(),
View
3 test/dom/observe_test.js
@@ -63,9 +63,8 @@ test("Test detaching events", function() {
QUnit.triggerEvent(this.element, "click");
});
-test("Advanced test observing within a sandboxed iframe", function() {
+asyncTest("Advanced test observing within a sandboxed iframe", function() {
expect(2);
- stop(2000);
var sandbox = new wysihtml5.dom.Sandbox(function() {
var element = sandbox.getDocument().createElement("div");
View
24 test/dom/sandbox_test.js
@@ -29,9 +29,8 @@ module("wysihtml5.dom.Sandbox", {
});
-test("Basic Test", function() {
+asyncTest("Basic Test", function() {
expect(8);
- stop(5000);
var sandbox = new wysihtml5.dom.Sandbox(function(param) {
equals(param, sandbox, "The parameter passed into the readyCallback is the sandbox instance");
@@ -62,9 +61,8 @@ test("Basic Test", function() {
});
-test("Security test #1", function() {
+asyncTest("Security test #1", function() {
expect(14);
- stop(5000);
var that = this;
@@ -101,9 +99,8 @@ test("Security test #1", function() {
});
-test("Security test #2", function() {
+asyncTest("Security test #2", function() {
expect(2);
- stop(5000);
var sandbox = new wysihtml5.dom.Sandbox(function() {
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() {
});
-test("Check charset & doctype", function() {
+asyncTest("Check charset & doctype", function() {
expect(3);
- stop(5000);
var that = this;
@@ -146,8 +142,7 @@ test("Check charset & doctype", function() {
});
-test("Check insertion of single stylesheet", function() {
- stop(5000);
+asyncTest("Check insertion of single stylesheet", function() {
expect(1);
new wysihtml5.dom.Sandbox(function(sandbox) {
@@ -160,8 +155,7 @@ test("Check insertion of single stylesheet", function() {
});
-test("Check insertion of multiple stylesheets", function() {
- stop(5000);
+asyncTest("Check insertion of multiple stylesheets", function() {
expect(1);
new wysihtml5.dom.Sandbox(function(sandbox) {
@@ -177,8 +171,7 @@ test("Check insertion of multiple stylesheets", function() {
});
-test("Check X-UA-Compatible meta tag #1", function() {
- stop(5000);
+asyncTest("Check X-UA-Compatible meta tag #1", function() {
expect(2);
new wysihtml5.dom.Sandbox(function(sandbox) {
@@ -193,8 +186,7 @@ test("Check X-UA-Compatible meta tag #1", function() {
});
-test("Check X-UA-Compatible meta tag #2", function() {
- stop(5000);
+asyncTest("Check X-UA-Compatible meta tag #2", function() {
expect(3);
new wysihtml5.dom.Sandbox(function(sandbox) {
View
39 test/editor_test.js
@@ -39,9 +39,8 @@ if (wysihtml5.browser.supported()) {
}
});
- test("Basic test", function() {
+ asyncTest("Basic test", function() {
expect(16);
- stop(2000);
var that = this;
@@ -82,9 +81,8 @@ if (wysihtml5.browser.supported()) {
});
- test("Check setting of name as class name on iframe and iframe's body", function() {
+ asyncTest("Check setting of name as class name on iframe and iframe's body", function() {
expect(4);
- stop(2000);
this.textareaElement.className = "death-star";
@@ -105,9 +103,8 @@ if (wysihtml5.browser.supported()) {
});
- test("Check textarea with box-sizing: border-box;", function() {
+ asyncTest("Check textarea with box-sizing: border-box;", function() {
expect(1);
- stop(2000);
var that = this;
@@ -134,9 +131,8 @@ if (wysihtml5.browser.supported()) {
});
- test("Check whether attributes are copied", function() {
+ asyncTest("Check whether attributes are copied", function() {
expect(1);
- stop(2000);
var that = this;
@@ -148,9 +144,8 @@ if (wysihtml5.browser.supported()) {
});
- test("Check events", function() {
+ asyncTest("Check events", function() {
expect(8);
- stop(2000);
var that = this;
@@ -206,9 +201,8 @@ if (wysihtml5.browser.supported()) {
});
- test("Check sync (basic)", function() {
+ asyncTest("Check sync (basic)", function() {
expect(1);
- stop(2500);
var that = this;
@@ -225,9 +219,8 @@ if (wysihtml5.browser.supported()) {
});
- test("Check sync (advanced)", function() {
+ asyncTest("Check sync (advanced)", function() {
expect(5);
- stop(4000);
var that = this;
@@ -272,9 +265,8 @@ if (wysihtml5.browser.supported()) {
});
- test("Check placeholder", function() {
+ asyncTest("Check placeholder", function() {
expect(13);
- stop(3000);
var that = this;
@@ -322,9 +314,8 @@ if (wysihtml5.browser.supported()) {
});
- test("Check public api", function() {
+ asyncTest("Check public api", function() {
expect(14);
- stop(2000);
var that = this;
@@ -372,9 +363,8 @@ if (wysihtml5.browser.supported()) {
});
- test("Parser (default parser method with parserRules as object", function() {
+ asyncTest("Parser (default parser method with parserRules as object", function() {
expect(2);
- stop(3000);
var parserRules = {
tags: {
@@ -402,9 +392,8 @@ if (wysihtml5.browser.supported()) {
});
- test("Parser (custom parser method with parserRules as object", function() {
+ asyncTest("Parser (custom parser method with parserRules as object", function() {
expect(7);
- stop(3000);
var that = this,
parserRules = { script: undefined },
@@ -434,9 +423,8 @@ if (wysihtml5.browser.supported()) {
});
- test("Inserting an element which causes the textContent/innerText of the contentEditable element to be empty works correctly", function() {
+ asyncTest("Inserting an element which causes the textContent/innerText of the contentEditable element to be empty works correctly", function() {
expect(2);
- stop(2000);
var that = this;
@@ -462,8 +450,7 @@ if (wysihtml5.browser.supported()) {
});
- test("Check for stylesheets", function() {
- stop(2000);
+ asyncTest("Check for stylesheets", function() {
expect(5);
var that = this;
View
3 test/incompatible_test.js
@@ -14,9 +14,8 @@ module("wysihtml5 - Incompatible", {
});
-test("Basic test", function() {
+asyncTest("Basic test", function() {
expect(12);
- stop(2000);
var that = this;

0 comments on commit 75abb80

Please sign in to comment.