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

Unified Diff: pkg/polymer/test/build/log_injector_test.dart

Issue 513023002: Step one towards stable error messages with details: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« no previous file with comments | « pkg/polymer/test/build/linter_test.dart ('k') | pkg/polymer/test/build/script_compactor_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/build/log_injector_test.dart
diff --git a/pkg/polymer/test/build/log_injector_test.dart b/pkg/polymer/test/build/log_injector_test.dart
index 34f78ebda12b646e71bf9b1cd7baa72ba2e462c5..1f4f5ac0cb60bd57fa4ff1be6e26c25ce29a0bc4 100644
--- a/pkg/polymer/test/build/log_injector_test.dart
+++ b/pkg/polymer/test/build/log_injector_test.dart
@@ -14,11 +14,38 @@ main() {
useHtmlConfiguration();
setUp(() => new LogInjector().injectLogs(
- '''[
- {"level": "Info", "message": "foo"},
- {"level": "Warning", "message": "bar"},
- {"level": "Error", "message": "baz"}
- ]'''
+ '''{
+ "polymer#0":[{
+ "level":"Info",
+ "message":{"id":"polymer#0","snippet":"foo"}}
+ ],
+ "polymer#1":[{
+ "level":"Info",
+ "message":{"id":"polymer#1","snippet":"foo"},
+ "span":{
+ "start":{
+ "url":"web/test.html",
+ "offset":22,
+ "line":1,
+ "column":0
+ },
+ "end":{
+ "url":"web/test.html",
+ "offset":50,
+ "line":1,
+ "column":28
+ },
+ "text":"<polymer-element name=\\"x-a\\">"
+ }
+ }],
+ "polymer#2":[
+ {"level":"Warning","message":{"id":"polymer#2","snippet":"bar"}},
+ {"level":"Warning","message":{"id":"polymer#2",
+ "snippet":"bar again"}},
+ {"level":"Error","message":{"id":"polymer#2","snippet":"baz1"}}
+ ],
+ "foo#44":[{"level":"Error","message":{"id":"foo#44","snippet":"baz2"}}]
+ }'''
));
test('can inject a functioning log widget', () {
@@ -38,7 +65,7 @@ main() {
expect(menuElements[i].classes.contains('active'), false);
expect(contentElements[i].classes.contains(expectedClasses[i]), true);
expect(contentElements[i].classes.contains('active'), false);
- expect(contentElements[i].querySelectorAll('.log').length, 1);
+ expect(contentElements[i].querySelectorAll('.log').length, 2);
}
// Test clicking each of the tabs.
« no previous file with comments | « pkg/polymer/test/build/linter_test.dart ('k') | pkg/polymer/test/build/script_compactor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698