From 83e2e14c531aadeefda1e125fbc8b798d00f57c0 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 6 Nov 2014 22:51:29 -0700 Subject: [PATCH] servo: Merge #3929 - Make content tests synchronous by default. Fixes #884 (from jdm:finish); r=larsbergstrom Source-Repo: https://github.com/servo/servo Source-Revision: bb7621f5dc33dd5068a3a4de7cdfe3af8b3d4130 --- servo/tests/content/harness.js | 14 ++++++++++++++ servo/tests/content/test_DOMParser.html | 1 - servo/tests/content/test_Event.html | 2 -- servo/tests/content/test_MouseEvent.html | 2 -- servo/tests/content/test_body_listener.html | 1 + servo/tests/content/test_caption.html | 2 -- servo/tests/content/test_collections.html | 2 -- servo/tests/content/test_createElement_script.html | 1 - servo/tests/content/test_create_element.html | 1 - servo/tests/content/test_documentElement.html | 1 - servo/tests/content/test_document_adoptNode.html | 2 -- servo/tests/content/test_document_body.html | 2 -- .../tests/content/test_document_characterSet.html | 2 -- .../test_document_characterSet_default.html | 2 -- .../test_document_characterSet_invalid.html | 2 -- servo/tests/content/test_document_compatMode.html | 1 - .../content/test_document_compatMode_loose.html | 1 - .../content/test_document_compatMode_strict.html | 1 - servo/tests/content/test_document_contenttype.html | 2 -- .../content/test_document_datalist_options.html | 1 - .../content/test_document_getElementById.html | 2 -- .../content/test_document_getElementsByName.html | 1 - servo/tests/content/test_document_head.html | 1 - .../content/test_document_implementation.html | 2 -- servo/tests/content/test_document_links_cache.html | 2 -- servo/tests/content/test_document_readystate.html | 2 ++ .../content/test_document_set_node_value.html | 1 - .../test_document_title_nontextchildren.html | 1 - servo/tests/content/test_document_url.html | 2 -- servo/tests/content/test_domtokenlist.html | 2 -- servo/tests/content/test_element_attribute.html | 2 -- servo/tests/content/test_element_attributes.html | 1 - servo/tests/content/test_element_classList.html | 2 -- servo/tests/content/test_element_className.html | 2 -- servo/tests/content/test_element_matches.html | 2 -- servo/tests/content/test_empty_clientrect.html | 1 - .../content/test_enabled_disabled_selectors.html | 2 -- servo/tests/content/test_event_dispatch.html | 2 -- .../tests/content/test_event_dispatch_dynamic.html | 1 - servo/tests/content/test_event_dispatch_order.html | 1 - .../content/test_event_handler_syntax_error.html | 2 -- servo/tests/content/test_event_listener.html | 2 -- .../tests/content/test_getBoundingClientRect.html | 2 -- servo/tests/content/test_global.html | 1 - servo/tests/content/test_htmlcollection.html | 2 -- .../content/test_htmlfieldsetelement_elements.html | 1 - servo/tests/content/test_htmlspacechars.html | 1 - servo/tests/content/test_inline_event_handler.html | 1 + servo/tests/content/test_innerHTML.html | 1 - servo/tests/content/test_interfaces.html | 1 - servo/tests/content/test_lenient_this.html | 2 -- servo/tests/content/test_load_event.html | 2 ++ servo/tests/content/test_navigator.html | 1 - servo/tests/content/test_node_cloneNode.html | 2 -- .../content/test_node_compareDocumentPosition.html | 1 - servo/tests/content/test_node_contains.html | 2 -- servo/tests/content/test_node_insertBefore.html | 2 -- servo/tests/content/test_node_isEqualNode.html | 2 -- servo/tests/content/test_node_normalize.html | 2 -- servo/tests/content/test_node_replaceChild.html | 2 -- .../content/test_parentNode_querySelector.html | 1 - .../content/test_parentNode_querySelectorAll.html | 2 -- servo/tests/content/test_parentnodes.html | 2 -- servo/tests/content/test_prototypes.html | 1 - servo/tests/content/test_proxy_setter.html | 1 - servo/tests/content/test_script_type.html | 4 ---- servo/tests/content/test_textcontent.html | 1 - servo/tests/content/test_title.html | 1 - servo/tests/content/test_trace_null.html | 1 - servo/tests/content/test_union.html | 2 -- servo/tests/content/test_window.html | 1 - servo/tests/content/test_window_performance.html | 1 - 72 files changed, 20 insertions(+), 105 deletions(-) diff --git a/servo/tests/content/harness.js b/servo/tests/content/harness.js index 7dafac00b6e2..2738ca2e6a60 100644 --- a/servo/tests/content/harness.js +++ b/servo/tests/content/harness.js @@ -75,6 +75,9 @@ function check_disabled_selector(elem, disabled) { var _test_complete = false; var _test_timeout = 10000; //10 seconds function finish() { + if (_test_complete) { + _fail('finish called multiple times'); + } if (_expectations > _tests) { _fail('expected ' + _expectations + ' tests, fullfilled ' + _tests); } @@ -90,3 +93,14 @@ function _test_timed_out() { } setTimeout(_test_timed_out, _test_timeout); + +var _needs_finish = false; +function waitForExplicitFinish() { + _needs_finish = true; +} + +addEventListener('load', function() { + if (!_needs_finish) { + finish(); + } +}); diff --git a/servo/tests/content/test_DOMParser.html b/servo/tests/content/test_DOMParser.html index c773116e3f6a..1928863d8d5b 100644 --- a/servo/tests/content/test_DOMParser.html +++ b/servo/tests/content/test_DOMParser.html @@ -6,7 +6,6 @@ is_function(DOMParser, "DOMParser"); let parser = new DOMParser(); is_a(parser, DOMParser); is_a(parser.parseFromString("", "text/html"), Document); -finish(); diff --git a/servo/tests/content/test_Event.html b/servo/tests/content/test_Event.html index 0643df62e44d..267983f59ef5 100644 --- a/servo/tests/content/test_Event.html +++ b/servo/tests/content/test_Event.html @@ -11,8 +11,6 @@ is(ev.type, 'foopy'); is(ev.defaultPrevented, false); ev.preventDefault(); is(ev.defaultPrevented, true); - -finish(); diff --git a/servo/tests/content/test_MouseEvent.html b/servo/tests/content/test_MouseEvent.html index 9d17cdc801e8..89173bbe6cc0 100644 --- a/servo/tests/content/test_MouseEvent.html +++ b/servo/tests/content/test_MouseEvent.html @@ -11,8 +11,6 @@ is_a(ev, UIEvent); is_a(ev, MouseEvent); is(ev.screenX, 150); is(ev.detail, 100); - -finish(); diff --git a/servo/tests/content/test_body_listener.html b/servo/tests/content/test_body_listener.html index dd125e7271c4..03dd253c47d0 100644 --- a/servo/tests/content/test_body_listener.html +++ b/servo/tests/content/test_body_listener.html @@ -2,6 +2,7 @@ diff --git a/servo/tests/content/test_collections.html b/servo/tests/content/test_collections.html index 61215300e6a0..c32381a1c1c6 100644 --- a/servo/tests/content/test_collections.html +++ b/servo/tests/content/test_collections.html @@ -136,8 +136,6 @@ check_tag("video", 1, [HTMLMediaElement, HTMLVideoElement]); // Test non-ASCII tag names. Uppercasing is ASCII-only per spec: // http://dom.spec.whatwg.org/#dom-element-tagname check_tag("foo-á", 1, [HTMLUnknownElement], "FOO-á"); - -finish(); diff --git a/servo/tests/content/test_createElement_script.html b/servo/tests/content/test_createElement_script.html index 0805511acf1d..ec5b2d01dd0b 100644 --- a/servo/tests/content/test_createElement_script.html +++ b/servo/tests/content/test_createElement_script.html @@ -14,7 +14,6 @@ output += "end"; is(output, "start middle end"); - finish(); diff --git a/servo/tests/content/test_create_element.html b/servo/tests/content/test_create_element.html index f62c599504d6..ede3e21814b3 100644 --- a/servo/tests/content/test_create_element.html +++ b/servo/tests/content/test_create_element.html @@ -13,7 +13,6 @@ is_a(elem, HTMLSpanElement); var text = document.createTextNode("hello"); is_a(text, Text); - finish(); diff --git a/servo/tests/content/test_documentElement.html b/servo/tests/content/test_documentElement.html index efe68e086d0c..4bb858e931e8 100644 --- a/servo/tests/content/test_documentElement.html +++ b/servo/tests/content/test_documentElement.html @@ -7,7 +7,6 @@ is_a(document.documentElement, HTMLHtmlElement); is_a(document.documentElement.firstChild, HTMLHeadElement); is(document.documentElement.nextSibling, null); is_a(document, Document); -finish(); diff --git a/servo/tests/content/test_document_adoptNode.html b/servo/tests/content/test_document_adoptNode.html index e3f36fb7f478..41481b56af79 100644 --- a/servo/tests/content/test_document_adoptNode.html +++ b/servo/tests/content/test_document_adoptNode.html @@ -18,8 +18,6 @@ is(foo.ownerDocument, doc); is(foo.parentNode, null); is(foo.childNodes.length, 1); - - finish(); diff --git a/servo/tests/content/test_document_body.html b/servo/tests/content/test_document_body.html index 0d47d5304f30..ebe60a2ad935 100644 --- a/servo/tests/content/test_document_body.html +++ b/servo/tests/content/test_document_body.html @@ -66,8 +66,6 @@ new_document.body = new_frameset; is(new_document.body, new_frameset, "test6-3, append frameset to a new document"); } - - finish(); diff --git a/servo/tests/content/test_document_characterSet.html b/servo/tests/content/test_document_characterSet.html index c1d5ed9f1030..4ac3dea31be0 100644 --- a/servo/tests/content/test_document_characterSet.html +++ b/servo/tests/content/test_document_characterSet.html @@ -14,8 +14,6 @@ var htmldoc = document.implementation.createHTMLDocument("title"); is(htmldoc.characterSet, "utf-8", "test2-2, characterSet"); } - - finish(); diff --git a/servo/tests/content/test_document_characterSet_default.html b/servo/tests/content/test_document_characterSet_default.html index 08fc63075e2e..1941e50c3eec 100644 --- a/servo/tests/content/test_document_characterSet_default.html +++ b/servo/tests/content/test_document_characterSet_default.html @@ -8,8 +8,6 @@ // FIXME: https://github.com/mozilla-servo/libhubbub/issues/5 is(document.characterSet, "utf-8", "test1-0, default characterSet"); } - - finish(); diff --git a/servo/tests/content/test_document_characterSet_invalid.html b/servo/tests/content/test_document_characterSet_invalid.html index 80984ad3e457..d0440e4fe0f4 100644 --- a/servo/tests/content/test_document_characterSet_invalid.html +++ b/servo/tests/content/test_document_characterSet_invalid.html @@ -8,8 +8,6 @@ { is(document.characterSet, "utf-8", "test1-0, unknown charset"); } - - finish(); diff --git a/servo/tests/content/test_document_compatMode.html b/servo/tests/content/test_document_compatMode.html index 754512c9a3bd..92ba66442182 100644 --- a/servo/tests/content/test_document_compatMode.html +++ b/servo/tests/content/test_document_compatMode.html @@ -15,7 +15,6 @@ var htmldoc = document.implementation.createHTMLDocument("title"); is(htmldoc.compatMode, "CSS1Compat", "test2-1, Non-parsed documents"); } - finish(); diff --git a/servo/tests/content/test_document_compatMode_loose.html b/servo/tests/content/test_document_compatMode_loose.html index 8a03b25e5a10..da538636bb8e 100644 --- a/servo/tests/content/test_document_compatMode_loose.html +++ b/servo/tests/content/test_document_compatMode_loose.html @@ -7,7 +7,6 @@ { is(document.compatMode, "BackCompat", "test1-0, Loose HTML"); } - finish(); diff --git a/servo/tests/content/test_document_compatMode_strict.html b/servo/tests/content/test_document_compatMode_strict.html index dd1b566735e7..b28816cc60f1 100644 --- a/servo/tests/content/test_document_compatMode_strict.html +++ b/servo/tests/content/test_document_compatMode_strict.html @@ -7,7 +7,6 @@ { is(document.compatMode, "CSS1Compat", "test1-0, Strict HTML"); } - finish(); diff --git a/servo/tests/content/test_document_contenttype.html b/servo/tests/content/test_document_contenttype.html index 4a63a6545472..73bf7f0217af 100644 --- a/servo/tests/content/test_document_contenttype.html +++ b/servo/tests/content/test_document_contenttype.html @@ -15,8 +15,6 @@ is_a(doc, Document, "test2-0, XML document"); is(doc.contentType, "application/xml", "test2-1, XML document"); } - - finish(); diff --git a/servo/tests/content/test_document_datalist_options.html b/servo/tests/content/test_document_datalist_options.html index 770c67a23e41..140a253a7612 100644 --- a/servo/tests/content/test_document_datalist_options.html +++ b/servo/tests/content/test_document_datalist_options.html @@ -15,6 +15,5 @@ is_a(datalist.options[0], HTMLOptionElement); is_a(datalist.options[1], HTMLOptionElement); is_a(datalist.options[2], HTMLOptionElement); - finish(); diff --git a/servo/tests/content/test_document_getElementById.html b/servo/tests/content/test_document_getElementById.html index d8430011b337..7484fdf4eb5b 100644 --- a/servo/tests/content/test_document_getElementById.html +++ b/servo/tests/content/test_document_getElementById.html @@ -19,8 +19,6 @@ let result = document.getElementById(TEST_ID); is(result, b, "test 9-0"); } - - finish(); diff --git a/servo/tests/content/test_document_getElementsByName.html b/servo/tests/content/test_document_getElementsByName.html index ab69292eced4..6d45ed6c8bf3 100644 --- a/servo/tests/content/test_document_getElementsByName.html +++ b/servo/tests/content/test_document_getElementsByName.html @@ -9,7 +9,6 @@ let nameList = document.getElementsByName("foo"); is_a(nameList, NodeList); is_not_a(nameList, HTMLCollection); - finish(); diff --git a/servo/tests/content/test_document_head.html b/servo/tests/content/test_document_head.html index f52a2b9aeba9..00cff0c885e4 100644 --- a/servo/tests/content/test_document_head.html +++ b/servo/tests/content/test_document_head.html @@ -40,7 +40,6 @@ foo.appendChild(head); is(new_document.head, null, "test3-0, head's parent should be document element"); } - finish(); diff --git a/servo/tests/content/test_document_implementation.html b/servo/tests/content/test_document_implementation.html index 7ac34da077dd..ac51b18f8751 100644 --- a/servo/tests/content/test_document_implementation.html +++ b/servo/tests/content/test_document_implementation.html @@ -74,8 +74,6 @@ is(doc.doctype, doctype, "test4-9, createDocument"); is_a(doc.documentElement, Element, "test4-10, createDocument"); } - - finish(); diff --git a/servo/tests/content/test_document_links_cache.html b/servo/tests/content/test_document_links_cache.html index bf4086ff0ccf..590939e42f7a 100644 --- a/servo/tests/content/test_document_links_cache.html +++ b/servo/tests/content/test_document_links_cache.html @@ -32,8 +32,6 @@ document.body.removeChild(document.getElementById("anchor-with-href")); is(links, document.links); is(links.length, 0); - - finish(); diff --git a/servo/tests/content/test_document_readystate.html b/servo/tests/content/test_document_readystate.html index 911d6043e6fa..bf0066908f7e 100644 --- a/servo/tests/content/test_document_readystate.html +++ b/servo/tests/content/test_document_readystate.html @@ -4,6 +4,8 @@ diff --git a/servo/tests/content/test_document_title_nontextchildren.html b/servo/tests/content/test_document_title_nontextchildren.html index 9875a149be73..20a74d4587d3 100644 --- a/servo/tests/content/test_document_title_nontextchildren.html +++ b/servo/tests/content/test_document_title_nontextchildren.html @@ -4,6 +4,5 @@ diff --git a/servo/tests/content/test_document_url.html b/servo/tests/content/test_document_url.html index bab643b58f0b..cb3aca2b0f10 100644 --- a/servo/tests/content/test_document_url.html +++ b/servo/tests/content/test_document_url.html @@ -23,8 +23,6 @@ is(url[0], "file:", "test3-0, current document"); is(url[url.length-1], "test_document_url.html", "test3-1, current document"); } - - finish(); diff --git a/servo/tests/content/test_domtokenlist.html b/servo/tests/content/test_domtokenlist.html index bc32777ec0e2..98877ddf8403 100644 --- a/servo/tests/content/test_domtokenlist.html +++ b/servo/tests/content/test_domtokenlist.html @@ -38,8 +38,6 @@ is(classList.contains("bar"), true); is(classList.contains("baz"), false); } - - finish(); diff --git a/servo/tests/content/test_element_attribute.html b/servo/tests/content/test_element_attribute.html index d7ee6a23640e..3715c4e091d7 100644 --- a/servo/tests/content/test_element_attribute.html +++ b/servo/tests/content/test_element_attribute.html @@ -59,8 +59,6 @@ should_throw(function () { test.setAttributeNS("http://www.w3.org/2000/xmlns/", "prefix:attr", "value"); }); - - finish(); diff --git a/servo/tests/content/test_element_attributes.html b/servo/tests/content/test_element_attributes.html index c489fad9f87f..7eb560ec258c 100644 --- a/servo/tests/content/test_element_attributes.html +++ b/servo/tests/content/test_element_attributes.html @@ -15,7 +15,6 @@ is(attributes[i].name, String.fromCharCode(i + 'a'.charCodeAt(0))); is(attributes[i].value, (i + 'a'.charCodeAt(0)).toString()); } - finish(); diff --git a/servo/tests/content/test_element_classList.html b/servo/tests/content/test_element_classList.html index ade4aa6a5a11..8d61414017b5 100644 --- a/servo/tests/content/test_element_classList.html +++ b/servo/tests/content/test_element_classList.html @@ -12,8 +12,6 @@ is(classList.item(0), null, "classList.item(0) must return null when all classes have been removed"); is(classList[0], undefined, "classList[0] must be undefined when all classes have been removed"); - - finish(); diff --git a/servo/tests/content/test_element_className.html b/servo/tests/content/test_element_className.html index 743d0f21f20a..298205c46814 100644 --- a/servo/tests/content/test_element_className.html +++ b/servo/tests/content/test_element_className.html @@ -31,8 +31,6 @@ collection = document.getElementsByClassName("baz"); is(collection.length, 1); is(collection[0].id, foo2.id); - - finish(); diff --git a/servo/tests/content/test_element_matches.html b/servo/tests/content/test_element_matches.html index 55f89d4a3fcd..50847e4dcc26 100644 --- a/servo/tests/content/test_element_matches.html +++ b/servo/tests/content/test_element_matches.html @@ -11,8 +11,6 @@ is(test.matches("#foo"), true, "test-1"); is(test.matches("#not-foo"), false, "test-2"); - - finish(); diff --git a/servo/tests/content/test_empty_clientrect.html b/servo/tests/content/test_empty_clientrect.html index 2504fa66396c..af319a145289 100644 --- a/servo/tests/content/test_empty_clientrect.html +++ b/servo/tests/content/test_empty_clientrect.html @@ -12,7 +12,6 @@ is(rect.right, 0); is(rect.width, 0); is(rect.height, 0); is(rects.length, 0); -finish(); diff --git a/servo/tests/content/test_enabled_disabled_selectors.html b/servo/tests/content/test_enabled_disabled_selectors.html index 8e0c2c2fd269..3a46183de295 100644 --- a/servo/tests/content/test_enabled_disabled_selectors.html +++ b/servo/tests/content/test_enabled_disabled_selectors.html @@ -172,8 +172,6 @@ optgroup.removeChild(option); check_disabled_selector(option, false); } - - finish(); diff --git a/servo/tests/content/test_event_dispatch.html b/servo/tests/content/test_event_dispatch.html index cf9eb4ee675c..0ace43d8f282 100644 --- a/servo/tests/content/test_event_dispatch.html +++ b/servo/tests/content/test_event_dispatch.html @@ -44,8 +44,6 @@ is(bodyTimes, 2, 'body listener should be called multiple times'); is(divTimes, 1, 'target listener should be called once'); is(spanTimes, 1, 'span listener should be called while bubbling'); - - finish(); diff --git a/servo/tests/content/test_event_dispatch_dynamic.html b/servo/tests/content/test_event_dispatch_dynamic.html index 3b852fe497d6..a7daddd4afcd 100644 --- a/servo/tests/content/test_event_dispatch_dynamic.html +++ b/servo/tests/content/test_event_dispatch_dynamic.html @@ -17,5 +17,4 @@ outerb.addEventListener("x", function() { innerb.dispatchEvent(new Event("x")); is(sawmiddle, 1); is(sawouter, 0); -finish(); diff --git a/servo/tests/content/test_event_dispatch_order.html b/servo/tests/content/test_event_dispatch_order.html index e1b381d0b77f..8092a6eeefda 100644 --- a/servo/tests/content/test_event_dispatch_order.html +++ b/servo/tests/content/test_event_dispatch_order.html @@ -36,7 +36,6 @@ is(sawBubble, true); is(sawCapture, true); is(sawBubbleTwice, true); - finish(); diff --git a/servo/tests/content/test_event_handler_syntax_error.html b/servo/tests/content/test_event_handler_syntax_error.html index f6c8cdffcff6..3c58a6b4b808 100644 --- a/servo/tests/content/test_event_handler_syntax_error.html +++ b/servo/tests/content/test_event_handler_syntax_error.html @@ -16,8 +16,6 @@ is(document.body.getAttribute("onx"), "{"); is(document.body.getAttribute("ony"), "}"); - - finish(); diff --git a/servo/tests/content/test_event_listener.html b/servo/tests/content/test_event_listener.html index 5096d76349ae..da040fb2ed69 100644 --- a/servo/tests/content/test_event_listener.html +++ b/servo/tests/content/test_event_listener.html @@ -32,8 +32,6 @@ var ev = new constructors[i]('foopy', {cancelable: true, bubbles: true}); window.dispatchEvent(ev); } - - finish(); diff --git a/servo/tests/content/test_getBoundingClientRect.html b/servo/tests/content/test_getBoundingClientRect.html index c1ad4a814371..e99bc1870dce 100644 --- a/servo/tests/content/test_getBoundingClientRect.html +++ b/servo/tests/content/test_getBoundingClientRect.html @@ -28,8 +28,6 @@ div { is(rect.height, 100); is(rect.width, rect.right - rect.left); is(rect.height, rect.bottom - rect.top); - - finish(); diff --git a/servo/tests/content/test_global.html b/servo/tests/content/test_global.html index 24cfbc5f6ba8..b3a0c2dbbba0 100644 --- a/servo/tests/content/test_global.html +++ b/servo/tests/content/test_global.html @@ -7,7 +7,6 @@ is(window, this); for (var key in this) { is(this[key], window[key]); } -finish(); diff --git a/servo/tests/content/test_htmlcollection.html b/servo/tests/content/test_htmlcollection.html index 6ee77fa81573..410c54b2ddfb 100644 --- a/servo/tests/content/test_htmlcollection.html +++ b/servo/tests/content/test_htmlcollection.html @@ -112,8 +112,6 @@ is(from_element.item(0), p1); is(from_element.item(1), p3); } - - finish(); diff --git a/servo/tests/content/test_htmlfieldsetelement_elements.html b/servo/tests/content/test_htmlfieldsetelement_elements.html index 3f599a44b9d0..45174bf86c58 100644 --- a/servo/tests/content/test_htmlfieldsetelement_elements.html +++ b/servo/tests/content/test_htmlfieldsetelement_elements.html @@ -40,6 +40,5 @@ is_a(fs.elements[7], HTMLInputElement); is_a(fs.elements[8], HTMLOutputElement); is_a(fs.elements[9], HTMLObjectElement); - finish(); diff --git a/servo/tests/content/test_htmlspacechars.html b/servo/tests/content/test_htmlspacechars.html index 7ce5ab3695fe..fbb6046d8c31 100644 --- a/servo/tests/content/test_htmlspacechars.html +++ b/servo/tests/content/test_htmlspacechars.html @@ -21,7 +21,6 @@ diff --git a/servo/tests/content/test_inline_event_handler.html b/servo/tests/content/test_inline_event_handler.html index 05b5a57c9528..53ba610f0749 100644 --- a/servo/tests/content/test_inline_event_handler.html +++ b/servo/tests/content/test_inline_event_handler.html @@ -4,6 +4,7 @@ diff --git a/servo/tests/content/test_innerHTML.html b/servo/tests/content/test_innerHTML.html index 1f0cf2355263..710dc256de4b 100644 --- a/servo/tests/content/test_innerHTML.html +++ b/servo/tests/content/test_innerHTML.html @@ -5,7 +5,6 @@ var a = document.createElement("div"); a.appendChild(document.createElement("pre")).appendChild(new Text("")); is(a.innerHTML, "
");
-      finish();
     
   
 
diff --git a/servo/tests/content/test_interfaces.html b/servo/tests/content/test_interfaces.html
index 5d544ebeacad..696d6dcc7dab 100644
--- a/servo/tests/content/test_interfaces.html
+++ b/servo/tests/content/test_interfaces.html
@@ -206,5 +206,4 @@ for (var name of Object.keys(interfaceMap)) {
 }
 is(Object.keys(interfaceMap).length, 0,
    "The following interface(s) are not enumerated: " + Object.keys(interfaceMap).join(", "));
-finish();
 
diff --git a/servo/tests/content/test_lenient_this.html b/servo/tests/content/test_lenient_this.html
index b31bc0b07519..7e7d27b43006 100644
--- a/servo/tests/content/test_lenient_this.html
+++ b/servo/tests/content/test_lenient_this.html
@@ -21,8 +21,6 @@
                 is(Document.prototype.onreadystatechange, undefined, "test2-1, property access returns undefined");
               });
             }
-
-            finish();
         
     
 
diff --git a/servo/tests/content/test_load_event.html b/servo/tests/content/test_load_event.html
index 595ed3b44c74..bbf07d699cb2 100644
--- a/servo/tests/content/test_load_event.html
+++ b/servo/tests/content/test_load_event.html
@@ -4,6 +4,8 @@
 
 
 
 
 
