Closed Bug 895659 Opened 12 years ago Closed 8 years ago

Basic failure inside test_sanitySimpletest.html on b2g

Categories

(Testing :: Mochitest, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: onecyrenus, Unassigned)

Details

Attachments

(1 file)

Basic test failure in test_sanitySimpletest.html Trying to access a clipboard that is non existent in b2g. SimpleTest.waitForClipboard("a", function () { SpecialPowers.clipboardCopyString("a"); }, function () { check = true; }, function () { check = false; } ); is(check, true, "waitForClipboard should work"); My recommended fix would be to move this test to another file, and only run on desktop.
Attached patch Bug895659.patchSplinter Review
This is an idea for a patch, haven't tested it as of yet, but would like to gather feedback before we go further. But the idea is to run desktop functionality on desktop and not gonk. This general approach can be applied to many tests where the functionality between desktop / b2g differ.
This is a harness test issue, please cc / add the requisite people on the bug.
This seems like a reasonable approach to me here. In other cases (in order to avoid too much duplication) we may want to skip b2g-specific tests by checking Services.appinfo.name (via SpecialPowers).
Eventually, clipboard will become available for b2g, see bug 747798. Wouldn't that mean, that test file would be able to work also on b2g? Then the file would be have to moved back? Isn't an entry in the b2g.json file a better solution then?
It might be best to mark tests like this that fail as todo() if Services.appinfo.name == "B2G"; this will force the test to get updated when the affected code changes.
Mass resolving of B2G mochitest bugs.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: