New issue
Advanced search Search tips

Issue 843878 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 845389



Sign in to add a comment

Views Textfields Do Not Fire Change Events On Programmatic Text Changes

Project Member Reported by robliao@chromium.org, May 17 2018

Issue description

Many tests like the Find Bar tests set text programmatically to update the contexts of the Find Bar.

However, because Views Textfields intentionally do not fire change events upon a SetText() call, there's no way for external observers to receive notifications of changes.

This impacts the Find Bar in tests on Mac as text change updates used to update the Find Bar state with the global pasteboard don't fire.

The workaround is to have interactive ui tests manually send keystrokes.
 
Project Member

Comment 1 by bugdroid1@chromium.org, May 17 2018

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

commit d308168d695f0e44a48cbd432460ca6c93913daf
Author: Robert Liao <robliao@chromium.org>
Date: Thu May 17 18:10:39 2018

Add Equivalent FindInPageControllerTest.GlobalPasteBoardClearMatches Using Interactive Text Input

Views Textfields do not fire change updates when using SetText(),
breaking any global pasteboard and Find Bar state updates.

This workaround simulates text input, which does fire the events.

BUG=843878,834754

Change-Id: I482854bb221bfbdc5bd430c6a631e5de29ecd725
Reviewed-on: https://chromium-review.googlesource.com/1063490
Commit-Queue: Robert Liao <robliao@chromium.org>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559609}
[modify] https://crrev.com/d308168d695f0e44a48cbd432460ca6c93913daf/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
[modify] https://crrev.com/d308168d695f0e44a48cbd432460ca6c93913daf/chrome/browser/ui/find_bar/find_bar_platform_helper_mac_interactive_uitest.mm

Project Member

Comment 2 by bugdroid1@chromium.org, May 22 2018

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

commit c027469a79d22342b1ef6ecc66cae1c3a319e808
Author: Robert Liao <robliao@chromium.org>
Date: Tue May 22 16:39:58 2018

Add Equivalent FindInPageControllerTest.IncognitoFindNextShared Using Interactive Text Input

Views Textfields do not fire change updates when using SetText(),
breaking any global pasteboard and Find Bar state updates.

This workaround simulates text input, which does fire the events.

BUG=843878,834754

Change-Id: Ic49927848e882a90bcb4f167136a9e8f8949c426
Reviewed-on: https://chromium-review.googlesource.com/1067785
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560641}
[modify] https://crrev.com/c027469a79d22342b1ef6ecc66cae1c3a319e808/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
[modify] https://crrev.com/c027469a79d22342b1ef6ecc66cae1c3a319e808/chrome/browser/ui/find_bar/find_bar_platform_helper_mac_interactive_uitest.mm

Project Member

Comment 3 by bugdroid1@chromium.org, May 22 2018

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

commit dfe6f41da41b4bf73cfc08eda3bfa7b71723ee0d
Author: Robert Liao <robliao@chromium.org>
Date: Tue May 22 16:46:11 2018

Add Equivalent FindInPageControllerTest.PreferPreviousSearch Using Interactive Text Input

Views Textfields do not fire change updates when using SetText(),
breaking any global pasteboard and Find Bar state updates.

This workaround simulates text input, which does fire the events.

BUG=843878,834754

Change-Id: I044e5dbb4961658adf19d509cdf764cdecfbc78c
Reviewed-on: https://chromium-review.googlesource.com/1068266
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560650}
[modify] https://crrev.com/dfe6f41da41b4bf73cfc08eda3bfa7b71723ee0d/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
[modify] https://crrev.com/dfe6f41da41b4bf73cfc08eda3bfa7b71723ee0d/chrome/browser/ui/find_bar/find_bar_platform_helper_mac_interactive_uitest.mm

Blocking: 845389
Labels: Hotlist-DesktopUIValid Hotlist-DesktopUIChecked
**UI mass Triage**

robliao@ could you please help in verifying the issue?

Sign in to add a comment