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

Side by Side Diff: pkg/webdriver/lib/src/base64decoder.dart

Issue 11301046: Restructure pkg/unittest and pkg/webdriver to follow the pub conventions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 part of webdriver;
6
1 /** 7 /**
2 * A simple base64 decoder class, used to decode web browser screenshots 8 * A simple base64 decoder class, used to decode web browser screenshots
3 * returned by WebDriver. 9 * returned by WebDriver.
4 */ 10 */
5 class Base64Decoder { 11 class Base64Decoder {
6 12
7 static int getVal(String s, pos) { 13 static int getVal(String s, pos) {
8 int code = s.charCodeAt(pos); 14 int code = s.charCodeAt(pos);
9 if (code >= 65 && code < (65+26)) { // 'A'..'Z' 15 if (code >= 65 && code < (65+26)) { // 'A'..'Z'
10 return code - 65; 16 return code - 65;
(...skipping 29 matching lines...) Expand all
40 (getVal(s, pos + 2) << 6) | getVal(s, pos+3); 46 (getVal(s, pos + 2) << 6) | getVal(s, pos+3);
41 pos += 4; 47 pos += 4;
42 rtn.add((v >> 16 ) & 0xff); 48 rtn.add((v >> 16 ) & 0xff);
43 rtn.add((v >> 8) & 0xff); 49 rtn.add((v >> 8) & 0xff);
44 rtn.add(v & 0xff); 50 rtn.add(v & 0xff);
45 } 51 }
46 } 52 }
47 return rtn; 53 return rtn;
48 } 54 }
49 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698