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: add_autocomplete_test([ michael@0: "Searching for host match without slash should match host", michael@0: "file", michael@0: "file.org/", michael@0: function () { michael@0: promiseAddVisits({ uri: NetUtil.newURI("http://file.org/test/"), michael@0: transition: TRANSITION_TYPED }, michael@0: { uri: NetUtil.newURI("file:///c:/test.html"), michael@0: transition: TRANSITION_TYPED } michael@0: ); michael@0: }, michael@0: ]); michael@0: michael@0: add_autocomplete_test([ michael@0: "Searching match with slash at the end should do nothing", michael@0: "file.org/", michael@0: "file.org/", michael@0: function () { michael@0: promiseAddVisits({ uri: NetUtil.newURI("http://file.org/test/"), michael@0: transition: TRANSITION_TYPED }, michael@0: { uri: NetUtil.newURI("file:///c:/test.html"), michael@0: transition: TRANSITION_TYPED } michael@0: ); michael@0: }, michael@0: ]); michael@0: michael@0: add_autocomplete_test([ michael@0: "Searching match with slash in the middle should match url", michael@0: "file.org/t", michael@0: "file.org/test/", michael@0: function () { michael@0: promiseAddVisits({ uri: NetUtil.newURI("http://file.org/test/"), michael@0: transition: TRANSITION_TYPED }, michael@0: { uri: NetUtil.newURI("file:///c:/test.html"), michael@0: transition: TRANSITION_TYPED } michael@0: ); michael@0: }, michael@0: ]); michael@0: michael@0: add_autocomplete_test([ michael@0: "Searching for non-host match without slash should not match url", michael@0: "file", michael@0: "file", michael@0: function () { michael@0: promiseAddVisits({ uri: NetUtil.newURI("file:///c:/test.html"), michael@0: transition: TRANSITION_TYPED }); michael@0: }, michael@0: ]);