summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/resources/document-open-side-effects.js
blob: 7cb86dcba0236d1e161989e95de172ebbf7852e0 (plain)
1
2
3
4
5
6
7
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})`);
}