Commit 3c47e32a authored by W. James MacLean's avatar W. James MacLean Committed by Commit Bot

Rename IsLockedToOriginForTesting in Android WebView.

This CL completes the renaming process started in
https://chromium-review.googlesource.com/c/chromium/src/+/2246923 for
Android webview.

Bug: 1067389, 846155
Change-Id: Ie5d20a0b18bd4eaf56c3eb4296941978d78ffb05
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2300682Reviewed-by: default avatarAlex Moshchuk <alexmos@chromium.org>
Reviewed-by: default avatarBo <boliu@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788824}
parent e703384b
......@@ -79,7 +79,7 @@ bool AwRenderProcess::TerminateChildProcess(
return render_process_host_->Shutdown(0);
}
bool AwRenderProcess::IsLockedToOriginForTesting(
bool AwRenderProcess::IsProcessLockedForTesting(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
......
......@@ -24,7 +24,7 @@ class AwRenderProcess : public content::RenderProcessHostObserver,
bool TerminateChildProcess(JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);
bool IsLockedToOriginForTesting(
bool IsProcessLockedForTesting(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& obj);
......
......@@ -23,10 +23,10 @@ public final class AwRenderProcess extends AwSupportLibIsomorphic {
mNativeRenderProcess, AwRenderProcess.this);
}
public boolean isLockedToOriginForTesting() {
public boolean isProcessLockedForTesting() {
if (mNativeRenderProcess == 0) return false;
return AwRenderProcessJni.get().isLockedToOriginForTesting(
return AwRenderProcessJni.get().isProcessLockedForTesting(
mNativeRenderProcess, AwRenderProcess.this);
}
......@@ -43,6 +43,6 @@ public final class AwRenderProcess extends AwSupportLibIsomorphic {
@NativeMethods
interface Natives {
boolean terminateChildProcess(long nativeAwRenderProcess, AwRenderProcess caller);
boolean isLockedToOriginForTesting(long nativeAwRenderProcess, AwRenderProcess caller);
boolean isProcessLockedForTesting(long nativeAwRenderProcess, AwRenderProcess caller);
}
}
......@@ -1097,7 +1097,7 @@ public class AwContentsTest {
// Until AW gets site isolation, ordinary web content should not be
// locked to origin.
boolean isLocked = TestThreadUtils.runOnUiThreadBlocking(
() -> rendererProcess1.isLockedToOriginForTesting());
() -> rendererProcess1.isProcessLockedForTesting());
Assert.assertFalse("Initial renderer process should not be locked", isLocked);
mActivityTestRule.loadUrlSync(
......@@ -1108,7 +1108,7 @@ public class AwContentsTest {
Assert.assertNotEquals(rendererProcess1, webuiProcess);
// WebUI pages should be locked to origin even on AW.
isLocked = TestThreadUtils.runOnUiThreadBlocking(
() -> webuiProcess.isLockedToOriginForTesting());
() -> webuiProcess.isProcessLockedForTesting());
Assert.assertTrue("WebUI process should be locked", isLocked);
mActivityTestRule.loadUrlSync(
......@@ -1119,7 +1119,7 @@ public class AwContentsTest {
HELLO_WORLD_TITLE, mActivityTestRule.getTitleOnUiThread(awContents));
Assert.assertNotEquals(rendererProcess2, webuiProcess);
isLocked = TestThreadUtils.runOnUiThreadBlocking(
() -> rendererProcess2.isLockedToOriginForTesting());
() -> rendererProcess2.isProcessLockedForTesting());
Assert.assertFalse("Final renderer process should not be locked", isLocked);
} finally {
testServer.stopAndDestroyServer();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment