Implement document.write (fixes #3704)

This is a bit crude because of some missing utility methods on BufferQueue.
This commit is contained in:
Anthony Ramine 2016-11-25 16:19:19 +01:00
parent 708ebdceee
commit 4d93ee134c
91 changed files with 235 additions and 585 deletions

View file

@ -1,3 +1,5 @@
[012.html]
type: testharness
expected: TIMEOUT
[Link with onclick navigation to javascript url with delayed document.write and href navigation ]
expected: FAIL

View file

@ -1,3 +1,8 @@
[008.html]
type: testharness
expected: ERROR
[history.pushState URL resolving should be done relative to the document, not the script]
expected: FAIL
[history.replaceState URL resolving should be done relative to the document, not the script]
expected: FAIL

View file

@ -10,6 +10,3 @@
[Script iframe-src]
expected: NOTRUN
[Script document-write]
expected: NOTRUN

View file

@ -1,5 +0,0 @@
[001.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[002.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[003.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[004.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[005.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[006.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[007.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[008.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[009.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[010.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[011.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[012.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[013.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[014.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[015.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[016.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[017.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[018.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[019.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[020.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[021.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[022.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[023.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[024.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[025.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[026.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[027.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[028.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[029.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[030.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[031.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[032.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[033.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[034.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[035.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[036.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[037.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[038.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[039.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[040.html]
type: testharness
[document.write entity]
expected: FAIL

View file

@ -1,5 +0,0 @@
[041.html]
type: testharness
[document.write entity]
expected: FAIL

View file

@ -1,5 +0,0 @@
[042.html]
type: testharness
[document.write entity]
expected: FAIL

View file

@ -1,5 +0,0 @@
[043.html]
type: testharness
[document.write entity]
expected: FAIL

View file

@ -1,5 +0,0 @@
[044.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[045.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[046.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[script_001.html]
type: testharness
[document.write script]
expected: FAIL

View file

@ -1,5 +0,0 @@
[script_002.html]
type: testharness
[document.write script executed synchronously]
expected: FAIL

View file

@ -1,5 +0,0 @@
[script_003.html]
type: testharness
[document.write script writing a further script]
expected: FAIL

View file

@ -1,5 +0,0 @@
[script_004.html]
type: testharness
[document.write script writing script; order of execution]
expected: FAIL

View file

@ -1,5 +0,0 @@
[script_005.html]
type: testharness
[document.write external script]
expected: FAIL

View file

@ -1,5 +0,0 @@
[script_006.html]
type: testharness
[document.write external script followed by internal script]
expected: FAIL

View file

@ -1,5 +0,0 @@
[script_007.html]
type: testharness
[document.write external script that document.writes inline script]
expected: FAIL

View file

@ -1,5 +0,0 @@
[script_008.html]
type: testharness
[document.write external script that document.writes external script]
expected: FAIL

View file

@ -1,5 +0,0 @@
[script_009.html]
type: testharness
[document.write script that document.writes script]
expected: FAIL

View file

@ -1,5 +0,0 @@
[script_010.html]
type: testharness
[document.write external script tokenizer order]
expected: FAIL

View file

@ -1,5 +0,0 @@
[script_011.html]
type: testharness
[document.write external script that document.writes external script]
expected: FAIL

View file

@ -1,5 +0,0 @@
[script_012.html]
type: testharness
[document.write external script tokenizer order]
expected: FAIL

View file

@ -1,5 +0,0 @@
[script_013.html]
type: testharness
[document.write]
expected: FAIL

View file

@ -21,12 +21,6 @@
[Document interface: operation close()]
expected: FAIL
[Document interface: operation write(DOMString)]
expected: FAIL
[Document interface: operation writeln(DOMString)]
expected: FAIL
[Document interface: attribute designMode]
expected: FAIL
@ -900,18 +894,6 @@
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "close" with the proper type (56)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "write" with the proper type (57)]
expected: FAIL
[Document interface: calling write(DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "writeln" with the proper type (58)]
expected: FAIL
[Document interface: calling writeln(DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "designMode" with the proper type (62)]
expected: FAIL
@ -6144,12 +6126,6 @@
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "close" with the proper type (57)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "write" with the proper type (58)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "writeln" with the proper type (59)]
expected: FAIL
[Document interface: document.implementation.createDocument(null, "", null) must inherit property "designMode" with the proper type (63)]
expected: FAIL
@ -6489,18 +6465,6 @@
[Document interface: new Document() must inherit property "close" with the proper type (57)]
expected: FAIL
[Document interface: new Document() must inherit property "write" with the proper type (58)]
expected: FAIL
[Document interface: calling write(DOMString) on new Document() with too few arguments must throw TypeError]
expected: FAIL
[Document interface: new Document() must inherit property "writeln" with the proper type (59)]
expected: FAIL
[Document interface: calling writeln(DOMString) on new Document() with too few arguments must throw TypeError]
expected: FAIL
[Document interface: new Document() must inherit property "designMode" with the proper type (63)]
expected: FAIL
@ -8547,12 +8511,6 @@
[Document interface: new Document() must inherit property "close" with the proper type (56)]
expected: FAIL
[Document interface: new Document() must inherit property "write" with the proper type (57)]
expected: FAIL
[Document interface: new Document() must inherit property "writeln" with the proper type (58)]
expected: FAIL
[Document interface: new Document() must inherit property "designMode" with the proper type (62)]
expected: FAIL

View file

@ -1,6 +1,6 @@
[video_008.htm]
type: testharness
expected: ERROR
expected: TIMEOUT
[HTML5 Media Elements: 'media' attribute]
expected: NOTRUN

View file

@ -1,5 +0,0 @@
[async_009.htm]
type: testharness
[Document.write() silently fails from an Async script]
expected: FAIL

View file

@ -1,6 +0,0 @@
[script-onerror-insertion-point-1.html]
type: testharness
expected: TIMEOUT
[Test that the insertion point is defined in the error event of a parser-inserted script that actually started a fetch (but just had it fail).]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[script-onload-insertion-point.html]
type: testharness
expected: TIMEOUT
[Test that the insertion point is defined in the load event of a parser-inserted script.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[005.html]
type: testharness
expected: ERROR
[ scheduler: document.write inline in markup ]
expected: FAIL

View file

@ -1,6 +0,0 @@
[006.html]
type: testharness
expected: ERROR
[ scheduler: document.write inline - multiple]
expected: FAIL

View file

@ -1,6 +0,0 @@
[007.html]
type: testharness
expected: ERROR
[ scheduler: document.write external]
expected: FAIL

View file

@ -1,6 +0,0 @@
[008.html]
type: testharness
expected: ERROR
[ scheduler: document.write external - multiple]
expected: FAIL

View file

@ -1,6 +0,0 @@
[009.html]
type: testharness
expected: ERROR
[ scheduler: document.write external - multiple with doc.write]
expected: FAIL

View file

@ -1,6 +0,0 @@
[010.html]
type: testharness
expected: ERROR
[ scheduler: document.write external + inline - multiple with doc.write]
expected: FAIL

View file

@ -1,6 +0,0 @@
[011.html]
type: testharness
expected: ERROR
[ scheduler: document.write external + inline - multiple with doc.write + subsequent markup]
expected: FAIL

View file

@ -1,6 +0,0 @@
[012.html]
type: testharness
expected: ERROR
[ scheduler: document.write external and onload events ]
expected: FAIL

View file

@ -1,6 +0,0 @@
[018.html]
type: testharness
expected: ERROR
[ scheduler: DOM added scripts and doc.write]
expected: FAIL

View file

@ -1,6 +0,0 @@
[026.html]
type: testharness
expected: ERROR
[ scheduler: doc write added script, .src set later]
expected: FAIL

View file

@ -1,6 +0,0 @@
[027.html]
type: testharness
expected: ERROR
[ scheduler: doc write added script with content, .src set later]
expected: FAIL

View file

@ -1,6 +0,0 @@
[041.html]
type: testharness
expected: ERROR
[ scheduler: document.write scripts that write scripts]
expected: FAIL

View file

@ -1,3 +0,0 @@
[068.html]
type: testharness
expected: ERROR

View file

@ -1,6 +1,5 @@
[096.html]
type: testharness
expected: ERROR
[ scheduler: defer script added from document.write relative to DOMContentLoaded]
expected: FAIL

View file

@ -1,6 +0,0 @@
[097.html]
type: testharness
expected: ERROR
[ scheduler: slow-loading async script added from document.write]
expected: FAIL

View file

@ -1,6 +1,5 @@
[098.html]
type: testharness
expected: ERROR
[ scheduler: defer script added from document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[107-import.html]
type: testharness
[ scheduler: stylesheets blocking scripts document.write]
expected: FAIL

View file

@ -1,5 +0,0 @@
[107-noimport.html]
type: testharness
[ scheduler: stylesheets blocking scripts document.write]
expected: FAIL

View file

@ -1,6 +0,0 @@
[120.html]
type: testharness
expected: ERROR
[scheduler: script created without a window ]
expected: NOTRUN

View file

@ -1,21 +0,0 @@
[149.html]
type: testharness
expected: ERROR
[for='window' event='onload()' parser inserted executes immediately]
expected: FAIL
[for='window' event='onload' parser inserted executes immediately]
expected: FAIL
[for=' WINdow\t\n' event='ONload\t\n' parser inserted executes immediately]
expected: FAIL
[for='window' event='onload()' dom inserted executes immediately]
expected: FAIL
[for='window' event='onload' dom inserted executes immediately]
expected: FAIL
[for=' WINdow\t\n' event='ONload\t\n' dom inserted executes immediately]
expected: FAIL