mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #25635 - pshaughn:urlmismatcherror, r=jdm
Implement URLMismatchError Nothing in current specifications actually throws this DOMException type, but the type exists in specs nonetheless, and adding it lets us check off a WPT test. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #25024 <!-- Either: --> - [X] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
271a30f22f
2 changed files with 3 additions and 11 deletions
|
@ -32,6 +32,7 @@ pub enum DOMErrorName {
|
||||||
NetworkError = DOMExceptionConstants::NETWORK_ERR,
|
NetworkError = DOMExceptionConstants::NETWORK_ERR,
|
||||||
AbortError = DOMExceptionConstants::ABORT_ERR,
|
AbortError = DOMExceptionConstants::ABORT_ERR,
|
||||||
TypeMismatchError = DOMExceptionConstants::TYPE_MISMATCH_ERR,
|
TypeMismatchError = DOMExceptionConstants::TYPE_MISMATCH_ERR,
|
||||||
|
URLMismatchError = DOMExceptionConstants::URL_MISMATCH_ERR,
|
||||||
QuotaExceededError = DOMExceptionConstants::QUOTA_EXCEEDED_ERR,
|
QuotaExceededError = DOMExceptionConstants::QUOTA_EXCEEDED_ERR,
|
||||||
TimeoutError = DOMExceptionConstants::TIMEOUT_ERR,
|
TimeoutError = DOMExceptionConstants::TIMEOUT_ERR,
|
||||||
InvalidNodeTypeError = DOMExceptionConstants::INVALID_NODE_TYPE_ERR,
|
InvalidNodeTypeError = DOMExceptionConstants::INVALID_NODE_TYPE_ERR,
|
||||||
|
@ -60,6 +61,7 @@ impl DOMErrorName {
|
||||||
"NetworkError" => Some(DOMErrorName::NetworkError),
|
"NetworkError" => Some(DOMErrorName::NetworkError),
|
||||||
"AbortError" => Some(DOMErrorName::AbortError),
|
"AbortError" => Some(DOMErrorName::AbortError),
|
||||||
"TypeMismatchError" => Some(DOMErrorName::TypeMismatchError),
|
"TypeMismatchError" => Some(DOMErrorName::TypeMismatchError),
|
||||||
|
"URLMismatchError" => Some(DOMErrorName::URLMismatchError),
|
||||||
"QuotaExceededError" => Some(DOMErrorName::QuotaExceededError),
|
"QuotaExceededError" => Some(DOMErrorName::QuotaExceededError),
|
||||||
"TimeoutError" => Some(DOMErrorName::TimeoutError),
|
"TimeoutError" => Some(DOMErrorName::TimeoutError),
|
||||||
"InvalidNodeTypeError" => Some(DOMErrorName::InvalidNodeTypeError),
|
"InvalidNodeTypeError" => Some(DOMErrorName::InvalidNodeTypeError),
|
||||||
|
@ -102,6 +104,7 @@ impl DOMException {
|
||||||
DOMErrorName::NetworkError => "A network error occurred.",
|
DOMErrorName::NetworkError => "A network error occurred.",
|
||||||
DOMErrorName::AbortError => "The operation was aborted.",
|
DOMErrorName::AbortError => "The operation was aborted.",
|
||||||
DOMErrorName::TypeMismatchError => "The given type does not match any expected type.",
|
DOMErrorName::TypeMismatchError => "The given type does not match any expected type.",
|
||||||
|
DOMErrorName::URLMismatchError => "The given URL does not match another URL.",
|
||||||
DOMErrorName::QuotaExceededError => "The quota has been exceeded.",
|
DOMErrorName::QuotaExceededError => "The quota has been exceeded.",
|
||||||
DOMErrorName::TimeoutError => "The operation timed out.",
|
DOMErrorName::TimeoutError => "The operation timed out.",
|
||||||
DOMErrorName::InvalidNodeTypeError => {
|
DOMErrorName::InvalidNodeTypeError => {
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
[DOMException-constructor-behavior.any.worker.html]
|
|
||||||
type: testharness
|
|
||||||
[new DOMexception("msg", "URLMismatchError")]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
|
|
||||||
[DOMException-constructor-behavior.any.html]
|
|
||||||
type: testharness
|
|
||||||
[new DOMexception("msg", "URLMismatchError")]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue