Closed
Bug 987533
Opened 11 years ago
Closed 11 years ago
[keyboard refactor] breakdown MockEventTarget, MockInputMethod, and MockInputContext from input_field_test.js
Categories
(Firefox OS Graveyard :: Gaia::Keyboard, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.4 S6 (25apr)
People
(Reporter: gduan, Assigned: timdream)
References
Details
Attachments
(1 file)
Follow-up bug of bug 977452
We may need to breakdown MockEventTarget, MockInputMethod, and MockInputContext from input_field_test.js.
| Reporter | ||
Updated•11 years ago
|
Summary: [keyboard refactor] break down mocks mocks from input_field.test → [keyboard refactor] breakdown MockEventTarget, MockInputMethod, and MockInputContext from input_field_test.js
| Assignee | ||
Comment 1•11 years ago
|
||
Taking, and I will implement this bug by converting MockDOMRequest.
Assignee: nobody → timdream
| Assignee | ||
Comment 2•11 years ago
|
||
Status: NEW → ASSIGNED
| Assignee | ||
Comment 3•11 years ago
|
||
Pull request updated with all the mocks, I am now converting the input_field.js tests.
| Assignee | ||
Comment 5•11 years ago
|
||
Comment on attachment 8397833 [details] [review]
mozilla-b2g:master PR#17709
Jan, could you review the input_method_test.js?
Alive, could you review the mocks?
Attachment #8397833 -
Flags: review?(janjongboom)
Attachment #8397833 -
Flags: review?(alive)
Comment 6•11 years ago
|
||
Comment on attachment 8397833 [details] [review]
mozilla-b2g:master PR#17709
r+ for mock-event-target part.
Attachment #8397833 -
Flags: review?(alive) → review+
Comment 7•11 years ago
|
||
Comment on attachment 8397833 [details] [review]
mozilla-b2g:master PR#17709
I don't think we're actually testing anything here at the moment. Yeah, if properties are copied correct from a mocked object. But that's all there is, and I doubt if that required a 500 line test file to be honest.
I would rather like to test this against the real mozInputMethod as I don't think these tests will ever catch a regression or make more to the point tests.
Leaving r? open for now to get some feedback :-)
Flags: needinfo?(timdream)
| Assignee | ||
Comment 8•11 years ago
|
||
The purpose of input_field_test.js is to test the input_field.js. If you want to test the API part we would need to write integration tests.
That said, we do need to verify the mock is indeed interact with InputField in the correct sequence. It would be worthy of to figure out we have enough mochitests for API in Gecko too.
Flags: needinfo?(timdream)
| Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(janjongboom)
Comment 9•11 years ago
|
||
All the tests assume that promises will always resolve positively; but that's not the case (e.g. keypress gets preventDefaulted). Are we covering this in a follow up issue in the end?
Flags: needinfo?(janjongboom) → needinfo?(timdream)
| Assignee | ||
Comment 10•11 years ago
|
||
(In reply to Jan Jongboom [:janjongboom] from comment #9)
> All the tests assume that promises will always resolve positively; but
> that's not the case (e.g. keypress gets preventDefaulted). Are we covering
> this in a follow up issue in the end?
Right, I filed bug 994583.
Flags: needinfo?(timdream)
| Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(janjongboom)
Comment 11•11 years ago
|
||
Comment on attachment 8397833 [details] [review]
mozilla-b2g:master PR#17709
r=me.
Attachment #8397833 -
Flags: review?(janjongboom) → review+
Flags: needinfo?(janjongboom)
| Assignee | ||
Comment 12•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•11 years ago
|
Target Milestone: --- → 1.4 S6 (25apr)
You need to log in
before you can comment on or make changes to this bug.
Description
•