diff options
Diffstat (limited to 'testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/document-open-side-effects.js')
-rw-r--r-- | testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/document-open-side-effects.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/document-open-side-effects.js b/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/document-open-side-effects.js new file mode 100644 index 0000000000..7cb86dcba0 --- /dev/null +++ b/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/document-open-side-effects.js @@ -0,0 +1,8 @@ +function assertDocumentIsReadyForSideEffectsTest(doc, description) { + assert_not_equals(doc.childNodes.length, 0, `document should not be empty before side effects test (${description})`); +} + +function assertOpenHasNoSideEffects(doc, originalURL, description) { + assert_not_equals(doc.childNodes.length, 0, `document nodes should not be cleared (${description})`); + assert_equals(doc.URL, originalURL, `The original URL should be kept (${description})`); +} |