Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(471)

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/Element/script-tests/getAttribute-check-case-sensitivity.js

Issue 2667393002: Stop using script-tests in fast/dom/. (Closed)
Patch Set: . Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/dom/Element/script-tests/getAttribute-check-case-sensitivity.js
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Element/script-tests/getAttribute-check-case-sensitivity.js b/third_party/WebKit/LayoutTests/fast/dom/Element/script-tests/getAttribute-check-case-sensitivity.js
deleted file mode 100644
index a02a1bdb9785a56927713d51e7b3947332142061..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/fast/dom/Element/script-tests/getAttribute-check-case-sensitivity.js
+++ /dev/null
@@ -1,141 +0,0 @@
-description(
-"<p>This file test the behaviour of getAttribute with regard to case.</p><p>See Bug 20247: setAttributeNode() does not work when attribute name has a capital letter in it</p>"
-);
-
-function testGetAttributeCaseInsensitive()
-{
- var div = document.createElement('div');
- div.setAttribute("mixedCaseAttrib", "x");
-
- // Do original case lookup, and lowercase lookup.
- return div.getAttribute("mixedcaseattrib");
-}
-
-shouldBe("testGetAttributeCaseInsensitive()", '"x"');
-
-function testGetAttributeNodeMixedCase()
-{
- var div = document.createElement('div');
- var a = div.ownerDocument.createAttribute("mixedCaseAttrib");
- a.value = "x";
- div.setAttributeNode(a);
- return div.getAttribute("mixedCaseAttrib");
-}
-
-shouldBe("testGetAttributeNodeMixedCase()", '"x"');
-
-function testGetAttributeNodeLowerCase(div)
-{
- var div = document.createElement('div');
- var a = div.ownerDocument.createAttribute("lowercaseattrib");
- a.value = "x";
- div.setAttributeNode(a);
- return div.getAttribute("lowerCaseAttrib");
-}
-
-shouldBe("testGetAttributeNodeLowerCase()", '"x"');
-
-function testSetAttributeNodeKeepsRef(div)
-{
- var div = document.createElement('div');
- var a = div.ownerDocument.createAttribute("attrib_name");
- a.value = "0";
- div.setAttributeNode(a);
-
- // Mutate the attribute node.
- a.value = "1";
-
- return div.getAttribute("attrib_name");
-}
-
-shouldBe("testSetAttributeNodeKeepsRef()", '"1"');
-
-function testAttribNodeNamePreservesCase()
-{
- var div = document.createElement('div');
- var a = div.ownerDocument.createAttribute("A");
- a.value = "x";
- div.setAttributeNode(a);
-
- var result = [ a.name, a.nodeName ];
- return result.join(",");
-}
-
-shouldBe("testAttribNodeNamePreservesCase()", '"a,a"');
-
-
-function testAttribNodeNamePreservesCaseGetNode()
-{
- // getAttributeNode doesn't work on DIVs, use body element
- var body = document.body;
-
- var a = body.ownerDocument.createAttribute("A");
- a.value = "x";
-
- body.setAttributeNode(a);
-
- a = document.body.getAttributeNode("A");
- if (!a)
- return "FAIL";
-
- var result = [ a.name, a.nodeName ];
- return result.join(",");
-}
-
-shouldBe("testAttribNodeNamePreservesCaseGetNode()", '"a,a"');
-
-function testAttribNodeNamePreservesCaseGetNode2()
-{
- // getAttributeNode doesn't work on DIVs, use body element
- var body = document.body;
-
- var a = body.ownerDocument.createAttribute("B");
- a.value = "x";
-
- body.setAttributeNode(a);
-
- a = document.body.getAttributeNode("B");
- if (!a)
- return "FAIL";
-
- // Now create node second time -- this time case is preserved in FF!
- a = body.ownerDocument.createAttribute("B");
- a.value = "x";
- body.setAttributeNode(a);
-
- a = document.body.getAttributeNode("B");
-
- var result = [ a.name, a.nodeName ];
- return result.join(",");
-}
-
-shouldBe("testAttribNodeNamePreservesCaseGetNode2()", '"b,b"');
-
-function testAttribNodeNameGetMutate()
-{
- // getAttributeNode doesn't work on DIVs, use body element.
- var body = document.body;
-
- var a = body.ownerDocument.createAttribute("c");
- a.value = "0";
- body.setAttributeNode(a);
-
- a = document.body.getAttributeNode("c");
- a.value = "1";
-
- a = document.body.getAttributeNode("c");
-
- return a.value;
-}
-
-shouldBe("testAttribNodeNameGetMutate()", '"1"');
-
-var node = document.createElement("div");
-var attrib = document.createAttribute("myAttrib");
-attrib.value = "XXX";
-node.setAttributeNode(attrib);
-
-shouldBe("(new XMLSerializer).serializeToString(node)", '"<div xmlns=\\"http://www.w3.org/1999/xhtml\\" myattrib=\\"XXX\\"></div>"');
-shouldBe("node.getAttributeNode('myAttrib').name", '"myattrib"');
-shouldBe("node.getAttributeNode('myattrib').name", '"myattrib"');
-shouldBe("attrib.name", '"myattrib"');

Powered by Google App Engine
This is Rietveld 408576698