toolkit/components/places/tests/inline/test_keywords.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 file,
     3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 add_autocomplete_test([
     6   "Searching for non-keyworded entry should autoFill it",
     7   "moz",
     8   "mozilla.org/",
     9   function () {
    10     addBookmark({ url: "http://mozilla.org/test/" });
    11   }
    12 ]);
    14 add_autocomplete_test([
    15   "Searching for keyworded entry should not autoFill it",
    16   "moz",
    17   "moz",
    18   function () {
    19     addBookmark({ url: "http://mozilla.org/test/", keyword: "moz" });
    20   }
    21 ]);
    23 add_autocomplete_test([
    24   "Searching for more than keyworded entry should autoFill it",
    25   "mozi",
    26   "mozilla.org/",
    27   function () {
    28     addBookmark({ url: "http://mozilla.org/test/", keyword: "moz" });
    29   }
    30 ]);
    32 add_autocomplete_test([
    33   "Searching for less than keyworded entry should autoFill it",
    34   "mo",
    35   "mozilla.org/",
    36   function () {
    37     addBookmark({ url: "http://mozilla.org/test/", keyword: "moz" });
    38   }
    39 ]);
    41 add_autocomplete_test([
    42   "Searching for keyworded entry is case-insensitive",
    43   "MoZ",
    44   "MoZ",
    45   function () {
    46     addBookmark({ url: "http://mozilla.org/test/", keyword: "moz" });
    47   }
    48 ]);

mercurial