Commit 1bee532e authored by Clark DuVall's avatar Clark DuVall Committed by Commit Bot

[WebLayer] Fix weblayer browsertests which use dynamic attributes

WebLayer browsertests load the WebLayer implementation from the same APK
the client is running in. This confuses Android and it no longer
resolves dynamic attributes correctly, since a shared library APK is not
expected to both be run as a normal APK and loaded as a shared lib. To
fix this, switch to using app_as_shared_lib instead of shared_resources,
which is what Monochrome uses to run both as Chrome and WebView.

This was exposed by Colin's infobar CL which must be the first
browsertest to hit a piece of UI using a dynamic attribute:
http://crrev.com/c/2232555.

Note that passing shared_resources to the "test" gn rule was added
earlier for WebLayer, so switching to app_as_shared_lib shouldn't affect
anyone else: http://crrev.com/c/1864517.

Bug: 1025620
Change-Id: I95ec5500cdcf52167dfedffc9dbe79071895dc37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2238706
Auto-Submit: Clark DuVall <cduvall@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776843}
parent c42c3e8f
...@@ -96,12 +96,12 @@ template("test") { ...@@ -96,12 +96,12 @@ template("test") {
_apk_specific_vars = [ _apk_specific_vars = [
"android_manifest", "android_manifest",
"android_manifest_dep", "android_manifest_dep",
"app_as_shared_lib",
"enable_multidex", "enable_multidex",
"product_config_java_packages", "product_config_java_packages",
"min_sdk_version", "min_sdk_version",
"proguard_configs", "proguard_configs",
"proguard_enabled", "proguard_enabled",
"shared_resources",
"srcjar_deps", "srcjar_deps",
"target_sdk_version", "target_sdk_version",
"use_default_launcher", "use_default_launcher",
......
...@@ -182,7 +182,7 @@ test("weblayer_browsertests") { ...@@ -182,7 +182,7 @@ test("weblayer_browsertests") {
"${target_gen_dir}/weblayer_browsertests_manifest/AndroidManifest.xml" "${target_gen_dir}/weblayer_browsertests_manifest/AndroidManifest.xml"
android_manifest_dep = ":weblayer_browsertests_manifest" android_manifest_dep = ":weblayer_browsertests_manifest"
use_default_launcher = false use_default_launcher = false
shared_resources = true app_as_shared_lib = true
product_config_java_packages = [ weblayer_product_config_java_package ] product_config_java_packages = [ weblayer_product_config_java_package ]
} else { } else {
sources += [ sources += [
......
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