Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Unified Diff: pkg/unittest/lib/html_enhanced_config.dart

Issue 149573006: pkg/unittest: more lock-down, cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/unittest/lib/html_enhanced_config.dart
diff --git a/pkg/unittest/lib/html_enhanced_config.dart b/pkg/unittest/lib/html_enhanced_config.dart
index f303f244d27cd6a18c8b66b5d81e163d45d271d1..b067291a2f758efabd94f1b316db0adc4ea61c8a 100644
--- a/pkg/unittest/lib/html_enhanced_config.dart
+++ b/pkg/unittest/lib/html_enhanced_config.dart
@@ -67,7 +67,7 @@ class HtmlEnhancedConfiguration extends SimpleConfiguration {
//initialize and load CSS
final String _CSSID = '_unittestcss_';
- var cssElement = document.head.query('#${_CSSID}');
+ var cssElement = document.head.querySelector('#${_CSSID}');
if (cssElement == null) {
cssElement = new StyleElement();
cssElement.id = _CSSID;
@@ -134,9 +134,9 @@ class HtmlEnhancedConfiguration extends SimpleConfiguration {
"""));
// handle the click event for the collapse all button
- te.query('#btnCollapseAll').onClick.listen((_){
+ te.querySelector('#btnCollapseAll').onClick.listen((_){
document
- .queryAll('.unittest-row')
+ .querySelectorAll('.unittest-row')
.forEach((el) => el.attributes['class'] = el.attributes['class']
.replaceAll('unittest-row ', 'unittest-row-hidden '));
});
@@ -207,16 +207,16 @@ class HtmlEnhancedConfiguration extends SimpleConfiguration {
</div>"""));
// 'safeGroup' could be empty
- var grp = (safeGroup == '') ? null : te.query('#${safeGroup}');
+ var grp = (safeGroup == '') ? null : te.querySelector('#${safeGroup}');
Siggi Cherem (dart-lang) 2014/02/03 18:09:46 80
kevmoo 2014/02/03 18:22:57 Done.
if (grp != null) {
grp.onClick.listen((_) {
- var row = document.query('.unittest-row-${safeGroup}');
+ var row = document.querySelector('.unittest-row-${safeGroup}');
if (row.attributes['class'].contains('unittest-row ')){
- document.queryAll('.unittest-row-${safeGroup}').forEach(
+ document.querySelectorAll('.unittest-row-${safeGroup}').forEach(
(e) => e.attributes['class'] = e.attributes['class']
.replaceAll('unittest-row ', 'unittest-row-hidden '));
}else{
- document.queryAll('.unittest-row-${safeGroup}').forEach(
+ document.querySelectorAll('.unittest-row-${safeGroup}').forEach(
(e) => e.attributes['class'] = e.attributes['class']
.replaceAll('unittest-row-hidden', 'unittest-row'));
}
« no previous file with comments | « no previous file | pkg/unittest/lib/src/group_context.dart » ('j') | pkg/unittest/lib/src/spread_args_helper.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698