Closed Bug 1315898 Opened 8 years ago Closed 4 years ago

synthesizeComposition causes an exception in GeckoEditable.onSelectionChange

Categories

(Firefox for Android Graveyard :: Keyboards and IME, defect)

defect
Not set
normal

Tracking

(firefox52 wontfix)

RESOLVED WORKSFORME
Tracking Status
firefox52 --- wontfix

People

(Reporter: m_kato, Assigned: m_kato)

References

Details

When IME test on mochitest, we use synthesizeComposition and synthesizeCompositionChange by EventUtils.js.  When using these function, GeckoEditable.onSelectionChange will throw IllegalArgumentException.

Since this is mochitest, IME string doesn't set on Java's code.  So  mText.getCurrentText() will be empty on Android.

So we shouldn't throw exception on this method.  Since onSelectionChange will be called from JNI, this exception causes crash.
Depends on: 1310912
Blocks: 1310912
No longer depends on: 1310912
Component: Widget: Android → Keyboards and IME
Product: Core → Firefox for Android
https://public-artifacts.taskcluster.net/WaJhwpgJTMSF9YLzZTK1_A/0/public/logs/live_backing.log
{"action":"test_status","time":1478592736724,"thread":null,"pid":null,"source":"mochitest","test":"/tests/editor/libeditor/tests/test_bug1310912.html","subtest":"text should be undoed","status":"PASS","js_source":"TestRunner.js"}ⰲ겿
[task 2016-11-08T08:14:47.402125Z] 08:14:47     INFO -  11-08 00:12:16.752 I/GeckoDump(  765): MEMORY STAT | vsize 494MB | residentFast 125MB | heapAllocated 50MB
[task 2016-11-08T08:14:47.402304Z] 08:14:47     INFO -  11-08 00:12:16.762 E/GeckoEditable(  765): invalid selection notification range: 6 to 6, length: 3
[task 2016-11-08T08:14:47.402667Z] 08:14:47     INFO -  11-08 00:12:16.762 W/System.err(  765): java.lang.IllegalArgumentException: invalid selection notification range
[task 2016-11-08T08:14:47.402930Z] 08:14:47     INFO -  11-08 00:12:16.772 W/System.err(  765): 	at org.mozilla.gecko.GeckoEditable.onSelectionChange(GeckoEditable.java:1125)
[task 2016-11-08T08:14:47.403303Z] 08:14:47     INFO -  11-08 00:12:16.772 W/System.err(  765): 	at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method)
[task 2016-11-08T08:14:47.403651Z] 08:14:47     INFO -  11-08 00:12:16.772 W/System.err(  765): 	at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:513)
Too late for firefox 52, mass-wontfix.
Assignee: nobody → m_kato

This already works well. WFM.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.