New issue
Advanced search Search tips

Issue 623420 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

MacViews: views_unittests regressions from r400918 Check failed: false. Unexpected event timestamp, now:2000 bogo-microseconds event timestamp:8325725527 bogo-microseconds

Project Member Reported by tapted@chromium.org, Jun 27 2016

Issue description

Chrome Version       : 53.0.2774.3
OS Version: OS X 10.11.5


[ RUN      ] MenuRunnerCocoaTest.RunMenuAndCancel
../../ui/views/controls/menu/menu_runner_cocoa_unittest.mm:182: Failure
Expected: (runner_->GetClosingEventTime()) <= ((ui::EventTimeForNow() - base::TimeTicks())), actual: 8324.82s vs 0.002s
[  FAILED  ] MenuRunnerCocoaTest.RunMenuAndCancel (167 ms)

[ RUN      ] TextfieldTest.DestroyingTextfieldFromOnKeyEvent
[ RUN      ] TextfieldTest.FocusTraversalTest
[ RUN      ] TextfieldTest.TextInputClientTest
[28121:1299:0626/170544:8325729928500:FATAL:event_utils.cc(78)] Check failed: false. Unexpected event timestamp, now:2000 bogo-microseconds event timestamp:8325725527 bogo-microseconds
0   views_unittests                     0x000000010b38bc23 _ZN4base5debug10StackTraceC1Ev + 19
1   views_unittests                     0x000000010b3af607 _ZN7logging10LogMessageD2Ev + 71
2   views_unittests                     0x000000010c340666 _ZN2ui22ValidateEventTimeClockEPN4base9TimeTicksE + 278
3   views_unittests                     0x000000010c336fd2 _ZN2ui19EventTimeFromNativeERKP7NSEvent + 82
4   views_unittests                     0x000000010c33947e _ZN2ui5EventC2ERKP7NSEventNS_9EventTypeEi + 78
5   views_unittests                     0x000000010c33bcb3 _ZN2ui8KeyEventC2ERKP7NSEvent + 51
6   views_unittests                     0x000000010bb1bcec -[BridgedContentView doCommandBySelector:] + 92
7   AppKit                              0x00007fff965b9e01 -[NSTextInputContext(NSInputContext_WithCompletion) doCommandBySelector:completionHandler:] + 118
8   AppKit                              0x00007fff9659fc23 -[NSKeyBindingManager(NSKeyBindingManager_MultiClients) interpretEventAsCommand:forClient:] + 1899
9   AppKit                              0x00007fff96b66272 __61-[NSTextInputContext _handleEvent:options:completionHandler:]_block_invoke972 + 335
10  AppKit                              0x00007fff965b2ee4 -[NSTextInputContext tryHandleEvent_HasMarkedText_withDispatchCondition:dispatchWork:continuation:] + 113
11  AppKit                              0x00007fff96b66074 __61-[NSTextInputContext _handleEvent:options:completionHandler:]_block_invoke960 + 321
12  AppKit                              0x00007fff9659f362 -[NSTextInputContext tryTSMProcessRawKeyEvent:dispatchCondition:setupForDispatch:furtherCondition:dispatchWork:continuation:] + 143
13  AppKit                              0x00007fff9659f085 -[NSTextInputContext _handleEvent:options:completionHandler:] + 1266
14  AppKit                              0x00007fff9659eb4e -[NSTextInputContext handleEvent:] + 109
15  AppKit                              0x00007fff9659ea54 -[NSView interpretKeyEvents:] + 207
16  views_unittests                     0x000000010bb1a82e -[BridgedContentView keyDown:] + 94

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 27 2016

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

commit 1ce26dc83bff3f79f27b698f9cddeb7d9470949a
Author: tapted <tapted@chromium.org>
Date: Mon Jun 27 03:13:03 2016

Add views_unittests to Mac10.{9,9(dbg),10,11} and asan bots

Disable a few tests we haven't gotten to fixing yet, since it's more
important to get the rest into continuous integration at this point.

Will land this at a quiet time on the weekend, and monitor closely
for potential flakes or other problems.

