Commit 2d05f445 authored by tzik's avatar tzik Committed by Commit bot

Revert of Initialize document m_URL, m_baseURL to blankURL. (patchset #4...

Revert of Initialize document m_URL, m_baseURL to blankURL. (patchset #4 id:60001 of https://codereview.chromium.org/2749803003/ )

Reason for revert:
This CL seems to break interactive_ui_tests on multiple bots:

A sample of error log was:
https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Ozone%20Tests%20%281%29/builds/44135

../../chrome/test/base/extension_js_browser_test.cc:64: Failure
Failed
Failed: RUN_TEST_F("AutomationTreeWalkerTest","Backward")
ReferenceError: DesktopAutomationHandler is not defined
    at AutomationTreeWalkerTest.ChromeVoxNextE2ETest (tree_walker_test.extjs:8556:3)
    at AutomationTreeWalkerTest (tree_walker_test.extjs:8663:24)
    at createTestCase (tree_walker_test.extjs:7607:19)
    at RUN_TEST_F (tree_walker_test.extjs:7721:25)
    at tree_walker_test.extjs:7523:20
    at runTestFunction (tree_walker_test.extjs:7593:37)
    at runTest (tree_walker_test.extjs:7567:18)
    at tree_walker_test.extjs:8851:1
gen/chrome/browser/resources/chromeos/chromevox/cvox2/background/tree_walker_test-gen.cc:69: Failure
Value of: RunJavascriptTestF( true, "AutomationTreeWalkerTest", "Backward")
  Actual: false
Expected: true
[  FAILED  ] AutomationTreeWalkerTest.Backward, where TypeParam =  and GetParam() =  (1196 ms)

Original issue's description:
> Initialize document m_URL & m_baseURL to blankURL.
>
> This patch will ensure that m_URL and m_baseURL are initialized to
> blankURL (about:blank) as is specified in [1]. This patch fixes the
> tests in [2] and [3].
>
> [1] https://dom.spec.whatwg.org/#interface-document
> [2] http://w3c-test.org/dom/nodes/DOMImplementation-createDocument.html
> [3] http://w3c-test.org/dom/nodes/DOMImplementation-createHTMLDocument.html
>
> BUG=563986
>
> Review-Url: https://codereview.chromium.org/2749803003
> Cr-Commit-Position: refs/heads/master@{#457347}
> Committed: https://chromium.googlesource.com/chromium/src/+/9168f165fe92e37664a5e39fef987f0e3ad72a62

TBR=tkent@chromium.org,martin@martinrogalla.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=563986

Review-Url: https://codereview.chromium.org/2757573002
Cr-Commit-Position: refs/heads/master@{#457366}
parent bb4a5062
/*
Copyright © 2001-2004 World Wide Web Consortium,
(Massachusetts Institute of Technology, European Research Consortium
for Informatics and Mathematics, Keio University). All
Rights Reserved. This work is distributed under the W3C® Software License [1] in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
/**
* Gets URI that identifies the test.
* @return uri identifier of test
*/
function getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetdocumenturi02";
}
var docsLoaded = -1000000;
var builder = null;
//
// This function is called by the testing framework before
// running the test suite.
//
// If there are no configuration exceptions, asynchronous
// document loading is started. Otherwise, the status
// is set to complete and the exception is immediately
// raised when entering the body of the test.
//
function setUpPage() {
setUpPageStatus = 'running';
try {
//
// creates test document builder, may throw exception
//
builder = createConfiguredBuilder();
docsLoaded = 0;
var docRef = null;
if (typeof(this.doc) != 'undefined') {
docRef = this.doc;
}
docsLoaded += preload(docRef, "doc", "hc_staff");
if (docsLoaded == 1) {
setUpPageStatus = 'complete';
}
} catch(ex) {
catchInitializationError(builder, ex);
setUpPageStatus = 'complete';
}
}
//
// This method is called on the completion of
// each asychronous load started in setUpTests.
//
// When every synchronous loaded document has completed,
// the page status is changed which allows the
// body of the test to be executed.
function loadComplete() {
if (++docsLoaded == 1) {
setUpPageStatus = 'complete';
}
}
/**
*
Create a new Document, retrieve its documentURI, and verify if it is null.
* @author IBM
* @author Neil Delima
* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI
*/
function documentgetdocumenturi02() {
var success;
if(checkInitialization(builder, "documentgetdocumenturi02") != null) return;
var doc;
var newDoc;
var docURI;
var domImpl;
var nullDocType = null;
var docElem;
var rootNS;
var rootName;
var docRef = null;
if (typeof(this.doc) != 'undefined') {
docRef = this.doc;
}
doc = load(docRef, "doc", "hc_staff");
docElem = doc.documentElement;
rootNS = docElem.namespaceURI;
rootName = docElem.tagName;
domImpl = doc.implementation;
newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
docURI = newDoc.documentURI;
assertNull("documentgetdocumenturi02",docURI);
}
function runTest() {
documentgetdocumenturi02();
}
<?xml version="1.0"?><?TEST-STYLE PIDATA?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"xhtml1-strict.dtd" [
<!ENTITY alpha "&#945;">
<!ENTITY beta "&#946;">
<!ENTITY gamma "&#947;">
<!ENTITY delta "&#948;">
<!ENTITY epsilon "&#949;">
<!ENTITY alpha "&#950;">
<!NOTATION notation1 PUBLIC "notation1File">
<!NOTATION notation2 SYSTEM "notation2File">
<!ATTLIST p
dir CDATA 'rtl'
xmlns:dmstc CDATA #IMPLIED
xmlns:nm CDATA #IMPLIED
xmlns:emp2 CDATA #IMPLIED>
<!ATTLIST html
xmlns:xsi CDATA #IMPLIED
xsi:schemaLocation CDATA #IMPLIED>
<!ATTLIST acronym xsi:noNamespaceSchemaLocation CDATA #IMPLIED>
<!ENTITY ent4 "<span xmlns='http://www.w3.org/1999/xhtml'>Element data</span><?PItarget PIdata?>">
<!ATTLIST span xmlns CDATA #IMPLIED>
]>
<!-- This is comment number 1.-->
<html xmlns='http://www.w3.org/1999/xhtml'
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/1999/xhtml hc_staff.xsd"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentgetdocumenturi02.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
<p xmlns:dmstc="http://www.usa.com">
<em>EMP0001</em>
<strong>Margaret Martin</strong>
<code>Accountant</code>
<sup>56,000</sup>
<var>Female</var>
<acronym title="Yes" xsi:noNamespaceSchemaLocation="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
</p>
<p xmlns:dmstc="http://www.usa.com">
<em>EMP0002</em>
<strong>Martha Raynolds
<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>
<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></strong>
<code>Secretary</code>
<sup>35,000</sup>
<var>Female</var>
<acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">&beta; Dallas, &gamma;
98554</acronym>
</p>
<p xmlns:dmstc="http://www.netzero.com">
<em>EMP0003</em>
<strong>Roger
Jones</strong>
<code>Department Manager</code>
<sup>100,000</sup>
<var>&ent4;</var>
<acronym title="Yes" class="No" id="_98553" xsi:noNamespaceSchemaLocation="Yes">PO Box 27 Irving, texas 98553</acronym>
</p>
<p xmlns:nm="http://www.altavista.com">
<em>EMP0004</em>
<strong>Jeny Oconnor</strong>
<code>Personnel Director</code>
<sup>95,000</sup>
<var>Female</var>
<acronym title="Yes" class="Y&alpha;" id="_98556" xsi:noNamespaceSchemaLocation="Yes">27 South Road. Dallas, Texas 98556</acronym>
</p>
<p xmlns:emp2="http://www.nist.gov">
<em>EMP0005</em>
<strong>Robert Myers</strong>
<code>Computer Specialist</code>
<sup>90,000</sup>
<var>male</var>
<acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
</p>
</body></html>
Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetdocumenturi03
Status Success
/*
Copyright © 2001-2004 World Wide Web Consortium,
(Massachusetts Institute of Technology, European Research Consortium
for Informatics and Mathematics, Keio University). All
Rights Reserved. This work is distributed under the W3C® Software License [1] in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
/**
* Gets URI that identifies the test.
* @return uri identifier of test
*/
function getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentgetdocumenturi03";
}
var docsLoaded = -1000000;
var builder = null;
//
// This function is called by the testing framework before
// running the test suite.
//
// If there are no configuration exceptions, asynchronous
// document loading is started. Otherwise, the status
// is set to complete and the exception is immediately
// raised when entering the body of the test.
//
function setUpPage() {
setUpPageStatus = 'running';
try {
//
// creates test document builder, may throw exception
//
builder = createConfiguredBuilder();
docsLoaded = 0;
var docRef = null;
if (typeof(this.doc) != 'undefined') {
docRef = this.doc;
}
docsLoaded += preload(docRef, "doc", "hc_staff");
if (docsLoaded == 1) {
setUpPageStatus = 'complete';
}
} catch(ex) {
catchInitializationError(builder, ex);
setUpPageStatus = 'complete';
}
}
//
// This method is called on the completion of
// each asychronous load started in setUpTests.
//
// When every synchronous loaded document has completed,
// the page status is changed which allows the
// body of the test to be executed.
function loadComplete() {
if (++docsLoaded == 1) {
setUpPageStatus = 'complete';
}
}
/**
*
Import the documentElement node of this document into a new document. Since this node is
now owned by the importing document, its documentURI attribute value should be null
* @author IBM
* @author Neil Delima
* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI
*/
function documentgetdocumenturi03() {
var success;
if(checkInitialization(builder, "documentgetdocumenturi03") != null) return;
var doc;
var newDoc;
var importedOwner;
var docElem;
var docElemImported;
var docURI;
var domImpl;
var nullDocType = null;
var rootNS;
var rootName;
var docRef = null;
if (typeof(this.doc) != 'undefined') {
docRef = this.doc;
}
doc = load(docRef, "doc", "hc_staff");
domImpl = doc.implementation;
docElem = doc.documentElement;
rootNS = docElem.namespaceURI;
rootName = docElem.tagName;
newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
docElemImported = newDoc.importNode(docElem,false);
importedOwner = docElemImported.ownerDocument;
docURI = importedOwner.documentURI;
assertNull("documentgetdocumenturi03",docURI);
}
function runTest() {
documentgetdocumenturi03();
}
<?xml version="1.0"?><?TEST-STYLE PIDATA?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"xhtml1-strict.dtd" [
<!ENTITY alpha "&#945;">
<!ENTITY beta "&#946;">
<!ENTITY gamma "&#947;">
<!ENTITY delta "&#948;">
<!ENTITY epsilon "&#949;">
<!ENTITY alpha "&#950;">
<!NOTATION notation1 PUBLIC "notation1File">
<!NOTATION notation2 SYSTEM "notation2File">
<!ATTLIST p
dir CDATA 'rtl'
xmlns:dmstc CDATA #IMPLIED
xmlns:nm CDATA #IMPLIED
xmlns:emp2 CDATA #IMPLIED>
<!ATTLIST html
xmlns:xsi CDATA #IMPLIED
xsi:schemaLocation CDATA #IMPLIED>
<!ATTLIST acronym xsi:noNamespaceSchemaLocation CDATA #IMPLIED>
<!ENTITY ent4 "<span xmlns='http://www.w3.org/1999/xhtml'>Element data</span><?PItarget PIdata?>">
<!ATTLIST span xmlns CDATA #IMPLIED>
]>
<!-- This is comment number 1.-->
<html xmlns='http://www.w3.org/1999/xhtml'
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/1999/xhtml hc_staff.xsd"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>hc_staff</title><script type="text/javascript" src="selfxhtml.js"/><script charset="UTF-8" type="text/javascript" src="documentgetdocumenturi03.js"/><script type='text/javascript'>function loadComplete() { startTest(); }</script></head><body onload="loadComplete()">
<p xmlns:dmstc="http://www.usa.com">
<em>EMP0001</em>
<strong>Margaret Martin</strong>
<code>Accountant</code>
<sup>56,000</sup>
<var>Female</var>
<acronym title="Yes" xsi:noNamespaceSchemaLocation="Yes">1230 North Ave. Dallas, Texas 98551</acronym>
</p>
<p xmlns:dmstc="http://www.usa.com">
<em>EMP0002</em>
<strong>Martha Raynolds
<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>
<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></strong>
<code>Secretary</code>
<sup>35,000</sup>
<var>Female</var>
<acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">&beta; Dallas, &gamma;
98554</acronym>
</p>
<p xmlns:dmstc="http://www.netzero.com">
<em>EMP0003</em>
<strong>Roger
Jones</strong>
<code>Department Manager</code>
<sup>100,000</sup>
<var>&ent4;</var>
<acronym title="Yes" class="No" id="_98553" xsi:noNamespaceSchemaLocation="Yes">PO Box 27 Irving, texas 98553</acronym>
</p>
<p xmlns:nm="http://www.altavista.com">
<em>EMP0004</em>
<strong>Jeny Oconnor</strong>
<code>Personnel Director</code>
<sup>95,000</sup>
<var>Female</var>
<acronym title="Yes" class="Y&alpha;" id="_98556" xsi:noNamespaceSchemaLocation="Yes">27 South Road. Dallas, Texas 98556</acronym>
</p>
<p xmlns:emp2="http://www.nist.gov">
<em>EMP0005</em>
<strong>Robert Myers</strong>
<code>Computer Specialist</code>
<sup>90,000</sup>
<var>male</var>
<acronym title="Yes" class="Yes" xsi:noNamespaceSchemaLocation="Yes">1821 Nordic. Road, Irving Texas 98558</acronym>
</p>
</body></html>
Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetdocumenturi03
Status failure
Message documentsetdocumenturi03: assertEquals failed, actual null, expected somestring.
/*
Copyright © 2001-2004 World Wide Web Consortium,
(Massachusetts Institute of Technology, European Research Consortium
for Informatics and Mathematics, Keio University). All
Rights Reserved. This work is distributed under the W3C® Software License [1] in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
/**
* Gets URI that identifies the test.
* @return uri identifier of test
*/
function getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/documentsetdocumenturi03";
}
var docsLoaded = -1000000;
var builder = null;
//
// This function is called by the testing framework before
// running the test suite.
//
// If there are no configuration exceptions, asynchronous
// document loading is started. Otherwise, the status
// is set to complete and the exception is immediately
// raised when entering the body of the test.
//
function setUpPage() {
setUpPageStatus = 'running';
try {
//
// creates test document builder, may throw exception
//
builder = createConfiguredBuilder();
docsLoaded = 0;
var docRef = null;
if (typeof(this.doc) != 'undefined') {
docRef = this.doc;
}
docsLoaded += preload(docRef, "doc", "barfoo");
if (docsLoaded == 1) {
setUpPageStatus = 'complete';
}
} catch(ex) {
catchInitializationError(builder, ex);
setUpPageStatus = 'complete';
}
}
//
// This method is called on the completion of
// each asychronous load started in setUpTests.
//
// When every synchronous loaded document has completed,
// the page status is changed which allows the
// body of the test to be executed.
function loadComplete() {
if (++docsLoaded == 1) {
setUpPageStatus = 'complete';
}
}
/**
*
The setDocmentURI method set the location of the document.
Create a new document and set its documentURI to a valid string. Retrieve the documentURI
and verify if it is was correctly set.
* @author IBM
* @author Neil Delima
* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Document3-documentURI
*/
function documentsetdocumenturi03() {
var success;
if(checkInitialization(builder, "documentsetdocumenturi03") != null) return;
var doc;
var newDoc;
var domImpl;
var docURI;
var nullDocType = null;
var docElem;
var rootNS;
var rootName;
var docRef = null;
if (typeof(this.doc) != 'undefined') {
docRef = this.doc;
}
doc = load(docRef, "doc", "barfoo");
docElem = doc.documentElement;
rootNS = docElem.namespaceURI;
rootName = docElem.tagName;
domImpl = doc.implementation;
newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
newDoc.documentURI = "somestring";
docURI = newDoc.documentURI;
assertEquals("documentsetdocumenturi03","somestring",docURI);
}
function runTest() {
documentsetdocumenturi03();
}
<!DOCTYPE html [
<!ENTITY ent1 'foo'>
<!ENTITY ent2 'foo<br/>'>
<!ELEMENT html (head, body)>
<!ATTLIST html xmlns CDATA #IMPLIED>
<!ELEMENT head (title,script*)>
<!ELEMENT script (#PCDATA)>
<!ATTLIST script
src CDATA #IMPLIED
type CDATA #IMPLIED
charset CDATA #IMPLIED>
<!ELEMENT title (#PCDATA)>
<!ELEMENT body (p)>
<!ATTLIST body onload CDATA #IMPLIED>
<!ELEMENT p (#PCDATA|br)*>
<!ELEMENT br EMPTY>
]>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>replaceWholeText sample</title>
<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='documentsetdocumenturi03.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
<body onload="loadComplete()">
<p>bar</p>
</body>
</html>
Test http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri02
Status error
Message Line undefined: TypeError
/*
Copyright © 2001-2004 World Wide Web Consortium,
(Massachusetts Institute of Technology, European Research Consortium
for Informatics and Mathematics, Keio University). All
Rights Reserved. This work is distributed under the W3C® Software License [1] in the
hope that it will be useful, but WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
*/
/**
* Gets URI that identifies the test.
* @return uri identifier of test
*/
function getTargetURI() {
return "http://www.w3.org/2001/DOM-Test-Suite/level3/core/nodegetbaseuri02";
}
var docsLoaded = -1000000;
var builder = null;
//
// This function is called by the testing framework before
// running the test suite.
//
// If there are no configuration exceptions, asynchronous
// document loading is started. Otherwise, the status
// is set to complete and the exception is immediately
// raised when entering the body of the test.
//
function setUpPage() {
setUpPageStatus = 'running';
try {
//
// creates test document builder, may throw exception
//
builder = createConfiguredBuilder();
docsLoaded = 0;
var docRef = null;
if (typeof(this.doc) != 'undefined') {
docRef = this.doc;
}
docsLoaded += preload(docRef, "doc", "barfoo");
if (docsLoaded == 1) {
setUpPageStatus = 'complete';
}
} catch(ex) {
catchInitializationError(builder, ex);
setUpPageStatus = 'complete';
}
}
//
// This method is called on the completion of
// each asychronous load started in setUpTests.
//
// When every synchronous loaded document has completed,
// the page status is changed which allows the
// body of the test to be executed.
function loadComplete() {
if (++docsLoaded == 1) {
setUpPageStatus = 'complete';
}
}
/**
*
Using getBaseURI check if the baseURI attribute of a new Document node is null
and if affected by changes in Document.documentURI.
* @author IBM
* @author Neil Delima
* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core#Node3-baseURI
* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=419
* @see http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/infoset-mapping#Infoset2Document
*/
function nodegetbaseuri02() {
var success;
if(checkInitialization(builder, "nodegetbaseuri02") != null) return;
var doc;
var newDoc;
var domImpl;
var baseURI;
var rootNS;
var rootName;
var docElem;
var nullDocType = null;
var docRef = null;
if (typeof(this.doc) != 'undefined') {
docRef = this.doc;
}
doc = load(docRef, "doc", "barfoo");
docElem = doc.documentElement;
rootNS = docElem.namespaceURI;
rootName = docElem.tagName;
domImpl = doc.implementation;
newDoc = domImpl.createDocument(rootNS,rootName,nullDocType);
baseURI = newDoc.baseURI;
assertNull("baseURIIsNull",baseURI);
newDoc.documentURI = "http://www.example.com/sample.xml";
baseURI = newDoc.baseURI;
assertEquals("baseURISameAsDocURI","http://www.example.com/sample.xml".toLowerCase(),baseURI.toLowerCase());
}
function runTest() {
nodegetbaseuri02();
}
<!DOCTYPE html [
<!ENTITY ent1 'foo'>
<!ENTITY ent2 'foo<br/>'>
<!ELEMENT html (head, body)>
<!ATTLIST html xmlns CDATA #IMPLIED>
<!ELEMENT head (title,script*)>
<!ELEMENT script (#PCDATA)>
<!ATTLIST script
src CDATA #IMPLIED
type CDATA #IMPLIED
charset CDATA #IMPLIED>
<!ELEMENT title (#PCDATA)>
<!ELEMENT body (p)>
<!ATTLIST body onload CDATA #IMPLIED>
<!ELEMENT p (#PCDATA|br)*>
<!ELEMENT br EMPTY>
]>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>replaceWholeText sample</title>
<script type='text/javascript' src='selfxhtml.js'></script><script charset='UTF-8' type='text/javascript' src='nodegetbaseuri02.js'></script><script type='text/javascript'>function loadComplete() { startTest(); }</script></head>
<body onload="loadComplete()">
<p>bar</p>
</body>
</html>
This is a testharness.js-based test.
Found 1609 tests; 1427 PASS, 182 FAIL, 0 TIMEOUT, 0 NOTRUN.
Found 1609 tests; 1424 PASS, 185 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS Event interface: existence and properties of interface object
PASS Event interface object length
PASS Event interface object name
......@@ -24,7 +24,7 @@ PASS Event interface: attribute cancelable
PASS Event interface: operation preventDefault()
PASS Event interface: attribute defaultPrevented
PASS Event interface: attribute timeStamp
FAIL Event interface: operation initEvent(DOMString,boolean,boolean) assert_equals: property has wrong .length expected 1 but got 0
FAIL Event interface: operation initEvent(DOMString,boolean,boolean) assert_equals: property has wrong .length expected 3 but got 0
PASS Event must be primary interface of document.createEvent("Event")
PASS Stringification of document.createEvent("Event")
PASS Event interface: document.createEvent("Event") must inherit property "type" with the proper type (0)
......@@ -75,7 +75,7 @@ PASS CustomEvent interface object name
FAIL CustomEvent interface: existence and properties of interface prototype object assert_equals: class string of CustomEvent.prototype expected "[object CustomEventPrototype]" but got "[object CustomEvent]"
PASS CustomEvent interface: existence and properties of interface prototype object's "constructor" property
PASS CustomEvent interface: attribute detail
FAIL CustomEvent interface: operation initCustomEvent(DOMString,boolean,boolean,any) assert_equals: property has wrong .length expected 1 but got 4
PASS CustomEvent interface: operation initCustomEvent(DOMString,boolean,boolean,any)
PASS CustomEvent must be primary interface of new CustomEvent("foo")
PASS Stringification of new CustomEvent("foo")
PASS CustomEvent interface: new CustomEvent("foo") must inherit property "detail" with the proper type (0)
......@@ -411,7 +411,7 @@ PASS XMLDocument must be primary interface of xmlDoc
PASS Stringification of xmlDoc
PASS Document interface: xmlDoc must inherit property "implementation" with the proper type (0)
PASS Document interface: xmlDoc must inherit property "URL" with the proper type (1)
PASS Document interface: xmlDoc must inherit property "documentURI" with the proper type (2)
FAIL Document interface: xmlDoc must inherit property "documentURI" with the proper type (2) assert_equals: expected "string" but got "object"
PASS Document interface: xmlDoc must inherit property "origin" with the proper type (3)
PASS Document interface: xmlDoc must inherit property "compatMode" with the proper type (4)
PASS Document interface: xmlDoc must inherit property "characterSet" with the proper type (5)
......@@ -482,7 +482,7 @@ PASS Node interface: xmlDoc must inherit property "DOCUMENT_FRAGMENT_NODE" with
PASS Node interface: xmlDoc must inherit property "NOTATION_NODE" with the proper type (11)
PASS Node interface: xmlDoc must inherit property "nodeType" with the proper type (12)
PASS Node interface: xmlDoc must inherit property "nodeName" with the proper type (13)
PASS Node interface: xmlDoc must inherit property "baseURI" with the proper type (14)
FAIL Node interface: xmlDoc must inherit property "baseURI" with the proper type (14) assert_equals: expected "string" but got "object"
PASS Node interface: xmlDoc must inherit property "isConnected" with the proper type (15)
PASS Node interface: xmlDoc must inherit property "ownerDocument" with the proper type (16)
PASS Node interface: xmlDoc must inherit property "getRootNode" with the proper type (17)
......@@ -893,7 +893,7 @@ PASS Node interface: element must inherit property "DOCUMENT_FRAGMENT_NODE" with
PASS Node interface: element must inherit property "NOTATION_NODE" with the proper type (11)
PASS Node interface: element must inherit property "nodeType" with the proper type (12)
PASS Node interface: element must inherit property "nodeName" with the proper type (13)
PASS Node interface: element must inherit property "baseURI" with the proper type (14)
FAIL Node interface: element must inherit property "baseURI" with the proper type (14) assert_equals: expected "string" but got "object"
PASS Node interface: element must inherit property "isConnected" with the proper type (15)
PASS Node interface: element must inherit property "ownerDocument" with the proper type (16)
PASS Node interface: element must inherit property "getRootNode" with the proper type (17)
......@@ -1213,7 +1213,7 @@ PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inher
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "NOTATION_NODE" with the proper type (11)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "nodeType" with the proper type (12)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "nodeName" with the proper type (13)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "baseURI" with the proper type (14)
FAIL Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "baseURI" with the proper type (14) assert_equals: expected "string" but got "object"
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "isConnected" with the proper type (15)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "ownerDocument" with the proper type (16)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "getRootNode" with the proper type (17)
......
This is a testharness.js-based test.
PASS createHTMLDocument test 0: "","",""
PASS createHTMLDocument test 1: null,"null","null"
PASS createHTMLDocument test 2: undefined,undefined,""
PASS createHTMLDocument test 3: "foo bar baz","foo bar baz","foo bar baz"
PASS createHTMLDocument test 4: "foo\t\tbar baz","foo\t\tbar baz","foo bar baz"
PASS createHTMLDocument test 5: "foo\n\nbar baz","foo\n\nbar baz","foo bar baz"
PASS createHTMLDocument test 6: "foo\f\fbar baz","foo\f\fbar baz","foo bar baz"
PASS createHTMLDocument test 7: "foo\r\rbar baz","foo\r\rbar baz","foo bar baz"
PASS Missing title argument
FAIL createHTMLDocument(): metadata assert_equals: expected "about:blank" but got ""
PASS createHTMLDocument(): characterSet aliases
PASS createHTMLDocument(): URL parsing
Harness: the test ran to completion.
......@@ -130,7 +130,7 @@ PASS createElementNS HTML
PASS createElementNS non-HTML
PASS createProcessingInstruction
PASS implementation.createDocumentType
FAIL implementation.createDocument assert_equals: expected "null" but got "http://web-platform.test:8001"
FAIL implementation.createDocument assert_equals: expected "about:blank" but got ""
PASS implementation.createHTMLDocument
PASS node with children
Harness: the test ran to completion.
......
This test setting various attributes of documents to JavaScript null.
TEST SUCCEEDED: Got the expected exception (9). [tested Document.xmlVersion]
TEST SUCCEEDED: The value was the string 'about:blank'. [tested Document.documentURI]
TEST SUCCEEDED: The value was null. [tested Document.documentURI]
TEST SUCCEEDED: The value was the string 'UTF-8'. [tested Document.charset]
TEST SUCCEEDED: The value was the string 'UTF-8'. [tested Document.characterSet]
TEST SUCCEEDED: The value was the string 'UTF-8'. [tested Document.inputEncoding]
......
......@@ -67,7 +67,7 @@
docToUse: xmlDoc,
attributes: [
{name: 'xmlVersion', expectedExceptionCode: 9},
{name: 'documentURI', expectedNull: 'about:blank'},
{name: 'documentURI', expectedNull: null},
{name: 'charset', expectedNull: 'UTF-8'},
{name: 'characterSet', expectedNull: 'UTF-8'},
{name: 'inputEncoding', expectedNull: 'UTF-8'},
......
......@@ -23,15 +23,15 @@ PASS testWindow.location.hash = 'h' is 'h'
PASS testWindow.location.assign('data:text/plain,i') is undefined
PASS testWindow.location.replace('data:text/plain,j') is undefined
PASS testWindow.location.reload() is undefined
PASS testWindow.location.toString() is 'about:blank#h'
PASS testWindow.location.href is 'about:blank#h'
PASS testWindow.location.toString() is 'about:blank'
PASS testWindow.location.href is 'about:blank'
PASS testWindow.location.protocol is 'about:'
PASS testWindow.location.host is ''
PASS testWindow.location.hostname is ''
PASS testWindow.location.port is ''
PASS testWindow.location.pathname is 'blank'
PASS testWindow.location.search is ''
PASS testWindow.location.hash is '#h'
PASS testWindow.location.hash is ''
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -41,15 +41,15 @@ shouldBe("testWindow.location.assign('data:text/plain,i')", "undefined");
shouldBe("testWindow.location.replace('data:text/plain,j')", "undefined");
shouldBe("testWindow.location.reload()", "undefined");
shouldBe("testWindow.location.toString()", "'about:blank#h'");
shouldBe("testWindow.location.href", "'about:blank#h'");
shouldBe("testWindow.location.toString()", "'about:blank'");
shouldBe("testWindow.location.href", "'about:blank'");
shouldBe("testWindow.location.protocol", "'about:'");
shouldBe("testWindow.location.host", "''"); // Firefox throws an exception
shouldBe("testWindow.location.hostname", "''"); // Firefox throws an exception
shouldBe("testWindow.location.port", "''");
shouldBe("testWindow.location.pathname", "'blank'"); // Firefox returns the empty string
shouldBe("testWindow.location.search", "''");
shouldBe("testWindow.location.hash", "'#h'");
shouldBe("testWindow.location.hash", "''");
testWindow.close();
......
This is a testharness.js-based test.
Found 1609 tests; 1427 PASS, 182 FAIL, 0 TIMEOUT, 0 NOTRUN.
Found 1609 tests; 1423 PASS, 186 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS Event interface: existence and properties of interface object
PASS Event interface object length
PASS Event interface object name
......@@ -411,7 +411,7 @@ PASS XMLDocument must be primary interface of xmlDoc
PASS Stringification of xmlDoc
PASS Document interface: xmlDoc must inherit property "implementation" with the proper type (0)
PASS Document interface: xmlDoc must inherit property "URL" with the proper type (1)
PASS Document interface: xmlDoc must inherit property "documentURI" with the proper type (2)
FAIL Document interface: xmlDoc must inherit property "documentURI" with the proper type (2) assert_equals: expected "string" but got "object"
PASS Document interface: xmlDoc must inherit property "origin" with the proper type (3)
PASS Document interface: xmlDoc must inherit property "compatMode" with the proper type (4)
PASS Document interface: xmlDoc must inherit property "characterSet" with the proper type (5)
......@@ -482,7 +482,7 @@ PASS Node interface: xmlDoc must inherit property "DOCUMENT_FRAGMENT_NODE" with
PASS Node interface: xmlDoc must inherit property "NOTATION_NODE" with the proper type (11)
PASS Node interface: xmlDoc must inherit property "nodeType" with the proper type (12)
PASS Node interface: xmlDoc must inherit property "nodeName" with the proper type (13)
PASS Node interface: xmlDoc must inherit property "baseURI" with the proper type (14)
FAIL Node interface: xmlDoc must inherit property "baseURI" with the proper type (14) assert_equals: expected "string" but got "object"
PASS Node interface: xmlDoc must inherit property "isConnected" with the proper type (15)
PASS Node interface: xmlDoc must inherit property "ownerDocument" with the proper type (16)
PASS Node interface: xmlDoc must inherit property "getRootNode" with the proper type (17)
......@@ -893,7 +893,7 @@ PASS Node interface: element must inherit property "DOCUMENT_FRAGMENT_NODE" with
PASS Node interface: element must inherit property "NOTATION_NODE" with the proper type (11)
PASS Node interface: element must inherit property "nodeType" with the proper type (12)
PASS Node interface: element must inherit property "nodeName" with the proper type (13)
PASS Node interface: element must inherit property "baseURI" with the proper type (14)
FAIL Node interface: element must inherit property "baseURI" with the proper type (14) assert_equals: expected "string" but got "object"
PASS Node interface: element must inherit property "isConnected" with the proper type (15)
PASS Node interface: element must inherit property "ownerDocument" with the proper type (16)
PASS Node interface: element must inherit property "getRootNode" with the proper type (17)
......@@ -1213,7 +1213,7 @@ PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inher
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "NOTATION_NODE" with the proper type (11)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "nodeType" with the proper type (12)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "nodeName" with the proper type (13)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "baseURI" with the proper type (14)
FAIL Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "baseURI" with the proper type (14) assert_equals: expected "string" but got "object"
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "isConnected" with the proper type (15)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "ownerDocument" with the proper type (16)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "getRootNode" with the proper type (17)
......
This is a testharness.js-based test.
Found 1609 tests; 1427 PASS, 182 FAIL, 0 TIMEOUT, 0 NOTRUN.
Found 1609 tests; 1423 PASS, 186 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS Event interface: existence and properties of interface object
PASS Event interface object length
PASS Event interface object name
......@@ -411,7 +411,7 @@ PASS XMLDocument must be primary interface of xmlDoc
PASS Stringification of xmlDoc
PASS Document interface: xmlDoc must inherit property "implementation" with the proper type (0)
PASS Document interface: xmlDoc must inherit property "URL" with the proper type (1)
PASS Document interface: xmlDoc must inherit property "documentURI" with the proper type (2)
FAIL Document interface: xmlDoc must inherit property "documentURI" with the proper type (2) assert_equals: expected "string" but got "object"
PASS Document interface: xmlDoc must inherit property "origin" with the proper type (3)
PASS Document interface: xmlDoc must inherit property "compatMode" with the proper type (4)
PASS Document interface: xmlDoc must inherit property "characterSet" with the proper type (5)
......@@ -482,7 +482,7 @@ PASS Node interface: xmlDoc must inherit property "DOCUMENT_FRAGMENT_NODE" with
PASS Node interface: xmlDoc must inherit property "NOTATION_NODE" with the proper type (11)
PASS Node interface: xmlDoc must inherit property "nodeType" with the proper type (12)
PASS Node interface: xmlDoc must inherit property "nodeName" with the proper type (13)
PASS Node interface: xmlDoc must inherit property "baseURI" with the proper type (14)
FAIL Node interface: xmlDoc must inherit property "baseURI" with the proper type (14) assert_equals: expected "string" but got "object"
PASS Node interface: xmlDoc must inherit property "isConnected" with the proper type (15)
PASS Node interface: xmlDoc must inherit property "ownerDocument" with the proper type (16)
PASS Node interface: xmlDoc must inherit property "getRootNode" with the proper type (17)
......@@ -893,7 +893,7 @@ PASS Node interface: element must inherit property "DOCUMENT_FRAGMENT_NODE" with
PASS Node interface: element must inherit property "NOTATION_NODE" with the proper type (11)
PASS Node interface: element must inherit property "nodeType" with the proper type (12)
PASS Node interface: element must inherit property "nodeName" with the proper type (13)
PASS Node interface: element must inherit property "baseURI" with the proper type (14)
FAIL Node interface: element must inherit property "baseURI" with the proper type (14) assert_equals: expected "string" but got "object"
PASS Node interface: element must inherit property "isConnected" with the proper type (15)
PASS Node interface: element must inherit property "ownerDocument" with the proper type (16)
PASS Node interface: element must inherit property "getRootNode" with the proper type (17)
......@@ -1213,7 +1213,7 @@ PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inher
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "NOTATION_NODE" with the proper type (11)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "nodeType" with the proper type (12)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "nodeName" with the proper type (13)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "baseURI" with the proper type (14)
FAIL Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "baseURI" with the proper type (14) assert_equals: expected "string" but got "object"
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "isConnected" with the proper type (15)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "ownerDocument" with the proper type (16)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "getRootNode" with the proper type (17)
......
This is a testharness.js-based test.
Found 1609 tests; 1427 PASS, 182 FAIL, 0 TIMEOUT, 0 NOTRUN.
Found 1609 tests; 1423 PASS, 186 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS Event interface: existence and properties of interface object
PASS Event interface object length
PASS Event interface object name
......@@ -411,7 +411,7 @@ PASS XMLDocument must be primary interface of xmlDoc
PASS Stringification of xmlDoc
PASS Document interface: xmlDoc must inherit property "implementation" with the proper type (0)
PASS Document interface: xmlDoc must inherit property "URL" with the proper type (1)
PASS Document interface: xmlDoc must inherit property "documentURI" with the proper type (2)
FAIL Document interface: xmlDoc must inherit property "documentURI" with the proper type (2) assert_equals: expected "string" but got "object"
PASS Document interface: xmlDoc must inherit property "origin" with the proper type (3)
PASS Document interface: xmlDoc must inherit property "compatMode" with the proper type (4)
PASS Document interface: xmlDoc must inherit property "characterSet" with the proper type (5)
......@@ -482,7 +482,7 @@ PASS Node interface: xmlDoc must inherit property "DOCUMENT_FRAGMENT_NODE" with
PASS Node interface: xmlDoc must inherit property "NOTATION_NODE" with the proper type (11)
PASS Node interface: xmlDoc must inherit property "nodeType" with the proper type (12)
PASS Node interface: xmlDoc must inherit property "nodeName" with the proper type (13)
PASS Node interface: xmlDoc must inherit property "baseURI" with the proper type (14)
FAIL Node interface: xmlDoc must inherit property "baseURI" with the proper type (14) assert_equals: expected "string" but got "object"
PASS Node interface: xmlDoc must inherit property "isConnected" with the proper type (15)
PASS Node interface: xmlDoc must inherit property "ownerDocument" with the proper type (16)
PASS Node interface: xmlDoc must inherit property "getRootNode" with the proper type (17)
......@@ -893,7 +893,7 @@ PASS Node interface: element must inherit property "DOCUMENT_FRAGMENT_NODE" with
PASS Node interface: element must inherit property "NOTATION_NODE" with the proper type (11)
PASS Node interface: element must inherit property "nodeType" with the proper type (12)
PASS Node interface: element must inherit property "nodeName" with the proper type (13)
PASS Node interface: element must inherit property "baseURI" with the proper type (14)
FAIL Node interface: element must inherit property "baseURI" with the proper type (14) assert_equals: expected "string" but got "object"
PASS Node interface: element must inherit property "isConnected" with the proper type (15)
PASS Node interface: element must inherit property "ownerDocument" with the proper type (16)
PASS Node interface: element must inherit property "getRootNode" with the proper type (17)
......@@ -1213,7 +1213,7 @@ PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inher
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "NOTATION_NODE" with the proper type (11)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "nodeType" with the proper type (12)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "nodeName" with the proper type (13)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "baseURI" with the proper type (14)
FAIL Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "baseURI" with the proper type (14) assert_equals: expected "string" but got "object"
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "isConnected" with the proper type (15)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "ownerDocument" with the proper type (16)
PASS Node interface: xmlDoc.createProcessingInstruction("abc", "def") must inherit property "getRootNode" with the proper type (17)
......
......@@ -1444,10 +1444,8 @@ class CORE_EXPORT Document : public ContainerNode,
bool m_wellFormed;
// Document URLs.
KURL m_url = blankURL(); // Document.URL: The URL from which this document
// was retrieved.
KURL m_baseURL =
blankURL(); // Node.baseURI: The URL to use when resolving relative URLs.
KURL m_url; // Document.URL: The URL from which this document was retrieved.
KURL m_baseURL; // Node.baseURI: The URL to use when resolving relative URLs.
KURL m_baseURLOverride; // An alternative base URL that takes precedence over
// m_baseURL (but not m_baseElementURL).
KURL m_baseElementURL; // The URL set by the <base> element.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment