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

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-namedItem.html

Issue 1453993002: update-w3c-deps import using blink cc6d84edb87e89c363ab48dac8a983213b9dc02c: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Skip imported/web-platform-tests/html/webappapis/scripting/events/onerroreventhandler.html Created 5 years, 1 month 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/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-namedItem.html
diff --git a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-namedItem.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-namedItem.html
index 7a4092ef356bb45a9480cca01cede1ac916e49b0..dc73dd4c185818e1140727b237cb5e46d2c68d06 100644
--- a/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-namedItem.html
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/semantics/forms/the-select-element/common-HTMLOptionsCollection-namedItem.html
@@ -5,6 +5,8 @@
<title id='title'>HTMLOptionsCollection</title>
<script src="../../../../../../resources/testharness.js"></script>
<script src="../../../../../../resources/testharnessreport.js"></script>
+</head>
+<body>
<div id="log"></div>
<select id="selly">
<option id="id1" name="name1">1</option>
@@ -37,26 +39,16 @@ test(function () {
}, "if no item has a name or id value matching the parameter, return null and stop");
test(function () {
- var testarr = [];
- for (var i = 0; i < selly.namedItem('id3').length; i++) {
- testarr.push(selly.namedItem('id3')[i].text);
- }
- assert_array_equals(testarr, ['3','duplicate ID']);
-}, "return an HTMLOptionsCollection in correct order for repeated 'id' value");
+ assert_equals(selly.namedItem('id3')["value"], "3");
+}, "if multiple items have a name or *id* value matching the parameter, return the first object and stop");
test(function () {
- var testarr = [];
- for (var i = 0; i < selly.namedItem('name4').length; i++) {
- testarr.push(selly.namedItem('name4')[i].text);
- }
- assert_array_equals(testarr, ['4', 'duplicate name']);
-}, "return an HTMLOptionsCollection in correct order for repeated 'name' value");
+ assert_equals(selly.namedItem('name4')["value"], "4");
+}, "if multiple items have a *name* or id value matching the parameter, return the first object and stop");
test(function () {
- var testarr = [];
- for (var i = 0; i < selly.namedItem('mixed1').length; i++) {
- testarr.push(selly.namedItem('mixed1')[i].text);
- }
- assert_array_equals(testarr, ['mixed ID', 'mixed name']);
-}, "return an HTMLOptionsCollection in correct order for repeated mixed value");
+ assert_equals(selly.namedItem('mixed1')["value"], "mixed ID");
+}, "if multiple items have a *name* or *id* value matching the parameter, return the first object and stop");
</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698