Commit 9534d27a authored by Quinten Yearsley's avatar Quinten Yearsley Committed by Commit Bot

Un-skip wpt domxpath/001.html and domxpath/002.html.

NOEXPORT=true

Change-Id: I77d93dbb734848f88ce03c21a57db3ed6fe99588
Reviewed-on: https://chromium-review.googlesource.com/449027Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#455790}
parent f197528d
...@@ -1824,6 +1824,8 @@ crbug.com/695270 [ Linux ] external/csswg-test/css-writing-modes-3/overconstrain ...@@ -1824,6 +1824,8 @@ crbug.com/695270 [ Linux ] external/csswg-test/css-writing-modes-3/overconstrain
crbug.com/695270 [ Linux ] external/csswg-test/css-writing-modes-3/overconstrained-rel-pos-rtl-top-bottom-vlr-007.xht [ Failure ] crbug.com/695270 [ Linux ] external/csswg-test/css-writing-modes-3/overconstrained-rel-pos-rtl-top-bottom-vlr-007.xht [ Failure ]
crbug.com/695270 [ Linux ] external/csswg-test/css-writing-modes-3/overconstrained-rel-pos-rtl-top-bottom-vrl-006.xht [ Failure ] crbug.com/695270 [ Linux ] external/csswg-test/css-writing-modes-3/overconstrained-rel-pos-rtl-top-bottom-vrl-006.xht [ Failure ]
crbug.com/626703 external/wpt/domxpath/001.html [ Failure ]
# ====== New tests from w3c-test-autoroller added here ====== # ====== New tests from w3c-test-autoroller added here ======
crbug.com/626703 [ Android Win10 ] external/wpt/fullscreen/api/document-exit-fullscreen-nested-in-iframe-manual.html [ Timeout ] crbug.com/626703 [ Android Win10 ] external/wpt/fullscreen/api/document-exit-fullscreen-nested-in-iframe-manual.html [ Timeout ]
crbug.com/626703 external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/utf-16be.html [ Timeout ] crbug.com/626703 external/wpt/html/infrastructure/urls/resolving-urls/query-encoding/utf-16be.html [ Timeout ]
......
...@@ -661,10 +661,6 @@ external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_p ...@@ -661,10 +661,6 @@ external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_p
external/wpt/html/semantics/forms/form-submission-0/url-encoded.html [ Skip ] external/wpt/html/semantics/forms/form-submission-0/url-encoded.html [ Skip ]
external/wpt/svg/linking/scripted [ Skip ] external/wpt/svg/linking/scripted [ Skip ]
# They have a wrong encoding, and test_parser.py throws UnicodeEncodeError.
external/wpt/domxpath/001.html [ Skip ]
external/wpt/domxpath/002.html [ Skip ]
# This test depends on a support file with non-LF new lines, which # This test depends on a support file with non-LF new lines, which
# causes a patch error in the bot_update step when importing this test. # causes a patch error in the bot_update step when importing this test.
crbug.com/691107 external/wpt/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/001.html [ Skip ] crbug.com/691107 external/wpt/webvtt/webvtt-file-format-parsing/webvtt-file-parsing/001.html [ Skip ]
......
<!doctype html>
<meta charset="utf8">
<title>XPath in text/html: elements</title>
<link rel="help" href="http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#Interfaces">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<div id="log"><span></span></div>
<div><span></span></div>
<dØdd></dØdd>
<svg>
<path />
<path />
</svg>
<script>
function test_xpath_succeeds(path, expected, resolver) {
resolver = resolver ? resolver : null;
var res = document.evaluate(path, document, resolver, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
actual = [];
for (var i=0;;i++) {
var node = res.snapshotItem(i);
if (node === null) {
break;
}
actual.push(node);
}
assert_array_equals(actual, expected);
}
function test_xpath_throws(path, error_code, resolver) {
resolver = resolver ? resolver : null;
assert_throws(error_code, function() {document.evaluate(path, document, resolver, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)})
}
function ns_resolver(x) {
map = {"html":"http://www.w3.org/1999/xhtml",
"svg":"http://www.w3.org/2000/svg",
"math":"http://www.w3.org/1998/Math/MathML"};
var rv = map.hasOwnProperty(x) ? map[x] : null;
return rv;
}
generate_tests(test_xpath_succeeds,[
["HTML elements no namespace prefix", "//div", document.getElementsByTagName("div")],
["HTML elements namespace prefix", "//html:div", document.getElementsByTagName("div"), ns_resolver],
["HTML elements mixed use of prefix", "//html:div/span", document.getElementsByTagName("span"), ns_resolver],
["SVG elements no namespace prefix", "//path", []],
["SVG elements namespace prefix", "//svg:path", document.getElementsByTagName("path"), ns_resolver],
["HTML elements mixed case", "//DiV", document.getElementsByTagName("div")],
["SVG elements mixed case selector", "//svg:PatH", [], ns_resolver],
["Non-ascii HTML element", "//dØdd", document.getElementsByTagName("dØdd"), ns_resolver],
["Non-ascii HTML element2", "//dødd", [], ns_resolver],
["Non-ascii HTML element3", "//DØDD", document.getElementsByTagName("dØdd"), ns_resolver]
])
generate_tests(test_xpath_throws, [
["Throw with invalid prefix", "//invalid:path", "NAMESPACE_ERR"],
])
</script>
This is a testharness.js-based test.
PASS Select html element based on attribute
FAIL Select html element based on attribute mixed case assert_array_equals: lengths differ, expected 1 got 0
PASS Select both HTML and SVG elements based on attribute
PASS Select HTML element with non-ascii attribute 1
PASS Select HTML element with non-ascii attribute 2
FAIL Select HTML element with non-ascii attribute 3 assert_array_equals: lengths differ, expected 1 got 0
PASS Select SVG element based on mixed case attribute
FAIL Select both HTML and SVG elements based on mixed case attribute assert_array_equals: lengths differ, expected 1 got 0
PASS Select SVG elements with refX attribute
PASS Select SVG elements with refX attribute incorrect case
PASS Select SVG elements with refX attribute lowercase
PASS Select SVG element with non-ascii attribute 1
PASS Select SVG element with non-ascii attribute 2
PASS xmlns attribute
PASS svg element with XLink attribute
Harness: the test ran to completion.
<!doctype html>
<meta charset="utf8">
<title>XPath in text/html: attributes</title>
<link rel="help" href="http://www.w3.org/TR/DOM-Level-3-XPath/xpath.html#Interfaces">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<div id="log" nonÄsciiAttribute><span></span></div>
<svg xmlns="http://www.w3.org/2000/svg", xmlns:xlink="http://www.w3.org/1999/xlink">
<path id="a" refx />
<path id="b" nonÄscii xlink:href />
</svg>
<script>
function test_xpath_succeeds(path, expected, resolver) {
resolver = resolver ? resolver : null;
var res = document.evaluate(path, document, resolver, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
actual = [];
for (var i=0;;i++) {
var node = res.snapshotItem(i);
if (node === null) {
break;
}
actual.push(node);
}
assert_array_equals(actual, expected);
}
function test_xpath_throws(path, error_code, resolver) {
resolver = resolver ? resolver : null;
assert_throws(error_code, function() {document.evaluate(path, document, resolver, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null)})
}
function ns_resolver(x) {
map = {"html":"http://www.w3.org/1999/xhtml",
"svg":"http://www.w3.org/2000/svg",
"math":"http://www.w3.org/1998/Math/MathML",
"xlink":"http://www.w3.org/1999/xlink"};
var rv = map.hasOwnProperty(x) ? map[x] : null;
return rv;
}
generate_tests(test_xpath_succeeds,[
["Select html element based on attribute", "//div[@id='log']", [document.getElementById("log")]],
["Select html element based on attribute mixed case", "//div[@Id='log']", [document.getElementById("log")]],
["Select both HTML and SVG elements based on attribute", "//*[@id]", [document.getElementById("log")].concat(Array.prototype.slice.call(document.getElementsByTagName("path")))],
["Select HTML element with non-ascii attribute 1", "//*[@nonÄsciiattribute]", [document.getElementById("log")]],
["Select HTML element with non-ascii attribute 2", "//*[@nonäsciiattribute]", []],
["Select HTML element with non-ascii attribute 3", "//*[@nonÄsciiAttribute]", [document.getElementById("log")]],
["Select SVG element based on mixed case attribute", "//svg:path[@Id]", [], ns_resolver],
["Select both HTML and SVG elements based on mixed case attribute", "//*[@Id]", [document.getElementById("log")]],
["Select SVG elements with refX attribute", "//*[@refX]", [document.getElementById("a")]],
["Select SVG elements with refX attribute incorrect case", "//*[@Refx]", []],
["Select SVG elements with refX attribute lowercase", "//*[@refx]", []],
["Select SVG element with non-ascii attribute 1", "//*[@nonÄscii]", [document.getElementById("b")]],
["Select SVG element with non-ascii attribute 2", "//*[@nonäscii]", []],
["xmlns attribute", "//*[@xmlns]", []],
["svg element with XLink attribute", "//*[@xlink:href]", [document.getElementById("b")], ns_resolver]
])
</script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment