toolkit/components/places/tests/inline/test_queryurl.js

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     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