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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/attributes.html

Issue 1854003004: Import web-platform-tests@5a8700479d98852455bee6117558897867eb278a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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/imported/web-platform-tests/dom/nodes/attributes.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/attributes.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/attributes.html
index 574ab6d1c3f83da74c4e5fd2ef9259eb0ab53617..7b718c47cd41598775c1e4c901ae917993fe95d3 100644
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/attributes.html
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/dom/nodes/attributes.html
@@ -11,6 +11,11 @@
<div id="log"></div>
<span id="test1"></span>
<span class="&amp;&lt;&gt;foo"></span>
+<span id="test2">
+ <span ~=""></span>
+ <span ~></span>
+ <span></span>
+</span>
<script>
var XML = "http://www.w3.org/XML/1998/namespace"
var XMLNS = "http://www.w3.org/2000/xmlns/"
@@ -41,6 +46,16 @@ test(function() {
}
}, "When qualifiedName does not match the Name production, an " +
"INVALID_CHARACTER_ERR exception is to be thrown. (setAttribute)")
+test(function() {
+ var el = document.getElementById("test2")
+ for (var i = 0; i < el.children.length; i++) {
+ assert_throws("INVALID_CHARACTER_ERR", function() {
+ el.children[i].setAttribute("~", "test")
+ })
+ }
+}, "When qualifiedName does not match the Name production, an " +
+ "INVALID_CHARACTER_ERR exception is to be thrown, even if the attribute " +
+ "is already present. (setAttribute)")
// Step 2
test(function() {
@@ -117,6 +132,17 @@ test(function() {
}, "When qualifiedName does not match the Name production, an " +
"INVALID_CHARACTER_ERR exception is to be thrown. (setAttributeNS)")
+test(function() {
+ var el = document.getElementById("test2")
+ for (var i = 0; i < el.children.length; i++) {
+ assert_throws("INVALID_CHARACTER_ERR", function() {
+ el.children[i].setAttributeNS(null, "~", "test")
+ })
+ }
+}, "When qualifiedName does not match the Name production, an " +
+ "INVALID_CHARACTER_ERR exception is to be thrown, even if the attribute " +
+ "is already present. (setAttributeNS)")
+
// Step 2
test(function() {
var el = document.createElement("foo")
@@ -585,7 +611,7 @@ function getEnumerableOwnProps1(obj) {
function getEnumerableOwnProps2(obj) {
return Object.getOwnPropertyNames(obj).filter(
- (name) => Object.getOwnPropertyDescriptor(obj, name).enumerable)
+ function (name) { return Object.getOwnPropertyDescriptor(obj, name).enumerable; })
}
test(function() {

Powered by Google App Engine
This is Rietveld 408576698