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

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     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 ];

mercurial