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

Side by Side Diff: test/tokenizer_test.dart

Issue 11265012: Changed UnsupportedOperationException to UnsupportedError (Closed) Base URL: https://github.com/dart-lang/html5lib.git@master
Patch Set: Created 8 years, 2 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 unified diff | Download patch
« no previous file with comments | « lib/src/token.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library tokenizer_test; 1 library tokenizer_test;
2 2
3 // Note: mirrors used to match the getattr usage in the original test 3 // Note: mirrors used to match the getattr usage in the original test
4 import 'dart:io'; 4 import 'dart:io';
5 import 'dart:json'; 5 import 'dart:json';
6 import 'dart:mirrors'; 6 import 'dart:mirrors';
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 import 'package:unittest/vm_config.dart'; 8 import 'package:unittest/vm_config.dart';
9 import 'package:html5lib/src/char_encodings.dart'; 9 import 'package:html5lib/src/char_encodings.dart';
10 import 'package:html5lib/src/constants.dart' as constants; 10 import 'package:html5lib/src/constants.dart' as constants;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 // Note: we can't get a closure of the state method. However, we can 67 // Note: we can't get a closure of the state method. However, we can
68 // create a new closure to invoke it via mirrors. 68 // create a new closure to invoke it via mirrors.
69 var mtok = reflect(tokenizer); 69 var mtok = reflect(tokenizer);
70 tokenizer.state = () => mtok.invoke(_state, const []).value.reflectee; 70 tokenizer.state = () => mtok.invoke(_state, const []).value.reflectee;
71 71
72 if (_lastStartTag != null) { 72 if (_lastStartTag != null) {
73 tokenizer.currentToken = new StartTagToken(_lastStartTag); 73 tokenizer.currentToken = new StartTagToken(_lastStartTag);
74 } 74 }
75 75
76 while (tokenizer.hasNext()) { 76 while (tokenizer.hasNext) {
77 var token = tokenizer.next(); 77 var token = tokenizer.next();
78 switch (token.kind) { 78 switch (token.kind) {
79 case TokenKind.characters: 79 case TokenKind.characters:
80 processCharacters(token); 80 processCharacters(token);
81 break; 81 break;
82 case TokenKind.spaceCharacters: 82 case TokenKind.spaceCharacters:
83 processSpaceCharacters(token); 83 processSpaceCharacters(token);
84 break; 84 break;
85 case TokenKind.startTag: 85 case TokenKind.startTag:
86 processStartTag(token); 86 processStartTag(token);
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 test(testInfo["description"], () { 295 test(testInfo["description"], () {
296 testInfo["initialState"] = camelCase(initialState); 296 testInfo["initialState"] = camelCase(initialState);
297 runTokenizerTest(testInfo); 297 runTokenizerTest(testInfo);
298 }); 298 });
299 } 299 }
300 } 300 }
301 }); 301 });
302 } 302 }
303 }); 303 });
304 } 304 }
OLDNEW
« no previous file with comments | « lib/src/token.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698