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

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

mercurial