OLD | NEW |
(Empty) | |
| 1 /* |
| 2 The schema of the database is defined by HISTORY_URL_ROW_FIELDS found in |
| 3 url_database.h and is equivalent to: |
| 4 |
| 5 CREATE TABLE urls(id INTEGER PRIMARY KEY, |
| 6 url LONGVARCHAR, |
| 7 title LONGVARCHAR, |
| 8 visit_count INTEGER DEFAULT 0 NOT NULL, |
| 9 typed_count INTEGER DEFAULT 0 NOT NULL, |
| 10 last_visit_time INTEGER NOT NULL, |
| 11 hidden INTEGER DEFAULT 0 NOT NULL, |
| 12 favicon_id INTEGER DEFAULT 0 NOT NULL); |
| 13 |
| 14 The quick history autocomplete provider filters out history items that: |
| 15 1) have not been visited in kLowQualityMatchAgeLimitInDays, AND |
| 16 2) for which the URL was not explicitly typed at least |
| 17 kLowQualityMatchTypedLimit + 1 times, AND |
| 18 3) have not been visited at least kLowQualityMatchVisitLimit + 1 times. |
| 19 So we create history items in all of those combinations. |
| 20 |
| 21 Note that the last_visit_time column for this test table represents the |
| 22 relative number of days prior to 'today' to which the final column |
| 23 value will be set during test setup. Beware: Do not set this number |
| 24 to be equal to kLowQualityMatchAgeLimitInDays. |
| 25 |
| 26 The ordering, URLs and titles must be kept in sync with the unit tests found |
| 27 in in_memory_url_index_unittest.cc. |
| 28 */ |
| 29 INSERT INTO "urls" VALUES(1,'http://www.google.com/','Google',3,3,0,0,29); |
| 30 INSERT INTO "urls" VALUES(2,'http://slashdot.org/favorite_page.html','Favorite p
age',200,100,0,0,29); |
| 31 INSERT INTO "urls" VALUES(3,'http://kerneltrap.org/not_very_popular.html','Less
popular',4,0,0,0,29); |
| 32 INSERT INTO "urls" VALUES(4,'http://freshmeat.net/unpopular.html','Unpopular',1,
1,0,0,29); |
| 33 INSERT INTO "urls" VALUES(5,'http://news.google.com/?ned=us&topic=n','Google New
s - U.S.',2,2,0,0,29); |
| 34 INSERT INTO "urls" VALUES(6,'http://news.google.com/','Google News',1,1,0,0,29); |
| 35 INSERT INTO "urls" VALUES(7,'http://foo.com/','Dir',200,100,0,0,29); |
| 36 INSERT INTO "urls" VALUES(8,'http://foo.com/dir/','Dir',2,1,10,0,29); |
| 37 INSERT INTO "urls" VALUES(9,'http://foo.com/dir/another/','Dir',5,10,0,0,29); |
| 38 INSERT INTO "urls" VALUES(10,'http://foo.com/dir/another/again/','Dir',5,1,0,0,2
9); |
| 39 INSERT INTO "urls" VALUES(11,'http://foo.com/dir/another/again/myfile.html','Fil
e',3,2,0,0,29); |
| 40 INSERT INTO "urls" VALUES(12,'http://visitedest.com/y/a','VA',10,1,20,0,29); |
| 41 INSERT INTO "urls" VALUES(13,'http://visitedest.com/y/b','VB',9,1,20,0,29); |
| 42 INSERT INTO "urls" VALUES(14,'http://visitedest.com/x/c','VC',8,1,20,0,29); |
| 43 INSERT INTO "urls" VALUES(15,'http://visitedest.com/x/d','VD',7,1,20,0,29); |
| 44 INSERT INTO "urls" VALUES(16,'http://visitedest.com/y/e','VE',6,1,20,0,29); |
| 45 INSERT INTO "urls" VALUES(17,'http://typeredest.com/y/a','TA',3,5,0,0,29); |
| 46 INSERT INTO "urls" VALUES(18,'http://typeredest.com/y/b','TB',3,4,0,0,29); |
| 47 INSERT INTO "urls" VALUES(19,'http://typeredest.com/x/c','TC',3,3,0,0,29); |
| 48 INSERT INTO "urls" VALUES(20,'http://typeredest.com/x/d','TD',3,2,0,0,29); |
| 49 INSERT INTO "urls" VALUES(21,'http://typeredest.com/y/e','TE',3,1,0,0,29); |
| 50 INSERT INTO "urls" VALUES(22,'http://daysagoest.com/y/a','DA',1,1,0,0,29); |
| 51 INSERT INTO "urls" VALUES(23,'http://daysagoest.com/y/b','DB',1,1,1,0,29); |
| 52 INSERT INTO "urls" VALUES(24,'http://daysagoest.com/x/c','DC',1,1,2,0,29); |
| 53 INSERT INTO "urls" VALUES(25,'http://daysagoest.com/x/d','DD',1,1,3,0,29); |
| 54 INSERT INTO "urls" VALUES(26,'http://daysagoest.com/y/e','DE',1,1,4,0,29); |
| 55 INSERT INTO "urls" VALUES(27,'http://abcdefghixyzjklmnopqrstuvw.com/a','',3,1,0,
0,29); |
| 56 INSERT INTO "urls" VALUES(28,'http://spaces.com/path%20with%20spaces/foo.html','
Spaces',2,2,0,0,29); |
| 57 INSERT INTO "urls" VALUES(29,'http://abcdefghijklxyzmnopqrstuvw.com/a','',3,1,0,
0,29); |
| 58 INSERT INTO "urls" VALUES(30,'http://abcdefxyzghijklmnopqrstuvw.com/a','',3,1,0,
0,29); |
| 59 INSERT INTO "urls" VALUES(31,'http://abcxyzdefghijklmnopqrstuvw.com/a','',3,1,0,
0,29); |
| 60 INSERT INTO "urls" VALUES(32,'http://xyzabcdefghijklmnopqrstuvw.com/a','',3,1,0,
0,29); |
| 61 INSERT INTO "urls" VALUES(33,'http://cda.com/Dogs%20Cats%20Gorillas%20Sea%20Slug
s%20and%20Mice','Dogs & Cats & Mice & Other Animals',1,1,0,0,29); |
| 62 INSERT INTO "urls" VALUES(34,'https://monkeytrap.org/','',3,1,0,0,29); |
OLD | NEW |