Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XPath: Add XPathNSResolver callback interface tests #22384

Conversation

@shvaikalesh
Copy link
Member

@shvaikalesh shvaikalesh commented Mar 22, 2020

See also #15105, #18390.

@annevk
annevk approved these changes Mar 24, 2020
Copy link
Member

@annevk annevk left a comment

This looks reasonable to me. Did you file bugs on all failures here or are there no failures for the XPath bits?

@shvaikalesh
Copy link
Member Author

@shvaikalesh shvaikalesh commented Mar 24, 2020

Firefox implements callback interface properly, but throws SyntaxError instead of NamespaceError (like Safari and Chrome do). I did not manage to find exact error type in the spec though.

Both Safari and Chrome try to call "lookupNamespaceURI" method first, instead of checking if resolver is a function. They also make errors from abrupt completions visible to a developer, but not via "error" event like Firefox does.

Bugs:

@annevk
Copy link
Member

@annevk annevk commented Mar 25, 2020

https://dom.spec.whatwg.org/#xpath is all the specification we have at the moment. If you're interested in writing algorithms in English, that could be a fun project to work on.

Appreciate you filing all those bugs by the way!

@annevk annevk merged commit ee44ef0 into web-platform-tests:master Mar 25, 2020
10 checks passed
10 checks passed
wpt.fyi - safari[experimental] Safari results
Details
Azure Pipelines Build #20200322.6 succeeded
Details
Azure Pipelines (./wpt test-jobs) ./wpt test-jobs succeeded
Details
Azure Pipelines (affected tests without changes: Safari Technology Preview) affected tests without changes: Safari Technology Preview succeeded
Details
Azure Pipelines (affected tests: Safari Technology Preview) affected tests: Safari Technology Preview succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests) wpt.fyi hook: safari-preview-affected-tests succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests-without-changes) wpt.fyi hook: safari-preview-affected-tests-without-changes succeeded
Details
Community-TC (pull_request) TaskGroup: success
Details
wpt.fyi - chrome[experimental] Chrome results
Details
wpt.fyi - firefox[experimental] Firefox results
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.