forked from mirrors/gecko-dev
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D36052 --HG-- extra : source : b5be5b4f4b47c256e28a29f665dc754f6407ee7f
16 lines
517 B
JavaScript
16 lines
517 B
JavaScript
function run_test() {
|
|
let result = Cc["@mozilla.org/autocomplete/simple-result;1"].createInstance(
|
|
Ci.nsIAutoCompleteSimpleResult
|
|
);
|
|
result.appendMatch("a", "");
|
|
result.appendMatch("b", "");
|
|
result.removeMatchAt(0);
|
|
Assert.equal(result.matchCount, 1);
|
|
Assert.equal(result.getValueAt(0), "b");
|
|
result.appendMatch("c", "");
|
|
result.removeMatchAt(1);
|
|
Assert.equal(result.matchCount, 1);
|
|
Assert.equal(result.getValueAt(0), "b");
|
|
result.removeMatchAt(0);
|
|
Assert.equal(result.matchCount, 0);
|
|
}
|