toolkit/components/places/tests/inline/test_queryurl.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 host match without slash should match host",
     7   "file",
     8   "file.org/",
     9   function () {
    10     promiseAddVisits({ uri: NetUtil.newURI("http://file.org/test/"),
    11                        transition: TRANSITION_TYPED },
    12                      { uri: NetUtil.newURI("file:///c:/test.html"),
    13                        transition: TRANSITION_TYPED }
    14                     );
    15   },
    16 ]);
    18 add_autocomplete_test([
    19   "Searching match with slash at the end should do nothing",
    20   "file.org/",
    21   "file.org/",
    22   function () {
    23     promiseAddVisits({ uri: NetUtil.newURI("http://file.org/test/"),
    24                        transition: TRANSITION_TYPED },
    25                      { uri: NetUtil.newURI("file:///c:/test.html"),
    26                        transition: TRANSITION_TYPED }
    27                     );
    28   },
    29 ]);
    31 add_autocomplete_test([
    32   "Searching match with slash in the middle should match url",
    33   "file.org/t",
    34   "file.org/test/",
    35   function () {
    36     promiseAddVisits({ uri: NetUtil.newURI("http://file.org/test/"),
    37                        transition: TRANSITION_TYPED },
    38                      { uri: NetUtil.newURI("file:///c:/test.html"),
    39                        transition: TRANSITION_TYPED }
    40                     );
    41   },
    42 ]);
    44 add_autocomplete_test([
    45   "Searching for non-host match without slash should not match url",
    46   "file",
    47   "file",
    48   function () {
    49     promiseAddVisits({ uri: NetUtil.newURI("file:///c:/test.html"),
    50                        transition: TRANSITION_TYPED });
    51   },
    52 ]);

mercurial