Commit 26f4a8ec authored by Laís Minchillo's avatar Laís Minchillo Committed by Commit Bot

Ensure webview is clickable

Originally the webview content was always set to clickable but after
http://crrev.com/551479 it wasn't. This CL restores original behaviour.

Also adds a test to ensure this remains true in the future.

Bug: 857427
Change-Id: If7a765f146290b933f57e514f26ad8a672f7695e
Reviewed-on: https://chromium-review.googlesource.com/1127951Reviewed-by: default avatarJinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Commit-Queue: Laís Minchillo <laisminchillo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577138}
parent cc68f446
......@@ -52,6 +52,7 @@ class AwWebContentsDelegateAdapter extends AwWebContentsDelegate {
public void setContainerView(View containerView) {
mContainerView = containerView;
mContainerView.setClickable(true);
}
@Override
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.android_webview.test;
import android.support.test.filters.SmallTest;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.chromium.base.test.util.Feature;
/**
* AwContents container view tests.
*/
@RunWith(AwJUnit4ClassRunner.class)
public class AwContentsContainerViewTest {
@Rule
public AwActivityTestRule mActivityTestRule = new AwActivityTestRule();
private TestAwContentsClient mContentsClient;
private AwTestContainerView mContainerView;
@Before
public void setUp() throws Exception {
mContentsClient = new TestAwContentsClient();
mContainerView = mActivityTestRule.createAwTestContainerViewOnMainSync(mContentsClient);
}
@Test
@SmallTest
@Feature({"AndroidWebView"})
public void testContainerViewClickable() throws Throwable {
Assert.assertTrue(mContainerView.isClickable());
}
}
......@@ -172,6 +172,7 @@ instrumentation_test_apk("webview_instrumentation_test_apk") {
"../javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsClientVisitedHistoryTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsContainerViewTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsGarbageCollectionTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsLifecycleNotifierTest.java",
"../javatests/src/org/chromium/android_webview/test/AwContentsRenderTest.java",
......
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