Closed Bug 775071 Opened 13 years ago Closed 13 years ago

testCheck3 doesn't actually disable screenshotting

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 17

People

(Reporter: kats, Assigned: kats)

Details

Attachments

(2 files, 2 obsolete files)

testCheck3 looks for the disableScreenshot function on GeckoAppShell when in fact it is on ScreenshotHandler. Therefore it never actually disables the screenshot code, and testCheck3 ends up being the same as testCheck2. This was never caught because the mAsserter instance in talos tests is a sad empty shell that does nothing. That should probably be changed so that it either throws an UnsupportedOperationException, or does something useful rather than silently doing nothing.
It looks like disableScreenshot() was moved by bug 755070, so testCheck3 results before June 4 should be okay...but it was probably disabled for much of that time! I have been frustrated and concerned by the Talos asserter before -- we really should do something about that.
Filed bug 775102 for fixing FennecTalosAssert
Attached patch (1/2) Make the test fail (obsolete) — Splinter Review
Untested, but this corrects the error detection to make the test actually fail as it should.
Attached patch (2/2) Make the test pass (obsolete) — Splinter Review
Also untested but this should fix the underlying bug in the test to make it pass again.
This aborts the test if we can't call disableScreenshot(), which prevents the __start_report output from being printed, and in combination with bug 775102, causes the test to fail. Try run at https://tbpl.mozilla.org/?tree=Try&rev=72c8fbfe2a71
Attachment #643374 - Attachment is obsolete: true
Attachment #643888 - Flags: review?(gbrown)
Attachment #643888 - Attachment description: Make the test fail → (1/2) Make the test fail
This fixes the method-finding code so the test passes again. Try run at https://tbpl.mozilla.org/?tree=Try&rev=4bf4eee5ce53 (first one had an infra error during cleanup but from the log it's a pass). Note that there's still this error in the log: NOISE: __FAILchecking that painted surface loaded: painted surface loaded__FAIL which should be investigated.
Attachment #643375 - Attachment is obsolete: true
Attachment #643889 - Flags: review?(gbrown)
And filed bug 775614 for the painted surface failure in the previous comment.
Comment on attachment 643888 [details] [diff] [review] (1/2) Make the test fail Review of attachment 643888 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/tests/testCheck3.java.in @@ +16,5 @@ > // this distinguishes this test from testCheck2, which is otherwise > // identical. > + if (!disableScreenshot()) { > + // if this fails the running the test is pointless. abort, > + // the lack of report output should get picked up as an error nit -- this comment is a little confusing. Maybe something like "If the screenshot cannot be disabled, there is no point to this test: abort..." ?
Attachment #643888 - Flags: review?(gbrown) → review+
Attachment #643889 - Flags: review?(gbrown) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: