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:
Lasse R.H. Nielsen 2018-01-26 14:35:43 +00:00 committed by commit-bot@chromium.org
parent c284670f54
commit 5d84d683a8
3 changed files with 20 additions and 12 deletions

View file

@ -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)";

View file

@ -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);
}
});
}

View file

@ -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