Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: components/test/data/omnibox/in_memory_url_index_test.db.txt

Issue 2721713002: [sync] Add typed url sync metadata to the history db (Closed)
Patch Set: update for comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 This file contains test data used 2 This file contains test data used
3 chrome/browser/history/in_memory_url_index_unittest.cc 3 chrome/browser/history/in_memory_url_index_unittest.cc
4 4
5 It contains data for two types of history database tables: 5 It contains data for two types of history database tables:
6 1. the history URL database. 6 1. the history URL database.
7 2. the visit database. 7 2. the visit database.
8 8
9 1. 9 1.
10 The schema of the URL database is defined by HISTORY_URL_ROW_FIELDS found in 10 The schema of the URL database is defined by HISTORY_URL_ROW_FIELDS found in
11 url_database.h and is equivalent to: 11 url_database.h and is equivalent to:
12 12
13 CREATE TABLE urls(id INTEGER PRIMARY KEY, 13 CREATE TABLE urls(id INTEGER PRIMARY KEY AUTOINCREMENT,
14 url LONGVARCHAR, 14 url LONGVARCHAR,
15 title LONGVARCHAR, 15 title LONGVARCHAR,
16 visit_count INTEGER DEFAULT 0 NOT NULL, 16 visit_count INTEGER DEFAULT 0 NOT NULL,
17 typed_count INTEGER DEFAULT 0 NOT NULL, 17 typed_count INTEGER DEFAULT 0 NOT NULL,
18 last_visit_time INTEGER NOT NULL, 18 last_visit_time INTEGER NOT NULL,
19 hidden INTEGER DEFAULT 0 NOT NULL, 19 hidden INTEGER DEFAULT 0 NOT NULL);
20 favicon_id INTEGER DEFAULT 0 NOT NULL);
21 20
22 The quick history autocomplete provider filters out history items that: 21 The quick history autocomplete provider filters out history items that:
23 1) have not been visited in kLowQualityMatchAgeLimitInDays, AND 22 1) have not been visited in kLowQualityMatchAgeLimitInDays, AND
24 2) for which the URL was not explicitly typed at least 23 2) for which the URL was not explicitly typed at least
25 kLowQualityMatchTypedLimit + 1 times, AND 24 kLowQualityMatchTypedLimit + 1 times, AND
26 3) have not been visited at least kLowQualityMatchVisitLimit + 1 times. 25 3) have not been visited at least kLowQualityMatchVisitLimit + 1 times.
27 So we create history items in all of those combinations. 26 So we create history items in all of those combinations.
28 27
29 Note that the last_visit_time column for this test table represents the 28 Note that the last_visit_time column for this test table represents the
30 relative number of days prior to 'today' to which the final column 29 relative number of days prior to 'today' to which the final column
31 value will be set during test setup. Beware: Do not set this number 30 value will be set during test setup. Beware: Do not set this number
32 to be equal to kLowQualityMatchAgeLimitInDays. 31 to be equal to kLowQualityMatchAgeLimitInDays.
33 32
34 The ordering, URLs and titles must be kept in sync with the unit tests found 33 The ordering, URLs and titles must be kept in sync with the unit tests found
35 in in_memory_url_index_unittest.cc. 34 in in_memory_url_index_unittest.cc.
36 35
37 2. 36 2.
38 The schema of the visit database is defined by HISTORY_VISIT_ROW_FIELDS 37 The schema of the visit database is defined by HISTORY_VISIT_ROW_FIELDS
39 found in visit_database.h and is equivalent to: 38 found in visit_database.h and is equivalent to:
40 39
41 CREATE TABLE visits(visit_id INTEGER PRIMARY KEY, 40 CREATE TABLE visits(visit_id INTEGER PRIMARY KEY,
42 url_id INTEGER NOT NULL, 41 url_id INTEGER NOT NULL,
43 visit_time INTEGER NOT NULL, 42 visit_time INTEGER NOT NULL,
44 from_visit INTEGER, 43 from_visit INTEGER,
45 transition INTEGER DEFAULT 0 NOT NULL, 44 transition INTEGER DEFAULT 0 NOT NULL,
46 segment_id INTEGER, 45 segment_id INTEGER,
47 is_indexed BOOLEAN, 46 is_indexed BOOLEAN,
48 visit_duration INTEGER DEFAULT 0 NOT NULL) 47 visit_duration INTEGER DEFAULT 0 NOT NULL)
49 */ 48 */
50 INSERT INTO "urls" VALUES(1,'http://www.reuters.com/article/idUSN083988062010070 8','UPDATE 1-US 30-yr mortgage rate drops to new record low | Reuters',3,1,2,0,2 9); // Qualifies 49 INSERT INTO "urls" VALUES(1,'http://www.reuters.com/article/idUSN083988062010070 8','UPDATE 1-US 30-yr mortgage rate drops to new record low | Reuters',3,1,2,0); // Qualifies
51 INSERT INTO "urls" VALUES(2,'http://www.golfweek.com/news/2010/jul/08/goydos-ope ns-john-deere-classic-59/','Goydos opens John Deere Classic with 59',3,1,4,0,27) ; // Qualifies 50 INSERT INTO "urls" VALUES(2,'http://www.golfweek.com/news/2010/jul/08/goydos-ope ns-john-deere-classic-59/','Goydos opens John Deere Classic with 59',3,1,4,0); // Qualifies
52 INSERT INTO "urls" VALUES(3,'http://www.businessandmedia.org/articles/2010/20100 708120415.aspx','LeBronomics: Could High Taxes Influence James'' Team Decision?' ,4,1,2,0,28); // Qualifies 51 INSERT INTO "urls" VALUES(3,'http://www.businessandmedia.org/articles/2010/20100 708120415.aspx','LeBronomics: Could High Taxes Influence James'' Team Decision?' ,4,1,2,0); // Qualifies
53 INSERT INTO "urls" VALUES(4,'http://www.realclearmarkets.com/articles/2010/07/08 /diversity_in_the_financial_sector_98562.html','RealClearMarkets - Racial, Gende r Quotas in the Financial Bill?',4,1,4,0,0); // Qualifies 52 INSERT INTO "urls" VALUES(4,'http://www.realclearmarkets.com/articles/2010/07/08 /diversity_in_the_financial_sector_98562.html','RealClearMarkets - Racial, Gende r Quotas in the Financial Bill?',4,1,4,0); // Qualifies
54 INSERT INTO "urls" VALUES(5,'http://drudgereport.com/','DRUDGE REPORT 2010',3,2, 2,0,0); // Qualifies 53 INSERT INTO "urls" VALUES(5,'http://drudgereport.com/','DRUDGE REPORT 2010',3,2, 2,0); // Qualifies
55 INSERT INTO "urls" VALUES(6,'http://totalfinder.binaryage.com/','TotalFinder bri ngs tabs to your native Finder and more!',3,2,4,0,26); // Qualifies 54 INSERT INTO "urls" VALUES(6,'http://totalfinder.binaryage.com/','TotalFinder bri ngs tabs to your native Finder and more!',3,2,4,0); // Qualifies
56 INSERT INTO "urls" VALUES(7,'http://getsharekit.com/','ShareKit : Drop-in Share Features for all iOS Apps',4,2,4,0,20); // Qualifies 55 INSERT INTO "urls" VALUES(7,'http://getsharekit.com/','ShareKit : Drop-in Share Features for all iOS Apps',4,2,4,0); // Qualifies
57 INSERT INTO "urls" VALUES(8,'http://getsharekit.com/index.html','ShareKit : Drop -in Share Features for all iOS Apps',3,0,4,0,20); 56 INSERT INTO "urls" VALUES(8,'http://getsharekit.com/index.html','ShareKit : Drop -in Share Features for all iOS Apps',3,0,4,0);
58 INSERT INTO "urls" VALUES(9,'http://en.wikipedia.org/wiki/Control-Z','Control-Z - Wikipedia, the free encyclopedia',0,0,6,0,0); 57 INSERT INTO "urls" VALUES(9,'http://en.wikipedia.org/wiki/Control-Z','Control-Z - Wikipedia, the free encyclopedia',0,0,6,0);
59 INSERT INTO "urls" VALUES(10,'http://vmware.com/info?id=724','VMware Account Man agement Login',1,0,6,0,0); 58 INSERT INTO "urls" VALUES(10,'http://vmware.com/info?id=724','VMware Account Man agement Login',1,0,6,0);
60 INSERT INTO "urls" VALUES(11,'http://www.tech-recipes.com/rx/2621/os_x_change_pa th_environment_variable/','OS X: Change your PATH environment variable | Mac sys tem administration | Tech-Recipes',0,1,6,0,14); // Qualifies 59 INSERT INTO "urls" VALUES(11,'http://www.tech-recipes.com/rx/2621/os_x_change_pa th_environment_variable/','OS X: Change your PATH environment variable | Mac sys tem administration | Tech-Recipes',0,1,6,0); // Qualifies
61 INSERT INTO "urls" VALUES(12,'http://view.atdmt.com/PPJ/iview/194841301/direct;w i.160;hi.600/01?click=','',6,6,0,1,0); // Qualifies 60 INSERT INTO "urls" VALUES(12,'http://view.atdmt.com/PPJ/iview/194841301/direct;w i.160;hi.600/01?click=','',6,6,0,1); // Qualifies
62 INSERT INTO "urls" VALUES(15,'http://www.cnn.com/','CNN.com International - Brea king, World, Business, Sports, Entertainment and Video News',6,6,0,0,89); // Qu alifies 61 INSERT INTO "urls" VALUES(15,'http://www.cnn.com/','CNN.com International - Brea king, World, Business, Sports, Entertainment and Video News',6,6,0,0); // Quali fies
63 INSERT INTO "urls" VALUES(16,'http://www.zdnet.com/','Technology News, Analysis, Comments and Product Reviews for IT Professionals | ZDNet',6,6,0,0,652); // Qu alifies 62 INSERT INTO "urls" VALUES(16,'http://www.zdnet.com/','Technology News, Analysis, Comments and Product Reviews for IT Professionals | ZDNet',6,6,0,0); // Qualif ies
64 INSERT INTO "urls" VALUES(17,'http://www.crash.net/','Crash.Net | Formula 1 & Mo toGP | Motorsport News',6,6,0,0,239); // Qualifies 63 INSERT INTO "urls" VALUES(17,'http://www.crash.net/','Crash.Net | Formula 1 & Mo toGP | Motorsport News',6,6,0,0); // Qualifies
65 INSERT INTO "urls" VALUES(18,'http://www.theinquirer.net/','THE INQUIRER - Micro processor, Server, Memory, PCS, Graphics, Networking, Storage',6,6,0,0,79); // Qualifies 64 INSERT INTO "urls" VALUES(18,'http://www.theinquirer.net/','THE INQUIRER - Micro processor, Server, Memory, PCS, Graphics, Networking, Storage',6,6,0,0); // Qua lifies
66 INSERT INTO "urls" VALUES(19,'http://www.theregister.co.uk/','The Register: Sci/ Tech News for the World',6,6,0,0,74); // Qualifies 65 INSERT INTO "urls" VALUES(19,'http://www.theregister.co.uk/','The Register: Sci/ Tech News for the World',6,6,0,0); // Qualifies
67 INSERT INTO "urls" VALUES(20,'http://blogs.technet.com/markrussinovich/','Mark'' s Blog - Site Home - TechNet Blogs',6,6,0,0,685); // Qualifies 66 INSERT INTO "urls" VALUES(20,'http://blogs.technet.com/markrussinovich/','Mark'' s Blog - Site Home - TechNet Blogs',6,6,0,0); // Qualifies
68 INSERT INTO "urls" VALUES(21,'http://www.icu-project.org/','ICU Home Page (ICU - International Components for Unicode)',6,6,0,0,445); // Qualifies 67 INSERT INTO "urls" VALUES(21,'http://www.icu-project.org/','ICU Home Page (ICU - International Components for Unicode)',6,6,0,0); // Qualifies
69 INSERT INTO "urls" VALUES(22,'http://site.icu-project.org/','ICU Home Page (ICU - International Components for Unicode)',6,6,0,0,445); // Qualifies 68 INSERT INTO "urls" VALUES(22,'http://site.icu-project.org/','ICU Home Page (ICU - International Components for Unicode)',6,6,0,0); // Qualifies
70 INSERT INTO "urls" VALUES(23,'http://icu-project.org/apiref/icu4c/','ICU 4.2: Ma in Page',6,6,0,0,212); // Qualifies 69 INSERT INTO "urls" VALUES(23,'http://icu-project.org/apiref/icu4c/','ICU 4.2: Ma in Page',6,6,0,0); // Qualifies
71 INSERT INTO "urls" VALUES(24,'http://www.danilatos.com/event-test/ExperimentTest .html','Experimentation Harness',6,6,0,0,0); // Qualifies 70 INSERT INTO "urls" VALUES(24,'http://www.danilatos.com/event-test/ExperimentTest .html','Experimentation Harness',6,6,0,0); // Qualifies
72 INSERT INTO "urls" VALUES(25,'http://www.codeguru.com/','CodeGuru : codeguru',6, 6,0,0,110); // Qualifies 71 INSERT INTO "urls" VALUES(25,'http://www.codeguru.com/','CodeGuru : codeguru',6, 6,0,0); // Qualifies
73 INSERT INTO "urls" VALUES(26,'http://www.codeproject.com/','Your Development Res ource - CodeProject',6,6,0,0,369); // Qualifies 72 INSERT INTO "urls" VALUES(26,'http://www.codeproject.com/','Your Development Res ource - CodeProject',6,6,0,0); // Qualifies
74 INSERT INTO "urls" VALUES(27,'http://www.tomshardware.com/us/#redir','Tom''s Har dware: Hardware News, Tests and Reviews',6,6,0,0,65); // Qualifies 73 INSERT INTO "urls" VALUES(27,'http://www.tomshardware.com/us/#redir','Tom''s Har dware: Hardware News, Tests and Reviews',6,6,0,0); // Qualifies
75 INSERT INTO "urls" VALUES(28,'http://www.ddj.com/windows/184416623','Dr. ABRACAD ABRA''s | Avoiding the Visual C++ Runtime Library | 2 1, 2003',6,6,0,0,0); // Q ualifies 74 INSERT INTO "urls" VALUES(28,'http://www.ddj.com/windows/184416623','Dr. ABRACAD ABRA''s | Avoiding the Visual C++ Runtime Library | 2 1, 2003',6,6,0,0); // Qua lifies
76 INSERT INTO "urls" VALUES(29,'http://svcs.cnn.com/weather/getForecast?time=34&mo de=json_html&zipCode=336736767676&locCode=EGLL&celcius=true&csiID=csi2','',6,6,0 ,1,0); // Qualifies 75 INSERT INTO "urls" VALUES(29,'http://svcs.cnn.com/weather/getForecast?time=34&mo de=json_html&zipCode=336736767676&locCode=EGLL&celcius=true&csiID=csi2','',6,6,0 ,1); // Qualifies
77 INSERT INTO "urls" VALUES(30,'http://www.drudgery.com/Dogs%20and%20Mice','Life i n the Slow Lane',8,2,2,0,0); // Qualifies 76 INSERT INTO "urls" VALUES(30,'http://www.drudgery.com/Dogs%20and%20Mice','Life i n the Slow Lane',8,2,2,0); // Qualifies
78 INSERT INTO "urls" VALUES(31,'http://www.redrudgerydo.com/','Music of the Wild L andscape',0,0,6,0,0); 77 INSERT INTO "urls" VALUES(31,'http://www.redrudgerydo.com/','Music of the Wild L andscape',0,0,6,0);
79 INSERT INTO "urls" VALUES(32,'https://NearlyPerfectResult.com/','Practically Per fect Search Result',99,99,0,0,0); // Qualifies 78 INSERT INTO "urls" VALUES(32,'https://NearlyPerfectResult.com/','Practically Per fect Search Result',99,99,0,0); // Qualifies
80 INSERT INTO "urls" VALUES(33,'http://QuiteUselessSearchResultxyz.com/','Practica lly Useless Search Result',4,0,99,0,0); // Qualifies 79 INSERT INTO "urls" VALUES(33,'http://QuiteUselessSearchResultxyz.com/','Practica lly Useless Search Result',4,0,99,0); // Qualifies
81 INSERT INTO "urls" VALUES(34,'http://FubarFubarAndFubar.com/','Situation Normal -- FUBARED',99,99,0,0,0); // Qualifies 80 INSERT INTO "urls" VALUES(34,'http://FubarFubarAndFubar.com/','Situation Normal -- FUBARED',99,99,0,0); // Qualifies
82 INSERT INTO "urls" VALUES(35,'http://en.wikipedia.org/wiki/1%25_rule_(Internet_c ulture)','Do Not Need Title',2,2,0,0,0); // Qualifies 81 INSERT INTO "urls" VALUES(35,'http://en.wikipedia.org/wiki/1%25_rule_(Internet_c ulture)','Do Not Need Title',2,2,0,0); // Qualifies
83 INSERT INTO "urls" VALUES(36,'http://default-engine.com?q=query','Query Query Qu ery',2,2,0,0,0); // Qualifies 82 INSERT INTO "urls" VALUES(36,'http://default-engine.com?q=query','Query Query Qu ery',2,2,0,0); // Qualifies
84 83
85 /* 84 /*
86 This file creates some visits, enough to test (in InMemoryURLIndexTest) 85 This file creates some visits, enough to test (in InMemoryURLIndexTest)
87 the visits functionality, certainly not as many visits as are implied 86 the visits functionality, certainly not as many visits as are implied
88 by the visit counts associated with the URLs above. 87 by the visit counts associated with the URLs above.
89 */ 88 */
90 INSERT INTO "visits" VALUES(1, 1, 2, 4, 0, 0, 1); 89 INSERT INTO "visits" VALUES(1, 1, 2, 4, 0, 0, 1);
91 INSERT INTO "visits" VALUES(2, 1, 5, 0, 1, 0, 1); 90 INSERT INTO "visits" VALUES(2, 1, 5, 0, 1, 0, 1);
92 INSERT INTO "visits" VALUES(3, 1, 12, 0, 0, 0, 1); 91 INSERT INTO "visits" VALUES(3, 1, 12, 0, 0, 0, 1);
93 INSERT INTO "visits" VALUES(4, 32, 1, 0, 0, 0, 1); 92 INSERT INTO "visits" VALUES(4, 32, 1, 0, 0, 0, 1);
94 INSERT INTO "visits" VALUES(5, 32, 2, 0, 0, 0, 1); 93 INSERT INTO "visits" VALUES(5, 32, 2, 0, 0, 0, 1);
95 INSERT INTO "visits" VALUES(6, 32, 3, 0, 0, 0, 1); 94 INSERT INTO "visits" VALUES(6, 32, 3, 0, 0, 0, 1);
96 INSERT INTO "visits" VALUES(7, 32, 4, 0, 0, 0, 1); 95 INSERT INTO "visits" VALUES(7, 32, 4, 0, 0, 0, 1);
97 INSERT INTO "visits" VALUES(8, 32, 5, 0, 0, 0, 1); 96 INSERT INTO "visits" VALUES(8, 32, 5, 0, 0, 0, 1);
98 INSERT INTO "visits" VALUES(9, 32, 6, 0, 0, 0, 1); 97 INSERT INTO "visits" VALUES(9, 32, 6, 0, 0, 0, 1);
99 INSERT INTO "visits" VALUES(10, 32, 7, 0, 0, 0, 1); 98 INSERT INTO "visits" VALUES(10, 32, 7, 0, 0, 0, 1);
100 INSERT INTO "visits" VALUES(11, 32, 8, 0, 0, 0, 1); 99 INSERT INTO "visits" VALUES(11, 32, 8, 0, 0, 0, 1);
101 INSERT INTO "visits" VALUES(12, 32, 9, 0, 0, 0, 1); 100 INSERT INTO "visits" VALUES(12, 32, 9, 0, 0, 0, 1);
102 INSERT INTO "visits" VALUES(13, 32, 10, 0, 0, 0, 1); 101 INSERT INTO "visits" VALUES(13, 32, 10, 0, 0, 0, 1);
103 INSERT INTO "visits" VALUES(14, 32, 11, 0, 0, 0, 1); 102 INSERT INTO "visits" VALUES(14, 32, 11, 0, 0, 0, 1);
104 INSERT INTO "visits" VALUES(15, 32, 12, 0, 0, 0, 1); 103 INSERT INTO "visits" VALUES(15, 32, 12, 0, 0, 0, 1);
105 INSERT INTO "visits" VALUES(16, 32, 13, 0, 0, 0, 1); 104 INSERT INTO "visits" VALUES(16, 32, 13, 0, 0, 0, 1);
106 INSERT INTO "visits" VALUES(17, 32, 14, 0, 0, 0, 1); 105 INSERT INTO "visits" VALUES(17, 32, 14, 0, 0, 0, 1);
107 INSERT INTO "visits" VALUES(18, 32, 15, 0, 1, 0, 1); 106 INSERT INTO "visits" VALUES(18, 32, 15, 0, 1, 0, 1);
108 INSERT INTO "visits" VALUES(19, 35, 0, 0, 1, 0, 1); 107 INSERT INTO "visits" VALUES(19, 35, 0, 0, 1, 0, 1);
109 INSERT INTO "visits" VALUES(20, 35, 7, 0, 1, 0, 1); 108 INSERT INTO "visits" VALUES(20, 35, 7, 0, 1, 0, 1);
110 INSERT INTO "visits" VALUES(21, 36, 1, 0, 1, 0, 1); 109 INSERT INTO "visits" VALUES(21, 36, 1, 0, 1, 0, 1);
111 INSERT INTO "visits" VALUES(22, 36, 2, 0, 1, 0, 1); 110 INSERT INTO "visits" VALUES(22, 36, 2, 0, 1, 0, 1);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698