Last Comment Bug 504586 - mochitest-plain: docshell/test/navigation/test_bug430723.html fails if asynchronous scroll doesn't finish by checking
: mochitest-plain: docshell/test/navigation/test_bug430723.html fails if asynch...
Status: RESOLVED FIXED
: intermittent-failure, regression
Product: Core
Classification: Components
Component: Keyboard: Navigation (show other bugs)
: Trunk
: x86 All
: -- normal (vote)
: mozilla11
Assigned To: Masayuki Nakano [:masayuki] (Mozilla Japan) (working slowly due to injured)
:
Mentors:
http://mxr.mozilla.org/mozilla-centra...
Depends on: 430723
Blocks: 178324 438871
  Show dependency treegraph
 
Reported: 2009-07-16 09:42 PDT by Serge Gautherie (:sgautherie)
Modified: 2012-11-25 19:31 PST (History)
10 users (show)
benjamin: blocking1.9.2-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (3.70 KB, patch)
2011-12-08 08:35 PST, Masayuki Nakano [:masayuki] (Mozilla Japan) (working slowly due to injured)
no flags Details | Diff | Review
Patch (3.41 KB, patch)
2011-12-09 05:17 PST, Masayuki Nakano [:masayuki] (Mozilla Japan) (working slowly due to injured)
bugs: review+
Details | Diff | Review

Description Serge Gautherie (:sgautherie) 2009-07-16 09:42:32 PDT
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090715 SeaMonkey/2.1a1pre] (home, optim default) (W2Ksp4)
(http://hg.mozilla.org/mozilla-central/rev/d190d9b6ccd1
 +http://hg.mozilla.org/comm-central/rev/773809454cf2 + bug 503724 patch)

{
...
... | Page2: Ensure we could scrol. - Didn't expect 0, but got it.
...
... | Page2Again: Ensure we can still scroll. - Didn't expect 0, but got it.
}

NB: While there, add missing 'l' to 'scrol'.

(I don't know if this is anyhow related to bug 465096.)
Comment 1 Serge Gautherie (:sgautherie) 2009-07-16 11:11:20 PDT
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.2a1pre) Gecko/20090715
SeaMonkey/2.0b1pre] (experimental/_m-c_, home, optim default) (W2Ksp4)

(http://hg.mozilla.org/mozilla-central/rev/1057ca8f2a91
 +http://hg.mozilla.org/comm-central/rev/d1a9b79cf5c2)

Passes.

(http://hg.mozilla.org/mozilla-central/rev/cabb8925dcd3
 +http://hg.mozilla.org/comm-central/rev/d1a9b79cf5c2)

Fails.

Regression timeframe:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=1057ca8f2a91&tochange=cabb8925dcd3
2 changesets:
bug 488846 is Firefox only,
then this is a "Bug 178324, refactor focus" fallout.

This is probably a case of bug 497839.
Comment 2 Chris Pearce (:cpearce) 2009-07-16 14:53:20 PDT
What's the issue here? Is test_bug430723 failing when you add some patch to seamonkey branch?
Comment 3 Serge Gautherie (:sgautherie) 2009-07-16 15:23:23 PDT
(In reply to comment #2)

> What's the issue here?

The test used to pass even without being focused.

> Is test_bug430723 failing when you add some patch to seamonkey branch?

No sure what you mean.
Comment 4 Chris Pearce (:cpearce) 2009-07-16 15:34:15 PDT
(In reply to comment #3)
> (In reply to comment #2)
> The test used to pass even without being focused.

Maybe a regression from the great focus rewrite then.

Where is the test failing and under what conditions?

> > Is test_bug430723 failing when you add some patch to seamonkey branch?
> 
> No sure what you mean.

Your bug report is unclear. I was trying to guess what you meant based on the you comments provided.
Comment 5 Serge Gautherie (:sgautherie) 2009-07-16 16:17:38 PDT
(In reply to comment #4)
> Maybe a regression from the great focus rewrite then.

Comment 1 says it is...

> Where is the test failing and under what conditions?

Comment 0 says 'Page2' and 'Page2Again' checks...

Summary says 'when test window does not have focus'...
(As in: run the test command from shell, (quickly) switch to another window, let the test load and run in background, ...)

> Your bug report is unclear.

Well, I thought it couldn't be clearer: has condition, error report, regression timeframe, ...
Comment 6 Chris Pearce (:cpearce) 2009-07-16 16:38:39 PDT
(In reply to comment #5)
> Summary says 'when test window does not have focus'...
> (As in: run the test command from shell, (quickly) switch to another window,
> let the test load and run in background, ...)

You should always leave the focus on the mochitest window. It's known to have problems when it loses focus. Many tests fail if the window loses focus.
Comment 7 Serge Gautherie (:sgautherie) 2009-07-16 16:52:44 PDT
(In reply to comment #6)
> It's known to have problems when it loses focus.

It is ... and this bug is about the regression affecting this very test...
Comment 8 Martijn Wargers [:mwargers] (gone per 2016-05-31 :-( ) 2009-07-17 10:18:38 PDT
From what I understand from it, eventutils.sendkeyevent can't be expected to work when the window doesn't have focus.
That this apparently used to work is a bug, which is now fixed by bug 178324.
Comment 9 Karl Tomlinson (ni?:karlt) 2009-07-22 22:40:50 PDT
Linux mozilla-central test mochitests on 2009/07/22 19:35:28
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248316528.1248318609.21339.gz
Comment 10 Drew Willcoxon :adw 2009-07-28 13:15:44 PDT
WINNT 5.2 mozilla-central test mochitests on 2009/07/28 10:26:40  
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248802000.1248804768.21084.gz
Comment 11 David Dahl :ddahl 2009-08-10 12:39:37 PDT
29085 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/navigation/test_bug430723.html | Page2: Ensure we could scrol. - Didn't expect 0, but got it.

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1249925504.1249927242.28886.gz
Comment 12 Robert Strong [:rstrong] (use needinfo to contact me) 2009-08-20 19:55:05 PDT
Linux mozilla-central unit test on 2009/08/20 17:46:20
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1250815580.1250822663.11076.gz

31093 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/navigation/test_bug430723.html | Page2: Ensure we could scrol. - Didn't expect 0, but got it.
etc.
Comment 13 Chris Pearce (:cpearce) 2009-09-01 20:28:47 PDT
Linux mozilla-central test mochitests on 2009/09/01 19:45:24
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1251859524.1251861874.13258.gz
Comment 14 Serge Gautherie (:sgautherie) 2009-09-16 09:11:38 PDT
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1253114345.1253116296.23138.gz
Linux mozilla-central test mochitests on 2009/09/16 08:19:05

... | Page2: Ensure we could scrol. - Didn't expect 0, but got it.
Comment 15 Honza Bambas (:mayhemer) 2009-11-17 07:57:56 PST
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.6-Unittest/1258457641.1258461442.15374.gz
WINNT 5.2 mozilla-1.9.2 test mochitests on 2009/11/17 03:34:01
Comment 16 Robert O'Callahan (:roc) (Exited; email my personal email if necessary) 2009-11-18 21:24:43 PST
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.6-Unittest/1258602637.1258605859.22542.gz
Linux mozilla-1.9.2 test mochitests on 2009/11/18 19:50:37
Comment 17 Treeherder Robot 2011-12-07 21:36:28 PST
masayuki%d-toybox.com
https://tbpl.mozilla.org/php/getParsedLog.php?id=7814249&tree=Mozilla-Inbound
Rev3 MacOSX Leopard 10.5.8 mozilla-inbound opt test mochitests-2/5 on 2011-12-07 20:37:57

168 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/navigation/test_bug430723.html | Page1: Ensure we can scroll down. - didn't expect 0, but got it
Comment 18 Masayuki Nakano [:masayuki] (Mozilla Japan) (working slowly due to injured) 2011-12-08 08:35:37 PST
Created attachment 580056 [details] [diff] [review]
Patch

The cause isn't a focus problem.

The scroll by arrow keys are asynchronous scrolling. So, the scroll might not finish by next executeSoon. So, the tests should listen to scroll events before sending key events.

try:
https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=f670c36557ec
Comment 19 Masayuki Nakano [:masayuki] (Mozilla Japan) (working slowly due to injured) 2011-12-08 16:13:59 PST
Comment on attachment 580056 [details] [diff] [review]
Patch

oops, we shouldn't send key events directly from event handlers. I'll post a new patch.
Comment 20 Masayuki Nakano [:masayuki] (Mozilla Japan) (working slowly due to injured) 2011-12-09 05:17:00 PST
Created attachment 580378 [details] [diff] [review]
Patch
Comment 21 Masayuki Nakano [:masayuki] (Mozilla Japan) (working slowly due to injured) 2011-12-16 05:41:31 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/e218f75ccc41
Comment 22 Matt Brubeck (:mbrubeck) 2011-12-17 09:06:18 PST
https://hg.mozilla.org/mozilla-central/rev/e218f75ccc41

Note You need to log in before you can comment on or make changes to this bug.