Closed Bug 902562 Opened 11 years ago Closed 11 years ago

Add tests for keyboard/IME api

Categories

(Firefox OS Graveyard :: Gaia::Keyboard, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: xyuan, Assigned: janjongboom)

References

Details

Attachments

(1 file)

We need a way to test the keyboard API and ensure it is correctly implemented.
Assignee: nobody → janjongboom
This enables us to use mozInputMethod from FF Desktop when developing Gaia or running unit tests.
Attachment #787459 - Flags: review?(rlu)
Comment on attachment 787459 [details]
Expose new API to desktop helper & some first tests

I would like to add it as regular unit test but I couldn't make the keyboard API sideload in a test, therefore it's a standalone mocha app that runs as an application on the device (or as an application in FF desktop).
Attachment #787459 - Attachment description: Part 1 - Expose to desktop helper → Expose new API to desktop helper & some first tests
Comment on attachment 787459 [details]
Expose new API to desktop helper & some first tests

Reassigning because it's mainly tests around the B2G code...
Attachment #787459 - Flags: review?(rlu) → review?(xyuan)
Comment on attachment 787459 [details]
Expose new API to desktop helper & some first tests

Hi Jan, I add some comments to the pull request(https://github.com/mozilla-b2g/gaia/pull/11426). The patch is almost done and just need a few fixes.
Attachment #787459 - Flags: review?(xyuan) → review-
Comment on attachment 787459 [details]
Expose new API to desktop helper & some first tests

I'm not familar Gaia Unit test, so I ask Rudy to review the gaia part.
Attachment #787459 - Flags: review?(rlu)
Hi Jan, I think mochitest on gecko would be the best choice of testing the keyboard API. But it seems there is some problem running mochiest on b2g-desktop and device now. When the probem is fixed, we hope these tests will be moved to mochitest.
Comment on attachment 787459 [details]
Expose new API to desktop helper & some first tests

Hi, if the test itself is focusing on Gecko changes, I would suggest it tested by mochi-test or something that used for Gecko tests instead of using Gaia unit test framework.

From Gaia point of view, what we need first is a "keyboard API testbed".
 1. the testbed itself is a keyboard (IME) app.
 2. It has the simplest UI to invoke each function of keyboard API.
    like, one button for sendKey(), and another for getting inputContext, etc.

Jan,
Does this make sense to you?

Thank you for your effort.
Attachment #787459 - Flags: review?(rlu)
As per bug 899999 :fabrice wanted to land these tests in Gaia. Can you live with that?
Flags: needinfo?(rlu)
Ok, then I'll take a look.
Thanks.
Flags: needinfo?(rlu)
Attachment #787459 - Flags: review- → review?(rlu)
Comment on attachment 787459 [details]
Expose new API to desktop helper & some first tests

I've run the tests with Firefox Nightly and it could work.
r=me.


Jan,

Thanks for this great work.
Attachment #787459 - Flags: review?(rlu) → review+
Since Bug 899073 has landed, the test should be modified, especially for getText() part.
I've landed the patch because of bug 906497 but will write a new patch for the changes to WebIDL. https://github.com/mozilla-b2g/gaia/commit/ef43d4242989cac29ef464508cb9c55d7954ae54
Let's continue in bug 906096 and close this one.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Hi Jan, it seems this bug has nothing to do with bug 906096(Ensure keyboard continues to work in Firefox Nightly).
The api tests should be working on at least b2g desktop and device. It is optional to work on Firefox desktop nightly build.

Did you close the wrong bug?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
No, but I needed to touch Gaia in bug 906096 anyway, so porting over the WebIDL to browser-helper and fixing the tests in Gaia could be in one go. It makes no sense to have them in two different PRs.
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: