toolkit/components/places/tests/inline/test_queryurl.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
michael@0 3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 add_autocomplete_test([
michael@0 6 "Searching for host match without slash should match host",
michael@0 7 "file",
michael@0 8 "file.org/",
michael@0 9 function () {
michael@0 10 promiseAddVisits({ uri: NetUtil.newURI("http://file.org/test/"),
michael@0 11 transition: TRANSITION_TYPED },
michael@0 12 { uri: NetUtil.newURI("file:///c:/test.html"),
michael@0 13 transition: TRANSITION_TYPED }
michael@0 14 );
michael@0 15 },
michael@0 16 ]);
michael@0 17
michael@0 18 add_autocomplete_test([
michael@0 19 "Searching match with slash at the end should do nothing",
michael@0 20 "file.org/",
michael@0 21 "file.org/",
michael@0 22 function () {
michael@0 23 promiseAddVisits({ uri: NetUtil.newURI("http://file.org/test/"),
michael@0 24 transition: TRANSITION_TYPED },
michael@0 25 { uri: NetUtil.newURI("file:///c:/test.html"),
michael@0 26 transition: TRANSITION_TYPED }
michael@0 27 );
michael@0 28 },
michael@0 29 ]);
michael@0 30
michael@0 31 add_autocomplete_test([
michael@0 32 "Searching match with slash in the middle should match url",
michael@0 33 "file.org/t",
michael@0 34 "file.org/test/",
michael@0 35 function () {
michael@0 36 promiseAddVisits({ uri: NetUtil.newURI("http://file.org/test/"),
michael@0 37 transition: TRANSITION_TYPED },
michael@0 38 { uri: NetUtil.newURI("file:///c:/test.html"),
michael@0 39 transition: TRANSITION_TYPED }
michael@0 40 );
michael@0 41 },
michael@0 42 ]);
michael@0 43
michael@0 44 add_autocomplete_test([
michael@0 45 "Searching for non-host match without slash should not match url",
michael@0 46 "file",
michael@0 47 "file",
michael@0 48 function () {
michael@0 49 promiseAddVisits({ uri: NetUtil.newURI("file:///c:/test.html"),
michael@0 50 transition: TRANSITION_TYPED });
michael@0 51 },
michael@0 52 ]);

mercurial