mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:39:49 +00:00
Update status files for more Safari breakage.
Actually document the Expect.throws behavior. Change-Id: I4cfd540c5908fa6df8920cd87a327b1eded63f4d Reviewed-on: https://dart-review.googlesource.com/36940 Reviewed-by: Jens Johansen <jensj@google.com> Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
This commit is contained in:
parent
c284670f54
commit
5d84d683a8
|
@ -484,6 +484,10 @@ class Expect {
|
|||
* the type of the exception you could write this:
|
||||
*
|
||||
* Expect.throws(myThrowingFunction, (e) => e is MyException);
|
||||
*
|
||||
* If `f` fails an expectation (i.e., throws an [ExpectException]), that
|
||||
* exception is not caught by [Expect.throws]. The test is still considered
|
||||
* failing.
|
||||
*/
|
||||
static void throws(void f(), [bool check(Object error), String reason]) {
|
||||
String msg = reason == null ? "" : "($reason)";
|
||||
|
|
|
@ -31,35 +31,40 @@ main() {
|
|||
document.body.nodes.removeLast();
|
||||
});
|
||||
|
||||
// Support is checked in element_types test.
|
||||
var expectation = DataListElement.supported ? returnsNormally : throws;
|
||||
|
||||
test('is', () {
|
||||
expect(() {
|
||||
try {
|
||||
var list = document.query('#browsers');
|
||||
expect(list, isDataListElement);
|
||||
}, expectation);
|
||||
} catch (e) {
|
||||
expect(DataListElement.supported, false);
|
||||
}
|
||||
});
|
||||
|
||||
test('list', () {
|
||||
expect(() {
|
||||
try {
|
||||
var list = document.query('#browsers') as DataListElement;
|
||||
var input = document.query('#input') as InputElement;
|
||||
expect(input.list, list);
|
||||
}, expectation);
|
||||
} catch (e) {
|
||||
expect(DataListElement.supported, false);
|
||||
}
|
||||
});
|
||||
|
||||
test('options', () {
|
||||
expect(() {
|
||||
try {
|
||||
var options = (document.query('#browsers') as DataListElement).options;
|
||||
expect(options.length, 5);
|
||||
}, expectation);
|
||||
} catch (e) {
|
||||
expect(DataListElement.supported, false);
|
||||
}
|
||||
});
|
||||
|
||||
test('create', () {
|
||||
expect(() {
|
||||
try {
|
||||
var list = new DataListElement();
|
||||
expect(list, isDataListElement);
|
||||
}, expectation);
|
||||
} catch (e) {
|
||||
expect(DataListElement.supported, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -166,7 +166,6 @@ html/custom/document_register_basic_test: Skip # Times out, or unittest times ou
|
|||
html/dart_object_local_storage_test: Skip # sessionStorage NS_ERROR_DOM_NOT_SUPPORTED_ERR
|
||||
html/element_animate_test/timing_dict: RuntimeError # Issue 26730
|
||||
html/element_classes_test: RuntimeError # Issue 27535
|
||||
html/element_types_constructors1_test: RuntimeError
|
||||
html/element_types_constructors4_test: RuntimeError
|
||||
html/element_types_content_test: Pass, RuntimeError # Issues 28983, 29922
|
||||
html/element_types_keygen_test: RuntimeError # Issue 29922
|
||||
|
|
Loading…
Reference in a new issue