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 <rnystrom@google.com> Commit-Queue: Srujan Gaddam <srujzs@google.com> Auto-Submit: Bob Nystrom <rnystrom@google.com> Reviewed-by: Srujan Gaddam <srujzs@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
f304dac144
commit
fca91e4dfd
@@ -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 = "<div>"
|
||||
"<div>"
|
||||
"<p class='a'>"
|
||||
@@ -32,18 +29,20 @@ main() {
|
||||
para.classes.removeAll(['a', 'b']);
|
||||
|
||||
para = document.body.querySelector('p') as ParagraphElement;
|
||||
expect(para.outerHtml, '<p class=""><span>Test #1</span></p>');
|
||||
Expect.equals('<p class=""><span>Test #1</span></p>', para.outerHtml);
|
||||
|
||||
para = document.body.querySelector('p') as ParagraphElement;
|
||||
para.classes.addAll(['c']);
|
||||
|
||||
para = document.body.querySelector('p') as ParagraphElement;
|
||||
expect(para.outerHtml, '<p class="c"><span>Test #1</span></p>');
|
||||
Expect.equals('<p class="c"><span>Test #1</span></p>', para.outerHtml);
|
||||
|
||||
var allPara = document.body.querySelectorAll('p');
|
||||
allPara.classes.removeAll(['b', 'c']);
|
||||
|
||||
var checkAllPara = document.body.querySelectorAll('p');
|
||||
expect(checkAllPara[0].outerHtml, '<p class=""><span>Test #1</span></p>');
|
||||
expect(checkAllPara[1].outerHtml, '<p class=""><span>Test #2</span></p>');
|
||||
Expect.equals(
|
||||
'<p class=""><span>Test #1</span></p>', checkAllPara[0].outerHtml);
|
||||
Expect.equals(
|
||||
'<p class=""><span>Test #2</span></p>', checkAllPara[1].outerHtml);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user