Bug 911951 part.2 Reimplement synthesizeText() in EventUtils.js and remove nsIDOMWindowUtils.COMPOSITION_ATTR_* from all tests r=smaug

This commit is contained in:
Masayuki Nakano 2013-09-13 00:19:00 +09:00
parent ef265d6f36
commit 572b2630b7
6 changed files with 88 additions and 104 deletions

View File

@ -219,7 +219,6 @@ function runTests()
}
// IME
const nsIDOMWindowUtils = Components.interfaces.nsIDOMWindowUtils;
// start composition
synthesizeComposition({ type: "compositionstart" });
// input first character
@ -229,7 +228,7 @@ function runTests()
{ "string": "\u3089",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }

View File

@ -686,7 +686,7 @@ function _getDOMWindowUtils(aWindow)
getInterface(_EU_Ci.nsIDOMWindowUtils);
}
// Must be synchronized with nsIDOMWindowUtils.
// Must be synchronized with nsICompositionStringSynthesizer.
const COMPOSITION_ATTR_RAWINPUT = 0x02;
const COMPOSITION_ATTR_SELECTEDRAWTEXT = 0x03;
const COMPOSITION_ATTR_CONVERTEDTEXT = 0x04;
@ -741,7 +741,7 @@ function synthesizeComposition(aEvent, aWindow)
* When it's composing, set the each clauses' length to the
* |composition.clauses[n].length|. The sum of the all length
* values must be same as the length of |composition.string|.
* Set nsIDOMWindowUtils.COMPOSITION_ATTR_* to the
* Set nsICompositionStringSynthesizer.ATTR_* to the
* |composition.clauses[n].attr|.
*
* When it's not composing, set 0 to the
@ -768,33 +768,20 @@ function synthesizeText(aEvent, aWindow)
return;
}
var firstClauseLength = aEvent.composition.clauses[0].length;
var firstClauseAttr = aEvent.composition.clauses[0].attr;
var secondClauseLength = 0;
var secondClauseAttr = 0;
var thirdClauseLength = 0;
var thirdClauseAttr = 0;
if (aEvent.composition.clauses[1]) {
secondClauseLength = aEvent.composition.clauses[1].length;
secondClauseAttr = aEvent.composition.clauses[1].attr;
if (aEvent.composition.clauses[2]) {
thirdClauseLength = aEvent.composition.clauses[2].length;
thirdClauseAttr = aEvent.composition.clauses[2].attr;
var compositionString = utils.createCompositionStringSynthesizer();
compositionString.setString(aEvent.composition.string);
if (aEvent.composition.clauses[0].length) {
for (var i = 0; i < aEvent.composition.clauses.length; i++) {
compositionString.appendClause(aEvent.composition.clauses[i].length,
aEvent.composition.clauses[i].attr);
}
}
var caretStart = -1;
var caretLength = 0;
if (aEvent.caret) {
caretStart = aEvent.caret.start;
caretLength = aEvent.caret.length;
compositionString.setCaret(aEvent.caret.start, aEvent.caret.length);
}
utils.sendTextEvent(aEvent.composition.string,
firstClauseLength, firstClauseAttr,
secondClauseLength, secondClauseAttr,
thirdClauseLength, thirdClauseAttr,
caretStart, caretLength);
compositionString.dispatchEvent();
}
/**

View File

@ -19,7 +19,7 @@
<script class="testbody" type="application/javascript">
<![CDATA[
SimpleTest.expectAssertions(8);
SimpleTest.expectAssertions(4);
SimpleTest.waitForExplicitFinish();
window.open("window_composition_text_querycontent.xul", "_blank",

View File

@ -1243,7 +1243,7 @@ function runEditorFlagChangeTests()
{ "string": "\u3078\u3093\u3057\u3093",
"clauses":
[
{ "length": 4, "attr": gUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 4, "length": 0 }

View File

@ -153,7 +153,6 @@ function startTests()
is(textarea.value, "", "textarea value isn't empty");
// IME events
const nsIDOMWindowUtils = Components.interfaces.nsIDOMWindowUtils;
clear();
// start composition
synthesizeComposition({ type: "compositionstart" });
@ -166,7 +165,7 @@ function startTests()
{ "string": "\u3089",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }

View File

@ -82,7 +82,6 @@ var iframe3 = document.getElementById("iframe3");
var input = document.getElementById("input");
var textareaInFrame;
const nsIDOMWindowUtils = Components.interfaces.nsIDOMWindowUtils;
const nsIDOMNSEditableElement = Components.interfaces.nsIDOMNSEditableElement;
const nsIEditorIMESupport = Components.interfaces.nsIEditorIMESupport;
const nsIInterfaceRequestor = Components.interfaces.nsIInterfaceRequestor;
@ -201,7 +200,7 @@ function runUndoRedoTest()
{ "string": "\u306D",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -213,7 +212,7 @@ function runUndoRedoTest()
{ "string": "\u306D\u3053",
"clauses":
[
{ "length": 2, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 2, "length": 0 }
@ -227,7 +226,7 @@ function runUndoRedoTest()
"clauses":
[
{ "length": 1,
"attr": nsIDOMWindowUtils.COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
"attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
]
},
"caret": { "start": 1, "length": 0 }
@ -258,7 +257,7 @@ function runUndoRedoTest()
{ "string": "\u307E",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -290,7 +289,7 @@ function runUndoRedoTest()
{ "string": "\u3080",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -302,7 +301,7 @@ function runUndoRedoTest()
{ "string": "\u3080\u3059",
"clauses":
[
{ "length": 2, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 2, "length": 0 }
@ -315,7 +314,7 @@ function runUndoRedoTest()
{ "string": "\u3080\u3059\u3081",
"clauses":
[
{ "length": 3, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 3, "length": 0 }
@ -329,7 +328,7 @@ function runUndoRedoTest()
"clauses":
[
{ "length": 1,
"attr": nsIDOMWindowUtils.COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
"attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
]
},
"caret": { "start": 1, "length": 0 }
@ -393,7 +392,7 @@ function runUndoRedoTest()
{ "string": "\u3088",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -405,7 +404,7 @@ function runUndoRedoTest()
{ "string": "\u3088\u3046",
"clauses":
[
{ "length": 2, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 2, "length": 0 }
@ -418,7 +417,7 @@ function runUndoRedoTest()
{ "string": "\u3088\u3046\u304b",
"clauses":
[
{ "length": 3, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 3, "length": 0 }
@ -431,7 +430,7 @@ function runUndoRedoTest()
{ "string": "\u3088\u3046\u304b\u3044",
"clauses":
[
{ "length": 4, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 4, "length": 0 }
@ -444,7 +443,7 @@ function runUndoRedoTest()
{ "string": "\u5996\u602a",
"clauses":
[
{ "length": 2, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
{ "length": 2, "attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
]
},
"caret": { "start": 2, "length": 0 }
@ -655,7 +654,7 @@ function runCompositionTest()
{ "string": "\u3089",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -680,7 +679,7 @@ function runCompositionTest()
{ "string": "\u3089\u30FC",
"clauses":
[
{ "length": 2, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 2, "length": 0 }
@ -715,7 +714,7 @@ function runCompositionTest()
{ "string": "\u3089\u30FC\u3081",
"clauses":
[
{ "length": 3, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 3, "length": 0 }
@ -748,7 +747,7 @@ function runCompositionTest()
{ "string": "\u3089\u30FC\u3081",
"clauses":
[
{ "length": 3, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 2, "length": 0 }
@ -782,7 +781,7 @@ function runCompositionTest()
{ "string": "\u3089\u30FC\u3081",
"clauses":
[
{ "length": 3, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -817,7 +816,7 @@ function runCompositionTest()
{ "string": "\u3089\u30FC\u3081\u3093",
"clauses":
[
{ "length": 4, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 4, "length": 0 }
@ -837,7 +836,7 @@ function runCompositionTest()
{ "string": "\u3089\u30FC\u3081",
"clauses":
[
{ "length": 3, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 3, "length": 0 }
@ -856,7 +855,7 @@ function runCompositionTest()
{ "string": "\u3089\u30FC\u3081\u3093",
"clauses":
[
{ "length": 4, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 4, "length": 0 }
@ -874,7 +873,7 @@ function runCompositionTest()
{ "string": "\u3089\u30FC\u3081\u3093\u3055",
"clauses":
[
{ "length": 5, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 5, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 5, "length": 0 }
@ -892,7 +891,7 @@ function runCompositionTest()
{ "string": "\u3089\u30FC\u3081\u3093\u3055\u3044",
"clauses":
[
{ "length": 6, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 6, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 6, "length": 0 }
@ -910,7 +909,7 @@ function runCompositionTest()
{ "string": "\u3089\u30FC\u3081\u3093\u3055\u3044\u3053",
"clauses":
[
{ "length": 7, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 7, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 7, "length": 0 }
@ -928,7 +927,7 @@ function runCompositionTest()
{ "string": "\u3089\u30FC\u3081\u3093\u3055\u3044\u3053\u3046",
"clauses":
[
{ "length": 8, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 8, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 8, "length": 0 }
@ -949,9 +948,9 @@ function runCompositionTest()
"clauses":
[
{ "length": 4,
"attr": nsIDOMWindowUtils.COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT },
"attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT },
{ "length": 2,
"attr": nsIDOMWindowUtils.COMPOSITION_ATTR_CONVERTEDTEXT }
"attr": COMPOSITION_ATTR_CONVERTEDTEXT }
]
},
"caret": { "start": 4, "length": 0 }
@ -959,7 +958,7 @@ function runCompositionTest()
if (!checkContent("\u30E9\u30FC\u30E1\u30F3\u6700\u9AD8",
"runCompositionTest", "#1-10") ||
!checkSelection(6, "", "runCompositionTest", "#1-10")) {
!checkSelection(4, "", "runCompositionTest", "#1-10")) {
return;
}
@ -970,9 +969,9 @@ function runCompositionTest()
"clauses":
[
{ "length": 4,
"attr": nsIDOMWindowUtils.COMPOSITION_ATTR_CONVERTEDTEXT },
"attr": COMPOSITION_ATTR_CONVERTEDTEXT },
{ "length": 2,
"attr": nsIDOMWindowUtils.COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
"attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
]
},
"caret": { "start": 6, "length": 0 }
@ -993,9 +992,9 @@ function runCompositionTest()
"clauses":
[
{ "length": 5,
"attr": nsIDOMWindowUtils.COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT },
"attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT },
{ "length": 3,
"attr": nsIDOMWindowUtils.COMPOSITION_ATTR_CONVERTEDTEXT }
"attr": COMPOSITION_ATTR_CONVERTEDTEXT }
]
},
"caret": { "start": 5, "length": 0 }
@ -1003,7 +1002,7 @@ function runCompositionTest()
if (!checkContent("\u30E9\u30FC\u30E1\u30F3\u3055\u884C\u3053\u3046",
"runCompositionTest", "#1-12") ||
!checkSelection(8, "", "runCompositionTest", "#1-12")) {
!checkSelection(5, "", "runCompositionTest", "#1-12")) {
return;
}
@ -1061,7 +1060,7 @@ function runCompositionTest()
{ "string": "\u3057",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -1079,7 +1078,7 @@ function runCompositionTest()
{ "string": "\u3058",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -1097,7 +1096,7 @@ function runCompositionTest()
{ "string": "\u3058\u3087",
"clauses":
[
{ "length": 2, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 2, "length": 0 }
@ -1116,7 +1115,7 @@ function runCompositionTest()
{ "string": "\u3058\u3087\u3046",
"clauses":
[
{ "length": 3, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 3, "length": 0 }
@ -1165,7 +1164,7 @@ function runCompositionTest()
{ "string": "\u304A",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -1203,7 +1202,7 @@ function runCompositionTest()
{ "string": "\u3046",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -1411,7 +1410,7 @@ function runCompositionTest()
{ "string": "\u6700",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -1603,7 +1602,7 @@ function runCompositionEventTest()
{ "string": "\u3089",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -1655,7 +1654,7 @@ function runCompositionEventTest()
{ "string": "\u3089\u30FC",
"clauses":
[
{ "length": 2, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 2, "length": 0 }
@ -1752,7 +1751,7 @@ function runCompositionEventTest()
{ "string": "\u3089",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -1833,7 +1832,7 @@ function runCompositionEventTest()
{ "string": "\u306D",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -1916,7 +1915,7 @@ function runCompositionEventTest()
{ "string": "\u306E",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -2302,7 +2301,7 @@ function runForceCommitTest()
{ "string": "\u306E",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -2356,7 +2355,7 @@ function runForceCommitTest()
{ "string": "\u306E",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -2402,7 +2401,7 @@ function runForceCommitTest()
{ "string": "\u306E",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -2445,7 +2444,7 @@ function runForceCommitTest()
{ "string": "\u306E",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -2492,7 +2491,7 @@ function runForceCommitTest()
{ "string": "\u306E",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -2539,7 +2538,7 @@ function runForceCommitTest()
{ "string": "\u306E",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -2587,7 +2586,7 @@ function runForceCommitTest()
{ "string": "\u306E",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -2634,7 +2633,7 @@ function runForceCommitTest()
{ "string": "\u306E",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -2679,7 +2678,7 @@ function runForceCommitTest()
{ "string": "\u306E",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -2729,7 +2728,7 @@ function runForceCommitTest()
{ "string": "\u306E",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -2816,7 +2815,7 @@ function runRemoveContentTest(aCallback)
{ "string": "\u306E",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -2917,7 +2916,7 @@ function runTestOnAnotherContext(aPanelOrFrame, aFocusedEditor, aTestName)
{ "string": "\u3078\u3093\u3057\u3093",
"clauses":
[
{ "length": 4, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 4, "length": 0 }
@ -2936,7 +2935,7 @@ function runTestOnAnotherContext(aPanelOrFrame, aFocusedEditor, aTestName)
"clauses":
[
{ "length": 2,
"attr": nsIDOMWindowUtils.COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
"attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
]
},
"caret": { "start": 2, "length": 0 }
@ -2955,7 +2954,7 @@ function runTestOnAnotherContext(aPanelOrFrame, aFocusedEditor, aTestName)
"clauses":
[
{ "length": 2,
"attr": nsIDOMWindowUtils.COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
"attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT }
]
},
"caret": { "start": 2, "length": 0 }
@ -3073,7 +3072,7 @@ function runMaxLengthTest()
{ "string": "\u3089",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }
@ -3091,7 +3090,7 @@ function runMaxLengthTest()
{ "string": "\u3089\u30FC",
"clauses":
[
{ "length": 2, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 2, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 2, "length": 0 }
@ -3110,7 +3109,7 @@ function runMaxLengthTest()
{ "string": "\u3089\u30FC\u3081",
"clauses":
[
{ "length": 3, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 3, "length": 0 }
@ -3129,7 +3128,7 @@ function runMaxLengthTest()
{ "string": "\u3089\u30FC\u3081\u3093",
"clauses":
[
{ "length": 4, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 4, "length": 0 }
@ -3149,7 +3148,7 @@ function runMaxLengthTest()
{ "string": "\u3089\u30FC\u3081",
"clauses":
[
{ "length": 3, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 3, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 3, "length": 0 }
@ -3168,7 +3167,7 @@ function runMaxLengthTest()
{ "string": "\u3089\u30FC\u3081\u3093",
"clauses":
[
{ "length": 4, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 4, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 4, "length": 0 }
@ -3186,7 +3185,7 @@ function runMaxLengthTest()
{ "string": "\u3089\u30FC\u3081\u3093\u3055",
"clauses":
[
{ "length": 5, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 5, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 5, "length": 0 }
@ -3204,7 +3203,7 @@ function runMaxLengthTest()
{ "string": "\u3089\u30FC\u3081\u3093\u3055\u3044",
"clauses":
[
{ "length": 6, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 6, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 6, "length": 0 }
@ -3222,7 +3221,7 @@ function runMaxLengthTest()
{ "string": "\u3089\u30FC\u3081\u3093\u3055\u3044\u3053",
"clauses":
[
{ "length": 7, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 7, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 7, "length": 0 }
@ -3241,7 +3240,7 @@ function runMaxLengthTest()
{ "string": "\u3089\u30FC\u3081\u3093\u3055\u3044\u3053\u3046",
"clauses":
[
{ "length": 8, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 8, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 8, "length": 0 }
@ -3262,16 +3261,16 @@ function runMaxLengthTest()
"clauses":
[
{ "length": 4,
"attr": nsIDOMWindowUtils.COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT },
"attr": COMPOSITION_ATTR_SELECTEDCONVERTEDTEXT },
{ "length": 2,
"attr": nsIDOMWindowUtils.COMPOSITION_ATTR_CONVERTEDTEXT }
"attr": COMPOSITION_ATTR_CONVERTEDTEXT }
]
},
"caret": { "start": 4, "length": 0 }
});
if (!checkContent("\u30E9\u30FC\u30E1\u30F3\u6700\u9AD8", kDesc, "#1-10") ||
!checkSelection(6, "", kDesc, "#1-10")) {
!checkSelection(4, "", kDesc, "#1-10")) {
return;
}
@ -3284,7 +3283,7 @@ function runMaxLengthTest()
{ "length": 0, "attr": 0 }
]
},
"caret": { "start": 8, "length": 0 }
"caret": { "start": 6, "length": 0 }
});
if (!checkContent("\u30E9", kDesc, "#1-11") ||
@ -3305,7 +3304,7 @@ function runMaxLengthTest()
{ "string": "\u3057",
"clauses":
[
{ "length": 1, "attr": nsIDOMWindowUtils.COMPOSITION_ATTR_RAWINPUT }
{ "length": 1, "attr": COMPOSITION_ATTR_RAWINPUT }
]
},
"caret": { "start": 1, "length": 0 }