toolkit/components/places/tests/autocomplete/test_416214.js

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:870367f6823e
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
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 /*
6 * Test autocomplete for non-English URLs that match the tag bug 416214. Also
7 * test bug 417441 by making sure escaped ascii characters like "+" remain
8 * escaped.
9 *
10 * - add a visit for a page with a non-English URL
11 * - add a tag for the page
12 * - search for the tag
13 * - test number of matches (should be exactly one)
14 * - make sure the url is decoded
15 */
16
17 let theTag = "superTag";
18
19 // Define some shared uris and titles (each page needs its own uri)
20 let kURIs = [
21 "http://escaped/ユニコード",
22 "http://asciiescaped/blocking-firefox3%2B",
23 ];
24 let kTitles = [
25 "title",
26 theTag,
27 ];
28
29 // Add pages that match the tag
30 addPageBook(0, 0, 0, [1]);
31 addPageBook(1, 0, 0, [1]);
32
33 // Provide for each test: description; search terms; array of gPages indices of
34 // pages that should match; optional function to be run before the test
35 let gTests = [
36 ["0: Make sure tag matches return the right url as well as '+' remain escaped",
37 theTag, [0,1]],
38 ];

mercurial