From fca91e4dfdfc73bf8a49a55dab7891a1e96a83b5 Mon Sep 17 00:00:00 2001 From: Robert Nystrom Date: Wed, 26 Feb 2020 02:17:55 +0000 Subject: [PATCH] Migrate css_selector_test off unittest. This test was actually totally broken. It called useHtmlIndividualConfiguration(), which tells the test runner to treat each group() as a separate test. But it had no group() calls at all, so the test runner didn't enqueue *anything* for it. It was completely skipped. :-O Change-Id: Ib7b030c94d286f467601ec490308c32fb500c7a8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137291 Commit-Queue: Bob Nystrom Commit-Queue: Srujan Gaddam Auto-Submit: Bob Nystrom Reviewed-by: Srujan Gaddam --- tests/lib_2/html/css_selector_test.dart | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/lib_2/html/css_selector_test.dart b/tests/lib_2/html/css_selector_test.dart index 5fcbd9ee68c..2b001a0553b 100644 --- a/tests/lib_2/html/css_selector_test.dart +++ b/tests/lib_2/html/css_selector_test.dart @@ -4,13 +4,10 @@ import 'dart:html'; -import 'package:unittest/unittest.dart'; -import 'package:unittest/html_individual_config.dart'; +import 'package:expect/expect.dart'; import 'utils.dart'; main() { - useHtmlIndividualConfiguration(); - final String htmlPayload = "
" "
" "

" @@ -32,18 +29,20 @@ main() { para.classes.removeAll(['a', 'b']); para = document.body.querySelector('p') as ParagraphElement; - expect(para.outerHtml, '

Test #1

'); + Expect.equals('

Test #1

', para.outerHtml); para = document.body.querySelector('p') as ParagraphElement; para.classes.addAll(['c']); para = document.body.querySelector('p') as ParagraphElement; - expect(para.outerHtml, '

Test #1

'); + Expect.equals('

Test #1

', para.outerHtml); var allPara = document.body.querySelectorAll('p'); allPara.classes.removeAll(['b', 'c']); var checkAllPara = document.body.querySelectorAll('p'); - expect(checkAllPara[0].outerHtml, '

Test #1

'); - expect(checkAllPara[1].outerHtml, '

Test #2

'); + Expect.equals( + '

Test #1

', checkAllPara[0].outerHtml); + Expect.equals( + '

Test #2

', checkAllPara[1].outerHtml); }