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

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

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head 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/webdriver/lib/src/base64decoder.dart ('k') | pkg/yaml/lib/composer.dart » ('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 ffb0dff91cd02812da923769ef67fabefa7b2175..41d0cbc73b1d35f24e3b77a04900dbaee5e6588d 100644
--- a/pkg/webdriver/lib/webdriver.dart
+++ b/pkg/webdriver/lib/webdriver.dart
@@ -276,15 +276,14 @@ class WebDriverBase {
results = sbuf.toString().trim();
// For some reason we get a bunch of NULs on the end
// of the text and the json.parse blows up on these, so
- // strip them. We have to do this the hard way as
- // replaceAll('\0', '') does not work.
+ // strip them.
// These NULs can be seen in the TCP packet, so it is not
// an issue with character encoding; it seems to be a bug
// in WebDriver stack.
for (var i = results.length; --i >= 0;) {
- var code = results.charCodeAt(i);
+ var code = results.codeUnitAt(i);
if (code != 0) {
- results = results.substring(0, i+1);
+ results = results.substring(0, i + 1);
break;
}
}
« no previous file with comments | « pkg/webdriver/lib/src/base64decoder.dart ('k') | pkg/yaml/lib/composer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698