diff --git a/servo/tests/content/test_node_cloneNode.html b/servo/tests/content/test_node_cloneNode.html
index 3432ae9d537b..8d09e07e5b0e 100644
--- a/servo/tests/content/test_node_cloneNode.html
+++ b/servo/tests/content/test_node_cloneNode.html
@@ -226,8 +226,6 @@
                 check_copy(parent, copy, HTMLDivElement);
                 is(copy.childNodes.length, 0);
             }
-
-            finish();
         
     
 
diff --git a/servo/tests/content/test_node_compareDocumentPosition.html b/servo/tests/content/test_node_compareDocumentPosition.html
index ed03add639a9..843d8095262e 100644
--- a/servo/tests/content/test_node_compareDocumentPosition.html
+++ b/servo/tests/content/test_node_compareDocumentPosition.html
@@ -29,7 +29,6 @@
                         is(another.compareDocumentPosition(follower), Node.DOCUMENT_POSITION_FOLLOWING);
                         is(follower.compareDocumentPosition(another), Node.DOCUMENT_POSITION_PRECEDING);
                         is(follower.compareDocumentPosition(preceder), Node.DOCUMENT_POSITION_PRECEDING);
-                        finish();
                 }
         
     
diff --git a/servo/tests/content/test_node_contains.html b/servo/tests/content/test_node_contains.html
index 400b407b82d0..568edf96ebb7 100644
--- a/servo/tests/content/test_node_contains.html
+++ b/servo/tests/content/test_node_contains.html
@@ -18,8 +18,6 @@
                 is(parent.contains(child_of_child), true, "test1-2, Node.contains");
                 is(parent.contains(other), false, "test1-3, Node.contains");
             }