Recently added tests disabled due to missing GetGlobalCapture()
implementation:
 - MenuRunnerTest.WidgetDoesntTakeCapture
 - WidgetTest.MousePressCausesCapture
 - WidgetTest.CaptureDuringMousePressNotOverridden

Disabled on 10.9 only (different native Textfield behaviour):
 - BridgedNativeWidgetTest.TextInput_MoveEditingCommands
 - BridgedNativeWidgetTest.TextInput_DeleteCommands

Also disables:
 - WidgetTest.FullscreenFrameLayout [fails only on bots]
 - StyledLabelTest.StyledRangeBold [fails only on 10.10]

But the other ~720 tests pass.

Disables tests for recent regressions in r401862 and r401987. We need
that continuous integration - stat!

BUG= 500806 ,  621734 ,  622979 ,  622983 ,  622979 ,  607403 ,  623420 ,  623421 

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

[modify] https://crrev.com/1ce26dc83bff3f79f27b698f9cddeb7d9470949a/testing/buildbot/chromium.fyi.json
[modify] https://crrev.com/1ce26dc83bff3f79f27b698f9cddeb7d9470949a/testing/buildbot/chromium.mac.json
[modify] https://crrev.com/1ce26dc83bff3f79f27b698f9cddeb7d9470949a/testing/buildbot/chromium.memory.json
[modify] https://crrev.com/1ce26dc83bff3f79f27b698f9cddeb7d9470949a/ui/views/cocoa/bridged_native_widget_unittest.mm
[modify] https://crrev.com/1ce26dc83bff3f79f27b698f9cddeb7d9470949a/ui/views/controls/menu/menu_runner_unittest.cc
[modify] https://crrev.com/1ce26dc83bff3f79f27b698f9cddeb7d9470949a/ui/views/controls/styled_label_unittest.cc
[modify] https://crrev.com/1ce26dc83bff3f79f27b698f9cddeb7d9470949a/ui/views/controls/textfield/textfield_unittest.cc
[modify] https://crrev.com/1ce26dc83bff3f79f27b698f9cddeb7d9470949a/ui/views/widget/widget_unittest.cc

Labels: -Pri-0 Pri-2
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 29 2016

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

commit 84c48ee3ccb04d21a17e14428d15c64d17b3033f
Author: karandeepb <karandeepb@chromium.org>
Date: Wed Jun 29 04:09:15 2016

MacViews: Modify cocoa_test_event_utils::SynthesizeKeyEvent to use the correct event timestamp value.

This CL fixes the following views_unittests, currently disabled on MacViews-
  -TextfieldTest.DestroyingTextfieldFromOnKeyEvent
  -TextfieldTest.FocusTraversalTest
  -TextfieldTest.TextInputClientTest

These regressed in crrev.com/2007083002, which added a DCHECK to validate that
ui::Event::time_stamp comes from the same clock as TimeTicks::Now. These tests
fail since we are using a mocked system clock in tests, set using
SetEventTickClockForTesting in base_event_utils.h, against which the event
timestamp is validated. However cocoa_test_event_utils::SynthesizeKeyEvent uses
the actual/correct timestamp value, and not the mocked one.

This CL fixes the tests by using a timestamp value obtained from
ui::EventTimeForNow. This returns the mocked time (if applicable), or
base::TimeTicks::Now(). base::TimeTicks::Now() internally uses the same logic as
TimeIntervalSinceSystemStartup() did previously (i.e. mach_absolute_time()).

BUG= 623420 ,  607403 

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

[modify] https://crrev.com/84c48ee3ccb04d21a17e14428d15c64d17b3033f/ui/events/test/cocoa_test_event_utils.h
[modify] https://crrev.com/84c48ee3ccb04d21a17e14428d15c64d17b3033f/ui/events/test/cocoa_test_event_utils.mm
[modify] https://crrev.com/84c48ee3ccb04d21a17e14428d15c64d17b3033f/ui/views/controls/textfield/textfield_unittest.cc

Status: Fixed (was: Assigned)
Components: Tests>Disabled
Labels: Test-Disabled

Sign in to add a comment