Closed Bug 503988 Opened 15 years ago Closed 15 years ago

mochitest-chrome: intermittent "test_bug298622.xul | find failed on second page loaded"

Categories

(Core :: DOM: Navigation, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: cbartley, Assigned: jgriffin)

References

()

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 3 obsolete files)

TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | find failed on second page loaded

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1247517827.1247519709.11850.gz
Whiteboard: [orange]
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
How's that bug a duplicate of the issue this was filed on?
(In reply to comment #5)
> How's that bug a duplicate of the issue this was filed on?

It's not.  I reopened it once I recognized my mistake.
Hmmm, this passes on my machine on trunk.  Boris, do you think it needs something like:

setTimeout(nextTest, 0);

between these two lines:

      enterStringIntoFindField("A generic page");
      ok(TestWindow.getWindow().getSelection().toString().toLowerCase() == 
         "a generic page",
         "find failed on second page loaded");


in order to allow the key events in enterStringIntoFindField() to be processed?
Thing is, it's not failing all the time.  Just sometimes, right?

I rewrote that test using is() instead of ok() so if it fails again we'll at least see what the value actually was....
(In reply to comment #1)
> http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1247505930.1247512916.30053.gz

This run has two errors:
1158 ERROR TEST-UNEXPECTED-FAIL | ... | find failed on second page loaded
1164 ERROR TEST-UNEXPECTED-FAIL | ... | find failed on page loaded from bfcache

(In reply to comment #3)
> http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1247532828.1247536583.2273.gz

This run does not have this bug!
Blocks: 438871
Status: REOPENED → NEW
OS: Mac OS X → Linux
Summary: TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | find failed on second page loaded → mochitest-chrome: intermittent "test_bug298622.xul | find failed on second page loaded"
From that last log:

1158 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | find failed on second page loaded - got "", expected "a generic page".

I wonder whether this is a matter of paint suppression or something...  I'll try doing something akin to comment 7 but _before_ we start typing in the textfield, and see how that goes.
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1248078360.1248083510.22242.gz
Linux mozilla-central unit test on 2009/07/20 01:26:00  
1158 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | find failed on second page loaded - got "", expected "a generic page"
1164 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | find failed on page loaded from bfcache - got "", expected "find this"
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248074280.1248076135.8836.gz
Linux mozilla-central test everythingelse on 2009/07/20 00:18:00  
1158 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | find failed on second page loaded - got "", expected "a generic page"

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248090517.1248092183.22359.gz
Linux mozilla-central test everythingelse on 2009/07/20 04:48:37  
1158 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | find failed on second page loaded - got "", expected "a generic page"
1164 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | find failed on page loaded from bfcache - got "", expected "find this"
jgriffin could you please take a look at this? It's one of the larger causes of rando-orange causing pain on the mozilla-central tree.
Assignee: nobody → jgriffin
So we can try the suggestion from comment 7, but it really doesn't seem like that should be necessary.  Does anyone who know how the find impl in Firefox works want to take a look and see what's up here?
Attached patch mochitest update (obsolete) — Splinter Review
I've added the check from comment 7, plus an additional check that the expected string is in the Find bar's input field.  Passes locally.  Can someone commit?  I don't yet have commit privileges.
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248260677.1248262533.3708.gz
Linux mozilla-central test everythingelse on 2009/07/22 04:04:37  
1159 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | find failed on second page loaded - got "", expected "a generic page"
Attached patch another mochitest update (obsolete) — Splinter Review
Here are two more test changes.  

1) use waitForTrue() to attempt to wait for the Find operation to successfully select text on the screen, in case the problem is that this is just very slow on some machines.

2) detect the case where Firefox loses focus when the test is running, which will cause this test to fail (Find won't select anything on the window if the window in question doesn't have focus).

Can someone push when they have a chance?
Attachment #389715 - Attachment is obsolete: true
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248362050.1248364051.11801.gz
Linux mozilla-central test everythingelse on 2009/07/23 08:14:10  

1159 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | find failed on second page loaded - got "", expected "a generic page"
1165 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | find failed on page loaded from bfcache - got "", expected "find this"
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248377463.1248379694.31337.gz
Linux mozilla-central test everythingelse on 2009/07/23 12:31:03

1159 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | find failed on second page loaded - got "", expected "a generic page"

--------------

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248386867.1248389018.7517.gz
Linux mozilla-central test everythingelse on 2009/07/23 15:07:47

1159 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | find failed on second page loaded - got "", expected "a generic page"
Still having issues:

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248561807.1248563479.17910.gz
Linux mozilla-central test everythingelse on 2009/07/25 15:43:27

1158 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | Timed out waiting for condition
1161 ERROR TEST-UNEXPECTED-FAIL | chrome://mochikit/content/chrome/docshell/test/chrome/test_bug298622.xul | find failed on second page loaded - got "", expected "a generic page"
Attached patch another mochitest update (obsolete) — Splinter Review
OK, another attempt at a solution.  This version uses the find bar's internal methods for initiating the find, and verifies the find bar's internal status after the find is executed.  If this version still suffers sporadic failures, we may consider using mochitest's snapshot capability to detect whether the found text is selected, instead of getSelection().

Boris, can I bother you for another commit?
Attachment #389996 - Attachment is obsolete: true
Fix an error in the last patch before committing.
Attachment #390895 - Attachment is obsolete: true
The test has just failed with a different error message; I filed bug 508188.
I'm marking this as resolved, as this hasn't recurred in the ~3 weeks since the test fix was checked in.
Status: NEW → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Whiteboard: [orange]
Assignee: jgriffin → nobody
Attachment #391237 - Attachment description: another mochitest update → another mochitest update [Checkin: Comment 30]
Assignee: nobody → jgriffin
Flags: in-testsuite+
Target Milestone: --- → mozilla1.9.2a1
Whiteboard: [orange]
Whiteboard: [orange]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: