createHTMLDocument() should not create a title element if the title argument is left out
https://bugs.webkit.org/show_bug.cgi?id=96694

Reviewed by Darin Adler.

In case the argument is not passed to createHTMLDocument we use a null string and check
for that before creating a title element.

Source/WebCore:

Test: fast/dom/DOMImplementation/createHTMLDocument-optional-title.html

* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createHTMLDocument):
* dom/DOMImplementation.idl:

LayoutTests:

* fast/dom/DOMImplementation/createHTMLDocument-optional-title-expected.txt: Added.
* fast/dom/DOMImplementation/createHTMLDocument-optional-title.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk/LayoutTests@130203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
3 files changed