1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/components/places/tests/inline/test_keywords.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,48 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +add_autocomplete_test([ 1.9 + "Searching for non-keyworded entry should autoFill it", 1.10 + "moz", 1.11 + "mozilla.org/", 1.12 + function () { 1.13 + addBookmark({ url: "http://mozilla.org/test/" }); 1.14 + } 1.15 +]); 1.16 + 1.17 +add_autocomplete_test([ 1.18 + "Searching for keyworded entry should not autoFill it", 1.19 + "moz", 1.20 + "moz", 1.21 + function () { 1.22 + addBookmark({ url: "http://mozilla.org/test/", keyword: "moz" }); 1.23 + } 1.24 +]); 1.25 + 1.26 +add_autocomplete_test([ 1.27 + "Searching for more than keyworded entry should autoFill it", 1.28 + "mozi", 1.29 + "mozilla.org/", 1.30 + function () { 1.31 + addBookmark({ url: "http://mozilla.org/test/", keyword: "moz" }); 1.32 + } 1.33 +]); 1.34 + 1.35 +add_autocomplete_test([ 1.36 + "Searching for less than keyworded entry should autoFill it", 1.37 + "mo", 1.38 + "mozilla.org/", 1.39 + function () { 1.40 + addBookmark({ url: "http://mozilla.org/test/", keyword: "moz" }); 1.41 + } 1.42 +]); 1.43 + 1.44 +add_autocomplete_test([ 1.45 + "Searching for keyworded entry is case-insensitive", 1.46 + "MoZ", 1.47 + "MoZ", 1.48 + function () { 1.49 + addBookmark({ url: "http://mozilla.org/test/", keyword: "moz" }); 1.50 + } 1.51 +]);