-
-            finish();
         
     
 
diff --git a/servo/tests/content/test_node_insertBefore.html b/servo/tests/content/test_node_insertBefore.html
index 8ee4e6e68b23..1a280b1bb7bd 100644
--- a/servo/tests/content/test_node_insertBefore.html
+++ b/servo/tests/content/test_node_insertBefore.html
@@ -17,8 +17,6 @@
                 is(root.insertBefore(before, after), before, "test1-0, insertBefore");
                 is(root.childNodes[0], before, "test1-1, insertBefore");
                 is(root.childNodes[1], after, "test1-2, insertBefore");
-
-                finish();
             }
         
     
diff --git a/servo/tests/content/test_node_isEqualNode.html b/servo/tests/content/test_node_isEqualNode.html
index e7c557437256..feaeeb2f78a7 100644
--- a/servo/tests/content/test_node_isEqualNode.html
+++ b/servo/tests/content/test_node_isEqualNode.html
@@ -32,8 +32,6 @@
                 is(parent_elem.isEqualNode(other_parent), false);
                 is(child_elem.isEqualNode(other_child), false);
             }
-
-            finish();
         
     
 
diff --git a/servo/tests/content/test_node_normalize.html b/servo/tests/content/test_node_normalize.html
index b2e9a3671282..27f1ccedd5f7 100644
--- a/servo/tests/content/test_node_normalize.html
+++ b/servo/tests/content/test_node_normalize.html
@@ -28,8 +28,6 @@
       is(parent2.childNodes.length, 0, "Node.normalize removes empty text nodes even if there is only one text node");
       is(child2.textContent, "", "Node.normalize doesn't change removed children original content")
       is(child3.textContent, "bb", "Node.normalize doesn't change removed children original content")
