1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 04:34:59 +00:00

test-web: Add ability to change page mid-test

This allows you to not have to write a separate test file
for the same thing but in a different situation.

This doesn't handle when you change the page with location.href
however.

Changes the name of the page load handlers to prevent confusion
with this.
This commit is contained in:
Luke 2020-07-24 21:24:11 +01:00 committed by Andreas Kling
parent 1d6a3a5e8f
commit 08221139a5
7 changed files with 126 additions and 19 deletions

View file

@ -117,6 +117,12 @@ HTMLDocumentParser::HTMLDocumentParser(const StringView& input, const String& en
m_document = adopt(*new Document);
}
HTMLDocumentParser::HTMLDocumentParser(const StringView& input, const String& encoding, Document& existing_document)
: m_tokenizer(input, encoding)
, m_document(existing_document)
{
}
HTMLDocumentParser::~HTMLDocumentParser()
{
}