Skip to content

Commit

Permalink
[Local Network Access] Rename private to local in web_view_browsertes…
Browse files Browse the repository at this point in the history
…t.cc

In WICG/private-network-access#91, we decided to
rename Private Network Access to Local Network Access. The spec has
already been renamed in
WICG/private-network-access#97. The latest spec:
https://wicg.github.io/local-network-access/

This CL renames PrivateNetwork to LocalNetwork in
web_view_browsertest.cc.

There are so many places to rename, so during the process, there will
inevitably be inconsistencies. Hopefully, we shall resolve all of them
soon.

Bug: 1418287

Change-Id: I52fa91a66f225f7076cc1f1d4a9068c0ea880d82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4335665
Reviewed-by: Kevin McNee <mcnee@chromium.org>
Auto-Submit: Jonathan Hao <phao@chromium.org>
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Bo Liu <boliu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1117536}
  • Loading branch information
johnathan79717 authored and Chromium LUCI CQ committed Mar 15, 2023
1 parent 8a1bd20 commit cdd0a01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ public void testInsertNullVisualStateCallback() {
}
}

// This test verifies that Private Network Access' secure context
// This test verifies that Local Network Access' secure context
// restriction (feature flag BlockInsecurePrivateNetworkRequests) does not
// apply to Webview: insecure private network requests are allowed.
//
Expand All @@ -1208,7 +1208,7 @@ public void testInsertNullVisualStateCallback() {
@Feature({"AndroidWebView"})
@CommandLineFlags.Add(ContentSwitches.HOST_RESOLVER_RULES + "=MAP * 127.0.0.1")
@SmallTest
public void testInsecurePrivateNetworkAccess() throws Throwable {
public void testInsecureLocalNetworkAccess() throws Throwable {
mActivityTestRule.startBrowserProcess();
final AwTestContainerView testContainer =
mActivityTestRule.createAwTestContainerViewOnMainSync(mContentsClient);
Expand Down
12 changes: 6 additions & 6 deletions chrome/browser/apps/guest_view/web_view_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5547,9 +5547,9 @@ IN_PROC_BROWSER_TEST_F(GuestViewExtensionNameCollisionTest,
EXPECT_EQ("PASSED", test_passed);
}

class PrivateNetworkAccessWebViewTest : public WebViewTest {
class LocalNetworkAccessWebViewTest : public WebViewTest {
public:
PrivateNetworkAccessWebViewTest() {
LocalNetworkAccessWebViewTest() {
features_.InitAndEnableFeature(
features::kBlockInsecurePrivateNetworkRequests);
}
Expand All @@ -5558,20 +5558,20 @@ class PrivateNetworkAccessWebViewTest : public WebViewTest {
base::test::ScopedFeatureList features_;
};
INSTANTIATE_TEST_SUITE_P(WebViewTests,
PrivateNetworkAccessWebViewTest,
LocalNetworkAccessWebViewTest,
testing::Bool(),
WebViewTest::DescribeParams);

// Verify that Private Network Access has the correct understanding of guests.
// Verify that Local Network Access has the correct understanding of guests.
// The chrome-guest:// scheme should only ever be used as a Site URL (and only
// when not using <webview> site isolation), and this should not interfere with
// the local/private/public classification. See https://crbug.com/1167698 for
// details.
//
// Note: This test is put in this file for convenience of reusing the entire
// app testing infrastructure. Other similar tests that do not require that
// infrastructure live in PrivateNetworkAccessBrowserTest.*
IN_PROC_BROWSER_TEST_P(PrivateNetworkAccessWebViewTest,
// infrastructure live in LocalNetworkAccessBrowserTest.*
IN_PROC_BROWSER_TEST_P(LocalNetworkAccessWebViewTest,
SpecialSchemeChromeGuest) {
LoadAppWithGuest("web_view/simple");
content::RenderFrameHost* guest_frame_host = GetGuestRenderFrameHost();
Expand Down

0 comments on commit cdd0a01

Please sign in to comment.