-
-      finish();
     
   
 
diff --git a/servo/tests/content/test_node_replaceChild.html b/servo/tests/content/test_node_replaceChild.html
index 2deec0801981..1ca01e501e70 100644
--- a/servo/tests/content/test_node_replaceChild.html
+++ b/servo/tests/content/test_node_replaceChild.html
@@ -45,8 +45,6 @@
                 is(document.replaceChild(new_elem, doc_elem), doc_elem, "test3-1, documentElement");
                 is(document.documentElement, new_elem, "test3-2, documentElement");
             }
-
-            finish();
         
     
 
diff --git a/servo/tests/content/test_parentNode_querySelector.html b/servo/tests/content/test_parentNode_querySelector.html
index b91205e79221..9ab4eb3b1cf5 100644
--- a/servo/tests/content/test_parentNode_querySelector.html
+++ b/servo/tests/content/test_parentNode_querySelector.html
@@ -64,7 +64,6 @@
                 is(docfrag.querySelector(".myClass"), div);
                 is(docfrag.querySelector("div > div"), child);
             }
-            finish();
         
     
 
diff --git a/servo/tests/content/test_parentNode_querySelectorAll.html b/servo/tests/content/test_parentNode_querySelectorAll.html
index f07ecb5187b2..bc99a8251a6c 100644
--- a/servo/tests/content/test_parentNode_querySelectorAll.html
+++ b/servo/tests/content/test_parentNode_querySelectorAll.html
@@ -52,8 +52,6 @@
                 nodelist = docfrag.querySelectorAll("#foo:nth-child(1)");
                 is(nodelist.item(0), div);
             }
-
-            finish();
         
     
 
diff --git a/servo/tests/content/test_parentnodes.html b/servo/tests/content/test_parentnodes.html
index 2131b7270b2d..51f0f3d1148e 100644
--- a/servo/tests/content/test_parentnodes.html
+++ b/servo/tests/content/test_parentnodes.html
@@ -18,8 +18,6 @@
 
     is(child.parentNode, elem);
     is(child.parentElement, elem);
-
-    finish();
   
 
 
diff --git a/servo/tests/content/test_prototypes.html b/servo/tests/content/test_prototypes.html
index cfb5fb35c3fe..705cff1d8dd9 100644
--- a/servo/tests/content/test_prototypes.html
+++ b/servo/tests/content/test_prototypes.html
@@ -19,7 +19,6 @@ function test() {
   is(window.document.documentElement.tagName, "HTML");
   is_a(window.document.getElementsByTagName('foo-á')[0], HTMLUnknownElement);
   is(window.document.getElementsByTagName('foo-á')[0].tagName, "FOO-á");
-  finish();
 }
 
 
diff --git a/servo/tests/content/test_proxy_setter.html b/servo/tests/content/test_proxy_setter.html
index 0d18f1115996..a8bab0f3bd1f 100644
--- a/servo/tests/content/test_proxy_setter.html
+++ b/servo/tests/content/test_proxy_setter.html
@@ -8,7 +8,6 @@
 is(window.document.title, '');
 window.document.title = 'foo';
 is(window.document.title, 'foo');
-finish();
 
 
 
diff --git a/servo/tests/content/test_script_type.html b/servo/tests/content/test_script_type.html
index e034b9013a9e..2a67db887cf0 100644
--- a/servo/tests/content/test_script_type.html
+++ b/servo/tests/content/test_script_type.html
@@ -92,10 +92,6 @@
   
-
-  
 
 
 
diff --git a/servo/tests/content/test_textcontent.html b/servo/tests/content/test_textcontent.html
index 1720abca8a0f..16c2c614d3eb 100644
--- a/servo/tests/content/test_textcontent.html
+++ b/servo/tests/content/test_textcontent.html
@@ -11,7 +11,6 @@
   var newContent = "new text con\ntent";
   div.textContent = newContent;
   is(div.textContent, newContent);
-  finish();
 
 
 
diff --git a/servo/tests/content/test_title.html b/servo/tests/content/test_title.html
index da3dcfc71129..117e86134dfc 100644
--- a/servo/tests/content/test_title.html
+++ b/servo/tests/content/test_title.html
@@ -6,7 +6,6 @@
 is(document.title, "starting title");
 document.title = "new title";
 is(document.title, "new title");
-finish();
 
 
 
diff --git a/servo/tests/content/test_trace_null.html b/servo/tests/content/test_trace_null.html
index af074b94f043..332f158e2a11 100644
--- a/servo/tests/content/test_trace_null.html
+++ b/servo/tests/content/test_trace_null.html
@@ -3,5 +3,4 @@
 
diff --git a/servo/tests/content/test_union.html b/servo/tests/content/test_union.html
index fd2bf84f96b1..f5fa1e933ca2 100644
--- a/servo/tests/content/test_union.html
+++ b/servo/tests/content/test_union.html
@@ -19,8 +19,6 @@
 
   should_throw(function() { sel.add(div) });
   should_not_throw(function() { sel.add(optgroup, function() {}) });
-
-  finish();
 
 
 
diff --git a/servo/tests/content/test_window.html b/servo/tests/content/test_window.html
index f532929a1240..0f3cc72b274c 100644
--- a/servo/tests/content/test_window.html
+++ b/servo/tests/content/test_window.html
@@ -7,7 +7,6 @@
 
 
 
diff --git a/servo/tests/content/test_window_performance.html b/servo/tests/content/test_window_performance.html
index a87e52225ffa..968ca1cde3e4 100644
--- a/servo/tests/content/test_window_performance.html
+++ b/servo/tests/content/test_window_performance.html
@@ -22,7 +22,6 @@
     gt(next, last);
     last = next;
   }
-  finish();