diff options
13 files changed, 31 insertions, 19 deletions
diff --git a/components/script/dom/bindings/error.rs b/components/script/dom/bindings/error.rs index 3b179e85d1d..d38a55c31be 100644 --- a/components/script/dom/bindings/error.rs +++ b/components/script/dom/bindings/error.rs @@ -214,15 +214,16 @@ pub unsafe fn report_pending_exception(cx: *mut JSContext, dispatch_event: bool) JS_ClearPendingException(cx); let error_info = if value.is_object() { rooted!(in(cx) let object = value.to_object()); - let error_info = ErrorInfo::from_native_error(cx, object.handle()) - .or_else(|| ErrorInfo::from_dom_exception(object.handle())); - match error_info { - Some(error_info) => error_info, - None => { - error!("Uncaught exception: failed to extract information"); - return; - } - } + ErrorInfo::from_native_error(cx, object.handle()) + .or_else(|| ErrorInfo::from_dom_exception(object.handle())) + .unwrap_or_else(|| { + ErrorInfo { + message: format!("uncaught exception: unknown (can't convert to string)"), + filename: String::new(), + lineno: 0, + column: 0, + } + }) } else { match USVString::from_jsval(cx, value.handle(), ()) { Ok(ConversionResult::Success(USVString(string))) => { diff --git a/tests/wpt/metadata/XMLHttpRequest/send-usp.worker.js.ini b/tests/wpt/metadata/XMLHttpRequest/send-usp.worker.js.ini index fddbbbec6e4..9e5384b5c4b 100644 --- a/tests/wpt/metadata/XMLHttpRequest/send-usp.worker.js.ini +++ b/tests/wpt/metadata/XMLHttpRequest/send-usp.worker.js.ini @@ -1,3 +1,3 @@ [send-usp.worker.html] type: testharness - disabled: https://github.com/servo/servo/issues/12654
\ No newline at end of file + disabled: https://github.com/servo/servo/issues/12654 diff --git a/tests/wpt/metadata/dom/events/AddEventListenerOptions-passive.html.ini b/tests/wpt/metadata/dom/events/AddEventListenerOptions-passive.html.ini index 5a7b0d1a781..552da8a11ef 100644 --- a/tests/wpt/metadata/dom/events/AddEventListenerOptions-passive.html.ini +++ b/tests/wpt/metadata/dom/events/AddEventListenerOptions-passive.html.ini @@ -1,6 +1,7 @@ [AddEventListenerOptions-passive.html] type: testharness bug: https://github.com/servo/servo/issues/13243 + expected: ERROR [Supports passive option on addEventListener only] expected: FAIL diff --git a/tests/wpt/metadata/fetch/api/headers/headers-idl.html.ini b/tests/wpt/metadata/fetch/api/headers/headers-idl.html.ini index 5a6cbcf6505..0dcbdbf0434 100644 --- a/tests/wpt/metadata/fetch/api/headers/headers-idl.html.ini +++ b/tests/wpt/metadata/fetch/api/headers/headers-idl.html.ini @@ -1,3 +1,3 @@ [headers-idl.html] type: testharness - expected: TIMEOUT + expected: ERROR diff --git a/tests/wpt/metadata/fetch/api/request/request-idl.html.ini b/tests/wpt/metadata/fetch/api/request/request-idl.html.ini index 185322453ef..7bb88b0081d 100644 --- a/tests/wpt/metadata/fetch/api/request/request-idl.html.ini +++ b/tests/wpt/metadata/fetch/api/request/request-idl.html.ini @@ -1,3 +1,3 @@ [request-idl.html] type: testharness - expected: TIMEOUT + expected: ERROR diff --git a/tests/wpt/metadata/fetch/api/response/response-idl.html.ini b/tests/wpt/metadata/fetch/api/response/response-idl.html.ini index 54a3bf894ce..6b6489d8871 100644 --- a/tests/wpt/metadata/fetch/api/response/response-idl.html.ini +++ b/tests/wpt/metadata/fetch/api/response/response-idl.html.ini @@ -1,3 +1,3 @@ [response-idl.html] type: testharness - expected: TIMEOUT + expected: ERROR diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/004.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/004.html.ini index c442d6da7e9..278160ab559 100644 --- a/tests/wpt/metadata/html/browsers/history/the-history-interface/004.html.ini +++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/004.html.ini @@ -8,3 +8,4 @@ [history position should be calculated when executing, not when calling the .go command] expected: FAIL + diff --git a/tests/wpt/metadata/html/browsers/sandboxing/sandbox-allow-scripts.html.ini b/tests/wpt/metadata/html/browsers/sandboxing/sandbox-allow-scripts.html.ini index 91e5608d4b6..9f15cc3c5d9 100644 --- a/tests/wpt/metadata/html/browsers/sandboxing/sandbox-allow-scripts.html.ini +++ b/tests/wpt/metadata/html/browsers/sandboxing/sandbox-allow-scripts.html.ini @@ -1,6 +1,6 @@ [sandbox-allow-scripts.html] type: testharness - expected: TIMEOUT + expected: ERROR [Running script from sandbox='allow-scripts' iframe is allowed] expected: NOTRUN diff --git a/tests/wpt/mozilla/meta/css/matchMedia.html.ini b/tests/wpt/mozilla/meta/css/matchMedia.html.ini index cb68916336c..8c726be5a03 100644 --- a/tests/wpt/mozilla/meta/css/matchMedia.html.ini +++ b/tests/wpt/mozilla/meta/css/matchMedia.html.ini @@ -8,3 +8,4 @@ [Resize iframe from 200x100 to 200x50, then to 100x50] expected: FAIL + diff --git a/tests/wpt/mozilla/meta/mozilla/bluetooth/startNotifications/disconnect-called-during.html.ini b/tests/wpt/mozilla/meta/mozilla/bluetooth/startNotifications/disconnect-called-during.html.ini index 3f7bd5bd0e3..bd5ab348ee1 100644 --- a/tests/wpt/mozilla/meta/mozilla/bluetooth/startNotifications/disconnect-called-during.html.ini +++ b/tests/wpt/mozilla/meta/mozilla/bluetooth/startNotifications/disconnect-called-during.html.ini @@ -2,3 +2,4 @@ type: testharness [disconnect() called during startNotifications. Reject with NetworkError.] expected: FAIL + diff --git a/tests/wpt/mozilla/meta/mozilla/bluetooth/stopNotifications/disconnect-called-during.html.ini b/tests/wpt/mozilla/meta/mozilla/bluetooth/stopNotifications/disconnect-called-during.html.ini index 63d2902e525..6dc580dc253 100644 --- a/tests/wpt/mozilla/meta/mozilla/bluetooth/stopNotifications/disconnect-called-during.html.ini +++ b/tests/wpt/mozilla/meta/mozilla/bluetooth/stopNotifications/disconnect-called-during.html.ini @@ -2,3 +2,4 @@ type: testharness [disconnect() called during stopNotifications. Reject with NetworkError.] expected: FAIL + diff --git a/tests/wpt/mozilla/meta/mozilla/htmllabel-activation.html.ini b/tests/wpt/mozilla/meta/mozilla/htmllabel-activation.html.ini new file mode 100644 index 00000000000..29941630cf9 --- /dev/null +++ b/tests/wpt/mozilla/meta/mozilla/htmllabel-activation.html.ini @@ -0,0 +1,6 @@ +[htmllabel-activation.html] + type: testharness + + [If label's 1st child (submit) is disabled, click should have no impact] + expected: FAIL + diff --git a/tests/wpt/mozilla/tests/mozilla/htmllabel-activation.html b/tests/wpt/mozilla/tests/mozilla/htmllabel-activation.html index ff77c80a18f..8040612c8b9 100644 --- a/tests/wpt/mozilla/tests/mozilla/htmllabel-activation.html +++ b/tests/wpt/mozilla/tests/mozilla/htmllabel-activation.html @@ -37,7 +37,7 @@ label.click(); assert_false(disabledcb.checked, "checkbox should not be checked") assert_false(checkbox.checked, "checkbox should not be checked") - }, "If label's 1st child is disabled, click should have no impact"); + }, "If label's 1st child (checkbox) is disabled, click should have no impact"); test(function() { document.querySelector("#test").innerHTML = '<label id="label">hi \ @@ -81,7 +81,7 @@ label.click(); assert_false(disabledRadio.checked, "disabled radio should not be checked") assert_false(checkbox.checked, "checkbox should not be checked") - }, "If label's 1st child is disabled, click should have no impact"); + }, "If label's 1st child (radio) is disabled, click should have no impact"); test(function() { @@ -110,13 +110,13 @@ disabledSubmit = document.getElementById('disabledSubmit'), checkbox = document.getElementById('checkbox'); - disabledSubmit.onclick = function() { + disabledSubmit.onclick = this.step_func(function() { assert_unreached("disabled submit should not have been activated") - }; + }); label.click(); assert_false(checkbox.checked, "checkbox should not be checked") - }, "If label's 1st child is disabled, click should have no impact"); + }, "If label's 1st child (submit) is disabled, click should have no impact"); test(function() { document.querySelector("#test").innerHTML = '<label id="label" for="checkbox2">hi \ |