summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests
diff options
context:
space:
mode:
authordglazkov@chromium.org <dglazkov@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2014-01-30 17:37:06 +0000
committerdglazkov@chromium.org <dglazkov@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2014-01-30 17:37:06 +0000
commit85d271d78742699a6b04d4ed526d021d53ea3e19 (patch)
tree8a3cc7a782c4a2628e60d6047f17329c92cd0d8f /third_party/WebKit/LayoutTests
parentf1e4e86317fd4eecfb83bf0dea0d021ae707c76c (diff)
downloadchromium_src-85d271d78742699a6b04d4ed526d021d53ea3e19.zip
chromium_src-85d271d78742699a6b04d4ed526d021d53ea3e19.tar.gz
chromium_src-85d271d78742699a6b04d4ed526d021d53ea3e19.tar.bz2
Revert 166088 "Have getElementsByClassName() / getElementsByTagN..."
Broke unit tests that were relying on Web* interfaces. For example: http://build.chromium.org/p/chromium.webkit/builders/Android%20Tests%20%28dbg%29/builds/17057/steps/chromiumtestshell_instrumentation_tests/logs/stdio > Have getElementsByClassName() / getElementsByTagName*() return an HTMLCollection > > Have getElementsByClassName() / getElementsByTagName*() return an HTMLCollection > instead of a NodeList, as per the specification: > http://dom.spec.whatwg.org/#document > http://dom.spec.whatwg.org/#element > > This behavior is consistent with Firefox 26 and IE 11. > > R=arv, haraken, tkent > BUG=235008 > > Review URL: https://codereview.chromium.org/143453010 TBR=ch.dumez@samsung.com Review URL: https://codereview.chromium.org/139203007 git-svn-id: svn://svn.chromium.org/blink/trunk@166141 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests')
-rw-r--r--third_party/WebKit/LayoutTests/fast/dom/getElementsByClassName/dumpNodeList.html2
-rw-r--r--third_party/WebKit/LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt2
-rw-r--r--third_party/WebKit/LayoutTests/fast/dom/script-tests/domListEnumeration.js2
-rw-r--r--third_party/WebKit/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js2
-rw-r--r--third_party/WebKit/LayoutTests/fast/dom/wrapper-classes-expected.txt6
-rw-r--r--third_party/WebKit/LayoutTests/fast/dom/wrapper-classes.html2
-rw-r--r--third_party/WebKit/LayoutTests/fast/js/constructor-expected.txt4
-rw-r--r--third_party/WebKit/LayoutTests/fast/js/getOwnPropertyDescriptor-expected.txt4
-rw-r--r--third_party/WebKit/LayoutTests/fast/js/script-tests/constructor.js6
-rw-r--r--third_party/WebKit/LayoutTests/inspector/console/console-format-collections-expected.txt8
10 files changed, 19 insertions, 19 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/dom/getElementsByClassName/dumpNodeList.html b/third_party/WebKit/LayoutTests/fast/dom/getElementsByClassName/dumpNodeList.html
index bbeb3e3..d4e68ac 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/getElementsByClassName/dumpNodeList.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/getElementsByClassName/dumpNodeList.html
@@ -14,7 +14,7 @@
document.getElementById("console").appendChild(item);
}
- HTMLCollection.prototype.dump = function()
+ NodeList.prototype.dump = function()
{
var result = "";
var i = 0;
diff --git a/third_party/WebKit/LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt
index 93a918f..9b634f7 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/dom/non-numeric-values-numeric-parameters-expected.txt
@@ -51,7 +51,7 @@ PASS nonNumericPolicy('document.createEvent("MouseEvent").initMouseEvent("a", fa
PASS nonNumericPolicy('document.createEvent("MouseEvent").initMouseEvent("a", false, false, null, 0, 0, 0, 0, 0, false, false, false, false, x, null)') is 'any type allowed'
PASS nonNumericPolicy('document.body.attributes.item(x)') is 'any type allowed'
PASS nonNumericPolicy('document.createNodeIterator(document, x, null, false)') is 'any type allowed'
-PASS nonNumericPolicy('document.getElementsByTagName("div").item(x)') is 'any type allowed'
+PASS nonNumericPolicy('document.getElementsByTagName("div").item(x)') is 'any type allowed (but not omitted)'
PASS nonNumericPolicy('document.createRange().setStart(document, x)') is 'any type allowed (but not omitted)'
PASS nonNumericPolicy('document.createRange().setEnd(document, x)') is 'any type allowed (but not omitted)'
PASS nonNumericPolicy('document.createRange().comparePoint(document, x)') is 'any type allowed (but not omitted)'
diff --git a/third_party/WebKit/LayoutTests/fast/dom/script-tests/domListEnumeration.js b/third_party/WebKit/LayoutTests/fast/dom/script-tests/domListEnumeration.js
index f229a53..b4adb2e 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/script-tests/domListEnumeration.js
+++ b/third_party/WebKit/LayoutTests/fast/dom/script-tests/domListEnumeration.js
@@ -94,7 +94,7 @@ setup();
var resultArray = new Array();
// NodeList
-var nodeList = document.querySelectorAll('ol');
+var nodeList = document.getElementsByTagName('ol');
resultArray = iterateList(nodeList);
shouldBe("resultArray.length", "5");
diff --git a/third_party/WebKit/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js b/third_party/WebKit/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js
index 158a5ac..4e638e2 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js
+++ b/third_party/WebKit/LayoutTests/fast/dom/script-tests/non-numeric-values-numeric-parameters.js
@@ -294,7 +294,7 @@ shouldBe("nonNumericPolicy('document.createNodeIterator(document, x, null, false
// NodeList
-shouldBe("nonNumericPolicy('document.getElementsByTagName(\"div\").item(x)')", "'any type allowed'");
+shouldBe("nonNumericPolicy('document.getElementsByTagName(\"div\").item(x)')", "'any type allowed (but not omitted)'");
// Range
diff --git a/third_party/WebKit/LayoutTests/fast/dom/wrapper-classes-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/wrapper-classes-expected.txt
index 4ec6e6c..a04b9c2 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/wrapper-classes-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/dom/wrapper-classes-expected.txt
@@ -32,10 +32,10 @@ PASS classString(document.createNodeIterator(root, 0, null, false)) is "NodeIter
FAIL classString(document.createNodeIterator(root, 0, null, false).__proto__) should be NodeIteratorPrototype. Was Object.
PASS classString(document.createNodeIterator(root, 0, null, false).constructor) is "Function"
PASS document.createNodeIterator(root, 0, null, false).constructor.name is "NodeIterator"
-PASS classString(document.getElementsByTagName('div')) is "HTMLCollection"
-FAIL classString(document.getElementsByTagName('div').__proto__) should be HTMLCollectionPrototype. Was Object.
+PASS classString(document.getElementsByTagName('div')) is "NodeList"
+FAIL classString(document.getElementsByTagName('div').__proto__) should be NodeListPrototype. Was Object.
PASS classString(document.getElementsByTagName('div').constructor) is "Function"
-PASS document.getElementsByTagName('div').constructor.name is "HTMLCollection"
+PASS document.getElementsByTagName('div').constructor.name is "NodeList"
PASS classString(document.createRange()) is "Range"
FAIL classString(document.createRange().__proto__) should be RangePrototype. Was Object.
PASS classString(document.createRange().constructor) is "Function"
diff --git a/third_party/WebKit/LayoutTests/fast/dom/wrapper-classes.html b/third_party/WebKit/LayoutTests/fast/dom/wrapper-classes.html
index 8d094f4..d9841be 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/wrapper-classes.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/wrapper-classes.html
@@ -84,7 +84,7 @@ function runTest()
test("document.implementation", "DOMImplementation");
test("root.attributes", "NamedNodeMap");
test("document.createNodeIterator(root, 0, null, false)", "NodeIterator");
- test("document.getElementsByTagName('div')", "HTMLCollection");
+ test("document.getElementsByTagName('div')", "NodeList");
test("document.createRange()", "Range");
test("document.createTextNode('')", "Text");
test("document.createTreeWalker(root, 0, null, false)", "TreeWalker");
diff --git a/third_party/WebKit/LayoutTests/fast/js/constructor-expected.txt b/third_party/WebKit/LayoutTests/fast/js/constructor-expected.txt
index 7259b68..ea1a4040 100644
--- a/third_party/WebKit/LayoutTests/fast/js/constructor-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/js/constructor-expected.txt
@@ -12,8 +12,8 @@ PASS window.document.body.constructor === window.HTMLBodyElement is true
PASS window.document.body.constructor.prototype === window.HTMLBodyElement.prototype is true
PASS window.document.body.constructor.prototype.__proto__ === window.HTMLBodyElement.prototype.__proto__ is true
PASS window.document.body.constructor.prototype.__proto__ === window.HTMLElement.prototype is true
-PASS htmlCollection.constructor === window.HTMLCollection is true
-PASS htmlCollection.constructor.prototype === window.HTMLCollection.prototype is true
+PASS nodeList.constructor === window.NodeList is true
+PASS nodeList.constructor.prototype === window.NodeList.prototype is true
PASS mutationEvent.constructor === window.MutationEvent is true
PASS mutationEvent.constructor.prototype.__proto__ === window.Event.prototype is true
PASS successfullyParsed is true
diff --git a/third_party/WebKit/LayoutTests/fast/js/getOwnPropertyDescriptor-expected.txt b/third_party/WebKit/LayoutTests/fast/js/getOwnPropertyDescriptor-expected.txt
index 7692b5aa..8a98c73 100644
--- a/third_party/WebKit/LayoutTests/fast/js/getOwnPropertyDescriptor-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/js/getOwnPropertyDescriptor-expected.txt
@@ -142,7 +142,7 @@ FAIL Object.getOwnPropertyDescriptor(global, 0).configurable should be false. Th
PASS Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 'length').value is 1
PASS Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 'length').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 'length').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 'length').enumerable is true
+FAIL Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 'length').enumerable should be true. Was false.
FAIL Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 'length').configurable should be false. Was true.
PASS Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 0).value is document.getElementsByTagName('div')[0]
PASS Object.getOwnPropertyDescriptor(document.getElementsByTagName('div'), 0).hasOwnProperty('get') is false
@@ -157,7 +157,7 @@ FAIL Object.getOwnPropertyDescriptor(document.getElementsByClassName('pass'), 0)
PASS Object.getOwnPropertyDescriptor(document.getElementsByClassName('pass'), 'length').value is document.getElementsByClassName('pass').length
PASS Object.getOwnPropertyDescriptor(document.getElementsByClassName('pass'), 'length').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(document.getElementsByClassName('pass'), 'length').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(document.getElementsByClassName('pass'), 'length').enumerable is true
+FAIL Object.getOwnPropertyDescriptor(document.getElementsByClassName('pass'), 'length').enumerable should be true. Was false.
FAIL Object.getOwnPropertyDescriptor(document.getElementsByClassName('pass'), 'length').configurable should be false. Was true.
PASS Object.getOwnPropertyDescriptor(select, 'length').value is select.length
PASS Object.getOwnPropertyDescriptor(select, 'length').hasOwnProperty('get') is false
diff --git a/third_party/WebKit/LayoutTests/fast/js/script-tests/constructor.js b/third_party/WebKit/LayoutTests/fast/js/script-tests/constructor.js
index 68a5726..28afa35 100644
--- a/third_party/WebKit/LayoutTests/fast/js/script-tests/constructor.js
+++ b/third_party/WebKit/LayoutTests/fast/js/script-tests/constructor.js
@@ -11,9 +11,9 @@ shouldBeTrue("window.document.body.constructor.prototype === window.HTMLBodyElem
shouldBeTrue("window.document.body.constructor.prototype.__proto__ === window.HTMLBodyElement.prototype.__proto__");
shouldBeTrue("window.document.body.constructor.prototype.__proto__ === window.HTMLElement.prototype");
-var htmlCollection = document.getElementsByTagName('script');
-shouldBeTrue("htmlCollection.constructor === window.HTMLCollection");
-shouldBeTrue("htmlCollection.constructor.prototype === window.HTMLCollection.prototype");
+var nodeList = document.getElementsByTagName('script');
+shouldBeTrue("nodeList.constructor === window.NodeList");
+shouldBeTrue("nodeList.constructor.prototype === window.NodeList.prototype");
var mutationEvent = document.createEvent("MutationEvent");
shouldBeTrue("mutationEvent.constructor === window.MutationEvent");
diff --git a/third_party/WebKit/LayoutTests/inspector/console/console-format-collections-expected.txt b/third_party/WebKit/LayoutTests/inspector/console/console-format-collections-expected.txt
index 6a59ade..620232d 100644
--- a/third_party/WebKit/LayoutTests/inspector/console/console-format-collections-expected.txt
+++ b/third_party/WebKit/LayoutTests/inspector/console/console-format-collections-expected.txt
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: line 15: [object HTMLCollection]
+CONSOLE MESSAGE: line 15: [object NodeList]
CONSOLE MESSAGE: line 19: [object HTMLCollection]
CONSOLE MESSAGE: line 23: [object HTMLOptionsCollection]
CONSOLE MESSAGE: line 27: undefined
@@ -7,7 +7,7 @@ CONSOLE MESSAGE: line 35: [object RadioNodeList]
CONSOLE MESSAGE: line 41: 1,2,
CONSOLE MESSAGE: line 44: [object Object]
CONSOLE MESSAGE: line 51: [object Arguments]
-CONSOLE MESSAGE: line 15: [object HTMLCollection]
+CONSOLE MESSAGE: line 15: [object NodeList]
CONSOLE MESSAGE: line 19: [object HTMLCollection]
CONSOLE MESSAGE: line 23: [object HTMLOptionsCollection]
CONSOLE MESSAGE: line 27: undefined
@@ -18,7 +18,7 @@ CONSOLE MESSAGE: line 44: [object Object]
CONSOLE MESSAGE: line 51: [object Arguments]
Tests that console nicely formats HTML Collections and NodeLists.
-HTMLCollection[1] console-format-collections.html:15
+NodeList[1] console-format-collections.html:15
HTMLCollection[3] console-format-collections.html:19
HTMLOptionsCollection[2] console-format-collections.html:23
HTMLAllCollection[14] console-format-collections.html:27
@@ -27,7 +27,7 @@ RadioNodeList[2] console-format-collections.html:35
Array[2] console-format-collections.html:41
NonArrayWithLength console-format-collections.html:44
Arguments[2] console-format-collections.html:51
-[select#sel, item: function, namedItem: function] console-format-collections.html:15
+[select#sel, item: function] console-format-collections.html:15
[script, script, script, item: function, namedItem: function] console-format-collections.html:19
[option, option, selectedIndex: 0, namedItem: function, add: function, remove: function, item: function] console-format-collections.html:23
[html, head, script, script, script, body, p, div, form#f, select#sel, option, option, input, input, item: function, namedItem: function, tags: function] console-format-collections.html:27