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
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
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 */
17 let theTag = "superTag";
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 ];
29 // Add pages that match the tag
30 addPageBook(0, 0, 0, [1]);
31 addPageBook(1, 0, 0, [1]);
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 ];