Chromium Code Reviews| Index: pkg/unittest/lib/html_individual_config.dart |
| diff --git a/pkg/unittest/lib/html_individual_config.dart b/pkg/unittest/lib/html_individual_config.dart |
| index 2de4ed22d206d2ae144afb67bc05714b7fa3aa06..9c26e11c6decc14f7a7c61a967d3b6be98114cb0 100644 |
| --- a/pkg/unittest/lib/html_individual_config.dart |
| +++ b/pkg/unittest/lib/html_individual_config.dart |
| @@ -24,11 +24,16 @@ class HtmlIndividualConfiguration extends htmlconfig.HtmlConfiguration { |
| HtmlIndividualConfiguration(isLayoutTest): super(isLayoutTest); |
| void onStart() { |
| - var testGroupName = window.location.hash; |
| - if (testGroupName != '') { |
| + var testGroupName = window.location.search; |
| + var groupVar = '&group='; |
|
kustermann
2013/01/31 00:07:01
I'd prefer something like:
for (var getParameter i
|
| + if (testGroupName != '' && testGroupName.contains(groupVar)) { |
| try { |
| - testGroupName = testGroupName.substring(1); // cut off the # |
| - unittest.filterTests('^$testGroupName'); |
| + testGroupName = testGroupName.substring( |
| + testGroupName.indexOf(groupVar) + groupVar.length); |
| + var endIndex = testGroupName.indexOf('&'); |
| + testGroupName = testGroupName.substring(0, |
| + endIndex == -1 ? testGroupName.length : endIndex); |
| + unittest.filterTests('^$testGroupName${unittest.groupSep}'); |
| } catch (e) { |
| print('tried to match "$testGroupName"'); |
| print('NO_SUCH_TEST'); |