michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: // Inline should never return matches shorter than the search string, since michael@0: // that largely confuses completeDefaultIndex michael@0: michael@0: add_autocomplete_test([ michael@0: "Do not autofill whitespaced entry 1", michael@0: "mozilla.org ", michael@0: "mozilla.org ", michael@0: function () { michael@0: promiseAddVisits({ uri: NetUtil.newURI("http://mozilla.org/link/"), michael@0: transition: TRANSITION_TYPED }); michael@0: } michael@0: ]); michael@0: michael@0: add_autocomplete_test([ michael@0: "Do not autofill whitespaced entry 2", michael@0: "mozilla.org/ ", michael@0: "mozilla.org/ ", michael@0: function () { michael@0: promiseAddVisits({ uri: NetUtil.newURI("http://mozilla.org/link/"), michael@0: transition: TRANSITION_TYPED }); michael@0: } michael@0: ]); michael@0: michael@0: add_autocomplete_test([ michael@0: "Do not autofill whitespaced entry 3", michael@0: "mozilla.org/link ", michael@0: "mozilla.org/link ", michael@0: function () { michael@0: promiseAddVisits({ uri: NetUtil.newURI("http://mozilla.org/link/"), michael@0: transition: TRANSITION_TYPED }); michael@0: } michael@0: ]); michael@0: michael@0: add_autocomplete_test([ michael@0: "Do not autofill whitespaced entry 4", michael@0: "mozilla.org/link/ ", michael@0: "mozilla.org/link/ ", michael@0: function () { michael@0: promiseAddVisits({ uri: NetUtil.newURI("http://mozilla.org/link/"), michael@0: transition: TRANSITION_TYPED }); michael@0: } michael@0: ]); michael@0: michael@0: michael@0: add_autocomplete_test([ michael@0: "Do not autofill whitespaced entry 5", michael@0: "moz illa ", michael@0: "moz illa ", michael@0: function () { michael@0: promiseAddVisits({ uri: NetUtil.newURI("http://mozilla.org/link/"), michael@0: transition: TRANSITION_TYPED }); michael@0: } michael@0: ]); michael@0: michael@0: add_autocomplete_test([ michael@0: "Do not autofill whitespaced entry 6", michael@0: " mozilla", michael@0: " mozilla", michael@0: function () { michael@0: promiseAddVisits({ uri: NetUtil.newURI("http://mozilla.org/link/"), michael@0: transition: TRANSITION_TYPED }); michael@0: } michael@0: ]);