• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.webkit.cts;
18 
19 import android.webkit.cts.HttpRequest;
20 import android.webkit.cts.HttpHeader;
21 
22 import java.util.List;
23 
24 interface IWebServer {
start(int sslMode, in @nullable byte[] acceptedIssuerDer, int keyResId, int certResId)25     void start(int sslMode, in @nullable byte[] acceptedIssuerDer, int keyResId, int certResId);
26 
shutdown()27     void shutdown();
28 
resetRequestState()29     void resetRequestState();
30 
setResponse( String path, String responseString, in List<HttpHeader> responseHeaders)31     String setResponse(
32         String path, String responseString, in List<HttpHeader> responseHeaders);
33 
getAbsoluteUrl(String path)34     String getAbsoluteUrl(String path);
35 
getUserAgentUrl()36     String getUserAgentUrl();
37 
getDelayedAssetUrl(String path)38     String getDelayedAssetUrl(String path);
39 
getRedirectingAssetUrl(String path)40     String getRedirectingAssetUrl(String path);
41 
getAssetUrl(String path)42     String getAssetUrl(String path);
43 
getAuthAssetUrl(String path)44     String getAuthAssetUrl(String path);
45 
getBinaryUrl(String mimeType, int contentLength)46     String getBinaryUrl(String mimeType, int contentLength);
47 
getAppCacheUrl()48     String getAppCacheUrl();
49 
getRequestCount()50     int getRequestCount();
51 
getRequestCountWithPath(String path)52     int getRequestCountWithPath(String path);
53 
wasResourceRequested(String url)54     boolean wasResourceRequested(String url);
55 
getLastRequest(String path)56     HttpRequest getLastRequest(String path);
57 
getLastAssetRequest(String url)58     HttpRequest getLastAssetRequest(String url);
59 
getCookieUrl(String path)60     String getCookieUrl(String path);
61 
getSetCookieUrl(String path, String key, String value, String attributes)62     String getSetCookieUrl(String path, String key, String value, String attributes);
63 
getLinkedScriptUrl(String path, String url)64     String getLinkedScriptUrl(String path, String url);
65 }