Closed Bug 784186 Opened 13 years ago Closed 13 years ago

Robocop: several tests sometimes fail loading second page

Categories

(Testing :: General, defect)

x86
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla17

People

(Reporter: gbrown, Assigned: gbrown)

References

Details

Attachments

(1 file, 1 obsolete file)

testHistoryTab usually fails when I run it on the Galaxy Nexus, while loading the second url: the check for the awesome bar text fails, getting the text for the previous url, from the previous awesome bar activity. I have not seen this problem on the tegras or on any other device. The issue arises from the code in this particular test that loads 2 urls back-to-back (to get the 2 entries in the history list). As soon as we receive DOMContentLoaded for the first url, the test clicks on the awesome bar to enter the 2nd url -- in doing so, the activity monitor trick we use in getActivityFromClick sometimes fails, and we get the wrong activity.
Attached patch wait for paint after loading (obsolete) — Splinter Review
This patch uses PixelText.loadAndPaint to wait not just for DOMContentLoaded, but for paint completion before proceeding. (I also noticed some checks for text like "Bookmark" -- changed this to "^Bookmark$" just to be more safe/explicit.)
Expanding the scope of this bug -- with more testing, I see the same problem affecting other tests: testAboutPage testBookmark testBookmarklets testHistoryTab Waiting for paint completion resolves all of these problems on the Galaxy Nexus.
Summary: Robocop: testHistoryTab sometimes fails loading second page → Robocop: several tests sometimes fail loading second page
This patch uses loadAndPaint instead of loadUrl for the affected tests.
Attachment #653559 - Attachment is obsolete: true
Attachment #653743 - Flags: review?(jmaher)
Comment on attachment 653743 [details] [diff] [review] wait for paint after loading Review of attachment 653743 [details] [diff] [review]: ----------------------------------------------------------------- good find. These changes look pretty straightforward. Are there any tests not using PixelTest now?
Attachment #653743 - Flags: review?(jmaher) → review+
(In reply to Joel Maher (:jmaher) from comment #5) > Are there any tests > not using PixelTest now? Yes, there are several (eg testAwesomebar). There are cases where we don't do much after loading a url, or do an unrelated task after loading, where we don't need to wait for page display.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Depends on: 797615
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: