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

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

Issue 2318493003: Clean up PathUtils unused parameters. (Closed)
Patch Set: Fix more. Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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.test.suitebuilder.annotation.SmallTest; 7 import android.test.suitebuilder.annotation.SmallTest;
8 8
9 import org.chromium.base.PathUtils; 9 import org.chromium.base.PathUtils;
10 import org.chromium.base.test.util.Feature; 10 import org.chromium.base.test.util.Feature;
(...skipping 29 matching lines...) Expand all
40 mTestFramework.mCronetEngine.shutdown(); 40 mTestFramework.mCronetEngine.shutdown();
41 } 41 }
42 super.tearDown(); 42 super.tearDown();
43 } 43 }
44 44
45 @SmallTest 45 @SmallTest
46 @Feature({"Cronet"}) 46 @Feature({"Cronet"})
47 @OnlyRunNativeCronet 47 @OnlyRunNativeCronet
48 public void testSetSSLKeyLogFile() throws Exception { 48 public void testSetSSLKeyLogFile() throws Exception {
49 String url = Http2TestServer.getEchoMethodUrl(); 49 String url = Http2TestServer.getEchoMethodUrl();
50 File dir = new File(PathUtils.getDataDirectory(getContext())); 50 File dir = new File(PathUtils.getDataDirectory());
51 File file = File.createTempFile("ssl_key_log_file", "", dir); 51 File file = File.createTempFile("ssl_key_log_file", "", dir);
52 52
53 JSONObject experimentalOptions = new JSONObject().put("ssl_key_log_file" , file.getPath()); 53 JSONObject experimentalOptions = new JSONObject().put("ssl_key_log_file" , file.getPath());
54 mBuilder.setExperimentalOptions(experimentalOptions.toString()); 54 mBuilder.setExperimentalOptions(experimentalOptions.toString());
55 mTestFramework = new CronetTestFramework(null, null, getContext(), mBuil der); 55 mTestFramework = new CronetTestFramework(null, null, getContext(), mBuil der);
56 56
57 TestUrlRequestCallback callback = new TestUrlRequestCallback(); 57 TestUrlRequestCallback callback = new TestUrlRequestCallback();
58 UrlRequest.Builder builder = new UrlRequest.Builder( 58 UrlRequest.Builder builder = new UrlRequest.Builder(
59 url, callback, callback.getExecutor(), mTestFramework.mCronetEng ine); 59 url, callback, callback.getExecutor(), mTestFramework.mCronetEng ine);
60 UrlRequest urlRequest = builder.build(); 60 UrlRequest urlRequest = builder.build();
(...skipping 15 matching lines...) Expand all
76 } 76 }
77 } 77 }
78 } finally { 78 } finally {
79 logReader.close(); 79 logReader.close();
80 } 80 }
81 assertTrue(validFile); 81 assertTrue(validFile);
82 assertTrue(file.delete()); 82 assertTrue(file.delete());
83 assertTrue(!file.exists()); 83 assertTrue(!file.exists());
84 } 84 }
85 } 85 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698