Commit 0966ec10 authored by Changwan Ryu's avatar Changwan Ryu Committed by Commit Bot

WPT for WebView: remove mChildTitleText

This reduces complexity of the code in preparation for the multi-window
support.

Bug: 994939
Change-Id: I9fbb0658135b0b26c40644607d09baa1b56309b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1796889Reviewed-by: default avatarAndrew Luo <aluo@chromium.org>
Commit-Queue: Changwan Ryu <changwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695373}
parent f9f88ae5
......@@ -52,7 +52,6 @@ public class WebPlatformTestsActivity extends Activity {
private WebView mWebView;
private WebView mChildWebView;
private LinearLayout mChildLayout;
private TextView mChildTitleText;
private TestCallback mTestCallback;
private class MultiWindowWebChromeClient extends WebChromeClient {
......@@ -70,7 +69,8 @@ public class WebPlatformTestsActivity extends Activity {
@Override
public void onPageFinished(WebView childWebView, String url) {
// Once the view has loaded, display its title for debugging.
mChildTitleText.setText(childWebView.getTitle());
TextView childTitleText = mChildLayout.findViewById(R.id.childTitleText);
childTitleText.setText(childWebView.getTitle());
}
});
mChildWebView.setWebChromeClient(new WebChromeClient() {
......@@ -145,7 +145,6 @@ public class WebPlatformTestsActivity extends Activity {
LinearLayout childLayout =
(LinearLayout) mRootLayout.getChildAt(mRootLayout.getChildCount() - 1);
mChildTitleText = childLayout.findViewById(R.id.childTitleText);
Button childCloseButton = childLayout.findViewById(R.id.childCloseButton);
childCloseButton.setOnClickListener((View v) -> { closeChild(); });
return childLayout;
......@@ -165,7 +164,8 @@ public class WebPlatformTestsActivity extends Activity {
}
private void closeChild() {
mChildTitleText.setText("");
TextView childTitleText = mChildLayout.findViewById(R.id.childTitleText);
childTitleText.setText("");
mChildLayout.setVisibility(View.INVISIBLE);
removeAndDestroyChildWebView();
if (mTestCallback != null) mTestCallback.onChildLayoutInvisible();
......
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