Bug 1213862 - Align nsString whitespace handling with web specs; r=froydnj

This commit is contained in:
Aryeh Gregor 2015-10-12 20:47:57 +03:00
parent 12fbf34022
commit b6446c639c
14 changed files with 3 additions and 94 deletions

View File

@ -38,8 +38,7 @@ function checkDoc(title, expectedtitle, normalizedtitle) {
}
isElement(doc.documentElement.lastChild, "body");
is(doc.documentElement.lastChild.childNodes.length, 0);
((!title || title.indexOf("\f") === -1) ? is : todo_is)
(doc.title, normalizedtitle);
is(doc.title, normalizedtitle);
doc.body.innerHTML = "foo";
is(doc.body.innerHTML, "foo", "innerHTML should work in HTML data documents!");
}

View File

@ -3,10 +3,7 @@
support-files =
[test_document.title-03.html.json]
[test_document.title-04.xhtml.json]
[test_document.title-06.html.json]
[test_document.title-07.html.json]
[test_nameditem-02.html.json]
[test_nameditem-03.html.json]
[test_nameditem-04.html.json]

View File

@ -1,3 +0,0 @@
{
" document.title and space normalization ": true
}

View File

@ -1,3 +0,0 @@
{
" document.title and space normalization ": true
}

View File

@ -1,3 +0,0 @@
{
"Document.title and DOMImplementation.createHTMLDocument 6": true
}

View File

@ -1,6 +0,0 @@
# THIS FILE IS AUTOGENERATED BY parseFailures.py - DO NOT EDIT
[DEFAULT]
support-files =
[test_option-text-spaces.html.json]

View File

@ -1,15 +0,0 @@
{
"option.text should strip leading space characters (\"\\f\")": true,
"option.text should strip trailing space characters (\"\\f\")": true,
"option.text should strip leading and trailing space characters (\"\\f\")": true,
"option.text should replace single internal space characters (\"\\f\")": true,
"option.text should replace multiple internal space characters (\" \", \"\\f\")": true,
"option.text should replace multiple internal space characters (\"\\t\", \"\\f\")": true,
"option.text should replace multiple internal space characters (\"\\n\", \"\\f\")": true,
"option.text should replace multiple internal space characters (\"\\f\", \" \")": true,
"option.text should replace multiple internal space characters (\"\\f\", \"\\t\")": true,
"option.text should replace multiple internal space characters (\"\\f\", \"\\n\")": true,
"option.text should replace multiple internal space characters (\"\\f\", \"\\f\")": true,
"option.text should replace multiple internal space characters (\"\\f\", \"\\r\")": true,
"option.text should replace multiple internal space characters (\"\\r\", \"\\f\")": true
}

View File

@ -24,7 +24,6 @@ MOCHITEST_MANIFESTS += [
'failures/html/html/dom/documents/dta/doc.gEBN/mochitest.ini',
'failures/html/html/dom/documents/dta/mochitest.ini',
'failures/html/html/obsolete/implreq/oeaaa/mochitest.ini',
'failures/html/html/semantics/forms/the-option-element/mochitest.ini',
'failures/html/html/semantics/forms/the-select-element/mochitest.ini',
'failures/html/html/semantics/scripting-1/the-script-element/mochitest.ini',
'failures/html/html/semantics/tabular-data/the-table-element/mochitest.ini',

View File

@ -1,5 +0,0 @@
[document.title-03.html]
type: testharness
[ document.title and space normalization ]
expected: FAIL

View File

@ -1,5 +0,0 @@
[document.title-04.xhtml]
type: testharness
[ document.title and space normalization ]
expected: FAIL

View File

@ -1,5 +0,0 @@
[document.title-07.html]
type: testharness
[createHTMLDocument test 6: "foo\\f\\fbar baz","foo\\f\\fbar baz","foo bar baz"]
expected: FAIL

View File

@ -1,41 +0,0 @@
[option-text-spaces.html]
type: testharness
[option.text should strip leading space characters ("\\f")]
expected: FAIL
[option.text should strip trailing space characters ("\\f")]
expected: FAIL
[option.text should strip leading and trailing space characters ("\\f")]
expected: FAIL
[option.text should replace single internal space characters ("\\f")]
expected: FAIL
[option.text should replace multiple internal space characters (" ", "\\f")]
expected: FAIL
[option.text should replace multiple internal space characters ("\\t", "\\f")]
expected: FAIL
[option.text should replace multiple internal space characters ("\\n", "\\f")]
expected: FAIL
[option.text should replace multiple internal space characters ("\\f", " ")]
expected: FAIL
[option.text should replace multiple internal space characters ("\\f", "\\t")]
expected: FAIL
[option.text should replace multiple internal space characters ("\\f", "\\n")]
expected: FAIL
[option.text should replace multiple internal space characters ("\\f", "\\f")]
expected: FAIL
[option.text should replace multiple internal space characters ("\\f", "\\r")]
expected: FAIL
[option.text should replace multiple internal space characters ("\\r", "\\f")]
expected: FAIL

View File

@ -540,7 +540,7 @@ StripChars2(char16_t* aString,uint32_t aLength,const char* aSet) {
/* ***** END RICKG BLOCK ***** */
static const char* kWhitespace="\b\t\r\n ";
static const char* kWhitespace="\f\t\r\n ";
// This function is used to implement FindCharInSet and friends
template <class CharT>

View File

@ -265,7 +265,7 @@ static bool test_replace()
return true;
}
static const char* kWhitespace="\b\t\r\n ";
static const char* kWhitespace="\f\t\r\n ";
static void
CompressWhitespace(nsACString &str)