New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 875507 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 875443
issue 919618
issue 860069



Sign in to add a comment

EulaTest.LoadOffline fails with Polymer 2

Project Member Reported by rbpotter@chromium.org, Aug 17

Issue description

EulaTest.LoadOffline when run with --enable-features=WebUIPolymer2. This failure should be fixed and the test should be removed from the exclusions list in webui_polymer2_browser_tests.filter.

 
Blocking: 875443
Status: Available (was: Untriaged)
Cc: alemate@chromium.org achuith@chromium.org jdufault@chromium.org xiy...@chromium.org
cc'ing corresponding OWNERs.
It seems like that i18nTemplate.process() does not handle elements inside polymer elements properly with --enable-features=WebUIPolymer2 

For example, this <p> element inside a <cr-checkbox>, which is in turn inside a <oobe-dialog> [1] (also see the attach devtools screenshot). As a result, JS code fails when it assumes this <p> innerHTML is loaded and try to get the <a> inside it. We get errors like the following:

[168331:168331:0925/135631.149300:ERROR:CONSOLE(10506)] "TypeError: Cannot set property 'onclick' of null
    at HTMLDivElement.setLearnMoreHandlers_ (chrome://oobe/oobe.js:12258:20)
    at HTMLDivElement.updateLocalizedContent (chrome://oobe/oobe.js:12236:12)
    at Oobe.updateLocalizedContent_ (chrome://oobe/oobe.js:2713:18)
    at Function.updateLocalizedContent (chrome://oobe/oobe.js:19289:26)
    at Function.reloadContent (chrome://oobe/oobe.js:19263:12)
    at <anonymous>:1:12", source: chrome://oobe/oobe.js (10506)

The error is not just test. If we run chrome with --enable-features=WebUIPolymer2, we see similar errors and many places the i18n content is missing.

[1] https://cs.chromium.org/chromium/src/chrome/browser/resources/chromeos/login/arc_terms_of_service.html?rcl=395ca8adef07ee3e2a8644dbb9c5725373f246b2&l=31
Screenshot from 2018-09-25 13-57-23.png
321 KB View Download
Blocking: 860069
i18nTemplate.process() is using /deep/ (see [1]) which does not work in Shadow DOM v1 (and therefore Polymer 2).

[1] https://cs.chromium.org/chromium/src/ui/webui/resources/js/i18n_template_no_process.js?l=127
Cc: steve...@chromium.org
I think that the right approach here is to eliminate usage of i18n-content from the relevant code, which is also tracked by https://bugs.chromium.org/p/chromium/issues/detail?id=677338.
This is potentially related to issue 692763. Can someone from the OOBE team take a look?

The alternative is to author a JS recursive version of /deep/ and use it in i18Template.process(), which I expect to have not so good performance.
Owner: alemate@chromium.org
Status: Assigned (was: Available)
Any updates here?
Cc: abodenha@chromium.org groby@chromium.org
Bulk update: Could you please post any status updates? These bugs are blocking the WebUIs Shadow DOM v1 migration.
Cc: michae...@chromium.org
Blocking: 919618

Sign in to add a comment