New issue
Advanced search Search tips

Issue 717326 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: May 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug
Team-Security-UX

Blocking:
issue 707481



Sign in to add a comment

errorpage_browsertests break if content is opacity = 0

Project Member Reported by ntfschr@chromium.org, May 2 2017

Issue description

errorpage_browsertests check document.body.innerText to see if an element is visible. This appears to include elements with opacity=0 (which is how the mobile layout hides content), so "hidden" text can appear to be non-hidden.

In order to get these tests passing for the mobile layout, we'll need to find a better way of testing if the text is present/visible.

This breaks for IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_HEADER, so it may be easiest to check for visibility for this element, and leave the other checks alone.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f1a3058bf88ee945ab8e5ead543a3b7450710925

commit f1a3058bf88ee945ab8e5ead543a3b7450710925
Author: ntfschr <ntfschr@chromium.org>
Date: Fri May 05 19:38:18 2017

Properly check visibility of check_connection_header

No change in production logic.

Because the mobile page layout hides elements using 'opacity = 0'
instead of 'display: none', it's not sufficient to only check the
innerText to see if text is visible on the page. Elements with opacity =
0 still show up in body.innerText.

Unfortunately, we can't simply check opacity, because opacity changes
via CSS transition. Elements may still have opacity = 0 immediately
after they're un-hidden, since the CSS transition takes time. Instead,
we check the classList of the details element to determine if it's
visible, since a hidden details element implies that its child nodes are
also hidden.

This CL adds a function for determining the visibility of details and
uses it when checking if
IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_HEADER is displayed, since
this check isn't compatible with mobile layout.

BUG= 717326 

Review-Url: https://codereview.chromium.org/2860583002
Cr-Commit-Position: refs/heads/master@{#469758}

[modify] https://crrev.com/f1a3058bf88ee945ab8e5ead543a3b7450710925/chrome/browser/net/errorpage_browsertest.cc

Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)
Bulk edit: marking stale 'fixed' bugs as 'verified' since they don't need verification at this point.

Sign in to add a comment