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

Unified Diff: samples/tests/samples/lib/layout/grid_layout_demo.dart

Issue 12473003: Remove deprecated StringBuffer.add, addAll and addCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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: samples/tests/samples/lib/layout/grid_layout_demo.dart
diff --git a/samples/tests/samples/lib/layout/grid_layout_demo.dart b/samples/tests/samples/lib/layout/grid_layout_demo.dart
index 3354d1869e8685608329bb114b76177886b18815..8d7d082b505722f04ba4e6661170d77b52da1ed4 100644
--- a/samples/tests/samples/lib/layout/grid_layout_demo.dart
+++ b/samples/tests/samples/lib/layout/grid_layout_demo.dart
@@ -37,7 +37,7 @@ void _onLoad() {
} else {
final html = new StringBuffer();
for (String ex in GridExamples.styles.keys) {
- html.add('<div><a href="?q=$ex">Grid Example $ex</a></div>');
+ html.write('<div><a href="?q=$ex">Grid Example $ex</a></div>');
}
document.body.innerHTML = html.toString();
}
@@ -106,16 +106,16 @@ void printMetrics(String example) {
final node = document.body.query('#grid');
String exampleId = example.split(' ')[0];
final sb = new StringBuffer();
- sb.add("test('Spec Example $exampleId', () {\n");
- sb.add(" verifyExample('$example', {\n");
+ sb.write("test('Spec Example $exampleId', () {\n");
+ sb.write(" verifyExample('$example', {\n");
final children = node.children;
window.setImmediate(() {
for (int i = 0; i < children.length; i++) {
_appendMetrics(sb, children[i], ' ');
}
- sb.add(' });\n');
- sb.add('});\n\n');
+ sb.write(' });\n');
+ sb.write('});\n\n');
window.console.log(sb.toString());
});
}
@@ -124,5 +124,5 @@ void _appendMetrics(StringBuffer sb, Element node, [String indent = '']) {
String id = node.id;
num left = node.offsetLeft, top = node.offsetTop;
num width = node.offsetWidth, height = node.offsetHeight;
- sb.add("${indent}'$id': [$left, $top, $width, $height],\n");
+ sb.write("${indent}'$id': [$left, $top, $width, $height],\n");
}

Powered by Google App Engine
This is Rietveld 408576698