Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
platform_packages_modules_Connectivity
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LMODroid
platform_packages_modules_Connectivity
Commits
796ea8b7
Commit
796ea8b7
authored
1 year ago
by
Treehugger Robot
Committed by
Gerrit Code Review
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge "Add the CTS tests for new public APIs in NetworkRequest" into main
parents
b19fd541
0baeb908
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/cts/net/src/android/net/cts/NetworkRequestTest.java
+16
-0
16 additions, 0 deletions
tests/cts/net/src/android/net/cts/NetworkRequestTest.java
with
16 additions
and
0 deletions
tests/cts/net/src/android/net/cts/NetworkRequestTest.java
+
16
−
0
View file @
796ea8b7
...
...
@@ -32,6 +32,8 @@ import static android.net.NetworkCapabilities.TRANSPORT_WIFI;
import
static
com
.
android
.
testutils
.
DevSdkIgnoreRuleKt
.
VANILLA_ICE_CREAM
;
import
static
com
.
google
.
common
.
truth
.
Truth
.
assertThat
;
import
static
junit
.
framework
.
Assert
.
fail
;
import
static
org
.
junit
.
Assert
.
assertArrayEquals
;
...
...
@@ -172,6 +174,20 @@ public class NetworkRequestTest {
.
getNetworkSpecifier
());
}
@Test
@IgnoreUpTo
(
Build
.
VERSION_CODES
.
S
)
public
void
testSubscriptionIds
()
{
int
[]
subIds
=
{
1
,
2
};
assertTrue
(
new
NetworkRequest
.
Builder
().
build
()
.
getSubscriptionIds
().
isEmpty
());
assertThat
(
new
NetworkRequest
.
Builder
()
.
setSubscriptionIds
(
Set
.
of
(
subIds
[
0
],
subIds
[
1
]))
.
build
()
.
getSubscriptionIds
())
.
containsExactly
(
subIds
[
0
],
subIds
[
1
]);
}
@Test
@IgnoreUpTo
(
Build
.
VERSION_CODES
.
Q
)
public
void
testRequestorPackageName
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment