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

Unified Diff: pkg/webdriver/lib/webdriver.dart

Issue 12316036: Merge IO v2 branch to bleeding edge (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased to r18818 Created 7 years, 10 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/intl/tool/generate_locale_data_files.dart ('k') | runtime/bin/builtin_impl_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/webdriver/lib/webdriver.dart
diff --git a/pkg/webdriver/lib/webdriver.dart b/pkg/webdriver/lib/webdriver.dart
index 837836bd4c49944df5e550f69392d0864bd773d6..ffb0dff91cd02812da923769ef67fabefa7b2175 100644
--- a/pkg/webdriver/lib/webdriver.dart
+++ b/pkg/webdriver/lib/webdriver.dart
@@ -52,17 +52,11 @@ part 'src/base64decoder.dart';
*/
void writeStringToFile(String fileName, String contents) {
- var file = new File(fileName);
- var ostream = file.openOutputStream(FileMode.WRITE);
- ostream.writeString(contents);
- ostream.close();
+ new File(fileName).writeAsStringSync(contents);
}
void writeBytesToFile(String fileName, List<int> contents) {
- var file = new File(fileName);
- var ostream = file.openOutputStream(FileMode.WRITE);
- ostream.write(contents);
- ostream.close();
+ new File(fileName).writeAsBytesSync(contents);
}
class WebDriverError {
« no previous file with comments | « pkg/intl/tool/generate_locale_data_files.dart ('k') | runtime/bin/builtin_impl_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698