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

Unified Diff: utils/dartdoc/html_renderer.dart

Issue 9147058: Hook up the dartdoc tests to test.py, test.dart, and frog/presubmit.py. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase and upload. Created 8 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
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | utils/dartdoc/test/dartdoc_tests.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/dartdoc/html_renderer.dart
diff --git a/utils/dartdoc/html_renderer.dart b/utils/dartdoc/html_renderer.dart
index ec4bebb1d00316bb270b484f635f59d5fdfe4490..14b7bb03fd0b72a779dab12c1746c635f89ea5f7 100644
--- a/utils/dartdoc/html_renderer.dart
+++ b/utils/dartdoc/html_renderer.dart
@@ -34,7 +34,12 @@ class HtmlRenderer implements NodeVisitor {
buffer.add('<${element.tag}');
- for (final name in element.attributes.getKeys()) {
+ // Sort the keys so that we generate stable output.
+ // TODO(rnystrom): This assumes getKeys() returns a fresh mutable
+ // collection.
+ final attributeNames = element.attributes.getKeys();
+ attributeNames.sort((a, b) => a.compareTo(b));
+ for (final name in attributeNames) {
buffer.add(' $name="${element.attributes[name]}"');
}
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | utils/dartdoc/test/dartdoc_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698