Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Issue 2170793003: [telemetry] Fix testTextEntry and testEnterText on Chrome OS (Closed)

Created:
4 years, 5 months ago by petrcermak
Modified:
4 years, 5 months ago
Reviewers:
nednguyen, achuithb
CC:
catapult-reviews_chromium.org, telemetry-reviews_chromium.org, achuithb, Josh Horwich, bccheng
Base URL:
git@github.com:catapult-project/catapult.git@master
Target Ref:
refs/heads/master
Project:
catapult
Visibility:
Public.

Description

[telemetry] Fix testTextEntry and testEnterText on Chrome OS Add waits after final keystrokes to ensure the browser has handled them (before inspecting the <textarea> elements). BUG=chromium:630017 Committed: https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/60ef2530645f9f1b0975ccfe4c6554a9e33392da

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -4 lines) Patch
M telemetry/telemetry/internal/actions/action_runner_unittest.py View 2 chunks +4 lines, -2 lines 1 comment Download
M telemetry/telemetry/internal/actions/key_event_unittest.py View 3 chunks +4 lines, -2 lines 2 comments Download

Messages

Total messages: 12 (6 generated)
petrcermak
PTAL. Thanks, Petr
4 years, 5 months ago (2016-07-21 09:31:45 UTC) #4
nednguyen
lgtm
4 years, 5 months ago (2016-07-21 11:24:46 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2170793003/1
4 years, 5 months ago (2016-07-21 11:25:32 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://chromium.googlesource.com/external/github.com/catapult-project/catapult/+/60ef2530645f9f1b0975ccfe4c6554a9e33392da
4 years, 5 months ago (2016-07-21 11:51:14 UTC) #9
achuithb
https://codereview.chromium.org/2170793003/diff/1/telemetry/telemetry/internal/actions/action_runner_unittest.py File telemetry/telemetry/internal/actions/action_runner_unittest.py (right): https://codereview.chromium.org/2170793003/diff/1/telemetry/telemetry/internal/actions/action_runner_unittest.py#newcode281 telemetry/telemetry/internal/actions/action_runner_unittest.py:281: action_runner.Wait(1) Same as before. I don't think it's good ...
4 years, 5 months ago (2016-07-21 19:16:05 UTC) #11
petrcermak
4 years, 5 months ago (2016-07-25 11:42:23 UTC) #12
Message was sent while issue was closed.
https://codereview.chromium.org/2170793003/diff/1/telemetry/telemetry/interna...
File telemetry/telemetry/internal/actions/key_event_unittest.py (right):

https://codereview.chromium.org/2170793003/diff/1/telemetry/telemetry/interna...
telemetry/telemetry/internal/actions/key_event_unittest.py:80: time.sleep(1)
On 2016/07/21 19:16:05, achuithb wrote:
> Wouldn't it be better to do something like:
> cond =
self._tab.EvaluateJavaScript('document.querySelector("textarea").value')
> == 'Hello,\nWorld!';
> try:
>   util.WaitFor(cond, 30)
>   self.assertTrue()
> except exceptions.TimeoutException:
>   self.assertFalse()
> 
> This is less flaky, and also waits only as long as necessary.

Good point. See https://codereview.chromium.org/2174273002/.

Powered by Google App Engine
This is Rietveld 408576698