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

Side by Side Diff: components/cronet/android/test/javatests/src/org/chromium/net/SdchTest.java

Issue 1424193003: [Cronet] Remove CronetEngine.Builder JSON serial/deserialization APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Helen's comment Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.net; 5 package org.chromium.net;
6 6
7 import android.os.ConditionVariable; 7 import android.os.ConditionVariable;
8 import android.test.suitebuilder.annotation.SmallTest; 8 import android.test.suitebuilder.annotation.SmallTest;
9 9
10 import org.chromium.base.test.util.Feature; 10 import org.chromium.base.test.util.Feature;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 UrlRequest.Builder builder = 254 UrlRequest.Builder builder =
255 new UrlRequest.Builder(url, callback, callback.getExecutor(), cr onetEngine); 255 new UrlRequest.Builder(url, callback, callback.getExecutor(), cr onetEngine);
256 builder.build().start(); 256 builder.build().start();
257 callback.blockForDone(); 257 callback.blockForDone();
258 return callback; 258 return callback;
259 } 259 }
260 260
261 // Returns whether a file contains a particular string. 261 // Returns whether a file contains a particular string.
262 private boolean fileContainsString(String filename, String content) throws I OException { 262 private boolean fileContainsString(String filename, String content) throws I OException {
263 BufferedReader reader = new BufferedReader( 263 BufferedReader reader = new BufferedReader(
264 new FileReader(mTestFramework.getTestStorage() + "/" + filename) ); 264 new FileReader(CronetTestFramework.getTestStorage(getContext()) + "/" + filename));
265 String line; 265 String line;
266 while ((line = reader.readLine()) != null) { 266 while ((line = reader.readLine()) != null) {
267 if (line.contains(content)) { 267 if (line.contains(content)) {
268 reader.close(); 268 reader.close();
269 return true; 269 return true;
270 } 270 }
271 } 271 }
272 reader.close(); 272 reader.close();
273 return false; 273 return false;
274 } 274 }
275 } 275 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698