Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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/. */
5 // Inline should never return matches shorter than the search string, since
6 // that largely confuses completeDefaultIndex
8 add_autocomplete_test([
9 "Do not autofill whitespaced entry 1",
10 "mozilla.org ",
11 "mozilla.org ",
12 function () {
13 promiseAddVisits({ uri: NetUtil.newURI("http://mozilla.org/link/"),
14 transition: TRANSITION_TYPED });
15 }
16 ]);
18 add_autocomplete_test([
19 "Do not autofill whitespaced entry 2",
20 "mozilla.org/ ",
21 "mozilla.org/ ",
22 function () {
23 promiseAddVisits({ uri: NetUtil.newURI("http://mozilla.org/link/"),
24 transition: TRANSITION_TYPED });
25 }
26 ]);
28 add_autocomplete_test([
29 "Do not autofill whitespaced entry 3",
30 "mozilla.org/link ",
31 "mozilla.org/link ",
32 function () {
33 promiseAddVisits({ uri: NetUtil.newURI("http://mozilla.org/link/"),
34 transition: TRANSITION_TYPED });
35 }
36 ]);
38 add_autocomplete_test([
39 "Do not autofill whitespaced entry 4",
40 "mozilla.org/link/ ",
41 "mozilla.org/link/ ",
42 function () {
43 promiseAddVisits({ uri: NetUtil.newURI("http://mozilla.org/link/"),
44 transition: TRANSITION_TYPED });
45 }
46 ]);
49 add_autocomplete_test([
50 "Do not autofill whitespaced entry 5",
51 "moz illa ",
52 "moz illa ",
53 function () {
54 promiseAddVisits({ uri: NetUtil.newURI("http://mozilla.org/link/"),
55 transition: TRANSITION_TYPED });
56 }
57 ]);
59 add_autocomplete_test([
60 "Do not autofill whitespaced entry 6",
61 " mozilla",
62 " mozilla",
63 function () {
64 promiseAddVisits({ uri: NetUtil.newURI("http://mozilla.org/link/"),
65 transition: TRANSITION_TYPED });
66 }
67 ]);