Commit Graph

129 Commits

Author SHA1 Message Date
Henry Chang
169b4c1965 Bug 1370585 - Periodically check the flag (at most 30 seconds) rather than checking only once. r=francois
MozReview-Commit-ID: BjGN7nOCmTS
2017-06-19 18:25:12 +08:00
DimiL
5bfeea65b2 Bug 1329366 - Avoid the reuse of the same chunk numbers in classifierHelper.js. r=francois
This patch includes following fix in classifierHelper.js:
1. Avoid the reuse of same chunk numbers
2. Remove unused removeUrlFromDB function

MozReview-Commit-ID: XK1oHBa8gf
2017-06-12 17:04:59 +08:00
Wes Kocher
007098e921 Merge inbound to central, a=merge
MozReview-Commit-ID: 7NiWtCjPk84
2017-05-22 16:26:12 -07:00
Kershaw Chang
4f65916b2b Bug 1312515 - Part 3: Test case. r=baku
This test aims to test the priority of the http channels created from XHR and Fetch inside a tracking script is lowest.
2017-05-22 03:40:00 -04:00
DimiL
da8ff508ef Bug 1365877 - resetDatabase in SafeBrowsing test case should also reset cache. r=francois
resetDatabase() is used to clear out the Safe Browsing database and cache in tests.
Since bug 1333328 however we can no longer rely on updates clearing the cache.

There are two solutions to address this issue:
1. resetDatabase() calls another test-only function: reloadDatabase(). Since the cache
   is in memory, reloading the URL classifier will automatically clear the cache.
2. During an update, remove cache entries which are not in the database.

I prefer taking the first one because if we implement the second
approach, an update will take longer since we need to check if each prefix
in the cache can also be found in the database. I think this is not necessary
because prefixes not in the database will eventually be removed when they
are expired.

MozReview-Commit-ID: BjsDKDMr205
2017-05-18 17:21:00 +08:00
Thomas Nguyen
f0e7c590a6 Bug 1365466 - Remove enablePrivilege calls in SafeBrowsing test case. r=hchang
MozReview-Commit-ID: CedxaTfXFx0
2017-05-16 19:20:00 -04:00
DimiL
a0b8501692 Bug 1333328 - Refactor cache miss handling mechanism for V2. r=francois
In this patch, we will make Safebrowsing V2 caching use the same algorithm as V4.
So we remove "mMissCache" for negative caching and TableFresness check for
positive caching.

But Safebrowsing V2 doesn't contain negative/positive cache duration information in
gethash response. So we hard-code a fixed value, 15 minutes, as cache duration.
In this way, we can sync the mechanism we handle caching for V2 and V4.

An extra effort for V2 here is that we need to manually record prefixes misses
because we won't get any response for those prefixes(implemented in
nsUrlClassifierLookupCallback::CacheMisses).
2017-05-04 09:38:14 +08:00
Florian Quèze
ff53eb9a63 Bug 1353542 - massive script-generated patch converting Task.async and Task.spawn calls, and generators clearly identifiable as tasks, rs=Mossop. 2017-05-12 14:42:39 +02:00
Thomas Nguyen
2b54b47e7a Bug 1336915 - Disable updates and fullhash requests when the Google API key is missing r=francois
We only register google table if we have a valid google api keys

MozReview-Commit-ID: CJmJErxSOqa
2017-04-25 15:20:44 +08:00
DimiL
9b23cf48bb Bug 1296406 - Fix ReloadDatabase API fail in safebrowsing testcase. r=francois
Recent change of safebrowsing thread model may cause nsUrlClassifierDBService::ReloadDatabase
API fail if there is an ongoing update at the same.

Fix this issue by adding retry in testcase.

MozReview-Commit-ID: CZGMpQvuzum
2017-04-17 09:13:41 +08:00
Florian Queze
08b934cecd Bug 1356569 - Remove some more newURI null trailing parameters, r=jaws. 2017-04-14 21:51:40 +02:00
Florian Queze
d3c36892fa Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Sebastian Hengst
42670ceca0 Backed out changeset 322fde2d53bf (bug 1356569) so bug 1355161 can be backed out. r=backout 2017-04-14 23:39:22 +02:00
Sebastian Hengst
1abce56e72 Backed out changeset f85a9a62c5bb (bug 1356569) 2017-04-14 23:39:15 +02:00
Florian Queze
6bba1d01fb Bug 1356569 - Remove some more newURI null trailing parameters, r=jaws. 2017-04-14 21:51:40 +02:00
Florian Queze
9b4f73599f Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02:00
Henry Chang
7141f6bb42 Bug 1343425 - Supports nsIURIClassifier.asyncClassifyLocalWithTables. r=baku
We add a new "on-off" protocol PURLClassifierLocal which calls
nsIURIClassifier.asyncClassifyLocalWithTables on construction and
calls back on destruction. Pretty much the same design as PURLClassifier.

In order to avoid code duplication, the actor implementation is templatized
and |MaybeInfo| in PURLClassifier.ipdl is moved around.

Test case is included and the custom event target is not in place for labelling.
The custom event target will be done in Bug 1353701.

MozReview-Commit-ID: IdHYgdnBV7S
2017-04-07 14:15:16 +08:00
Sébastien Blin
aa1cd88356 Bug 1298321 - Refactor tests related to getHash. r=francois 2017-01-17 07:03:00 -05:00
Mark Banner
ec9074e132 Bug 1347712 - Change the testing configurations into ESLint configurations within eslint-plugin-mozilla - automatically update .eslintrc.js test config files for new config locations. r=jaws
MozReview-Commit-ID: LH0CQOPfoe6
2017-03-20 12:36:37 +01:00
Henry Chang
7f0e427cd5 Bug 1348626 - Retry when isPinged() failed to avoid false alarm. r=francois
MozReview-Commit-ID: BOdJZReICxZ
2017-03-19 15:52:25 +08:00
Thomas Nguyen
72ec8b5761 Bug 1339006 - Specify event target if we run nsIURIClassifier.clasify() from content process.r=ehsan, r=gcp
MozReview-Commit-ID: BztjVMlQngi
2017-03-08 11:06:36 +08:00
Carsten "Tomcat" Book
dc21916166 merge mozilla-inbound to mozilla-central a=merge 2017-03-02 14:02:48 +01:00
Thomas Nguyen
c68b0c13e5 Bug 1341514 - Using the valid update url provider in test. r=gcp
MozReview-Commit-ID: 50NcRd2e9hB
2017-03-02 00:07:53 +08:00
Thomas Nguyen
6eea6d2df4 Bug 1341514 - Disable test_reporturl.html due to intermittent failure. a=testonly
MozReview-Commit-ID: Ff7koH8xIwJ
* * *
[mq]: TEST-INFO

MozReview-Commit-ID: 9TUQqlj7h3M
2017-02-27 16:57:05 +08:00
Henry Chang
40c00b3543 Bug 1341506 - Part 1: Implement and use nsIURIClassifier.asyncClassifyLocalWithTables. r=Ehsan,francois
MozReview-Commit-ID: 8dvYM4o2Xxw
2017-03-01 11:27:51 +08:00
Thomas Nguyen
f1bf9d77e5 Bug 1288633 - Add SafeBrowsing report false positive URL test.r=francois
MozReview-Commit-ID: JEMLug9M85Q
2017-02-21 11:25:04 +08:00
Henry Chang
48936c9334 Bug 1313711 - Fix track element CORS bug. r=dveditz
MozReview-Commit-ID: SRWbiIuUdt
2017-02-14 11:47:14 +08:00
Florian Quèze
0696633dc9 Bug 1334261 - script-generated patch to remove more newURI null parameters, r=jaws. 2017-01-27 10:51:02 +01:00
Florian Quèze
0a4ee94a29 Bug 1334199 - script-generated patch to omit getComputedStyle's second argument when it's falsy, r=jaws. 2017-01-27 10:51:02 +01:00
Florian Quèze
91f7a2ef3a Bug 1331599 - script-generated patch to replace removeEventListener calls with the once option when possible, r=jaws. 2017-01-25 07:01:52 +01:00
Florian Quèze
63de711857 Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
Florian Quèze
13cfe1d3f3 Bug 1329182 - remove trailing newURI null parameters in toolkit/, r=jaws. 2017-01-09 20:27:25 +01:00
Ehsan Akhgari
4bedef6264 Bug 1321874 - Part 2: Use the passive tracking protection API to determine whether a script is tracking; r=bkelly 2016-12-23 15:38:43 -05:00
Ehsan Akhgari
cb0ab50626 Bug 1312514 - Part 3: Add a test to ensure that timeouts from tracking scripts end up in the tracking bucket; r=bkelly
For simplicity, this test is being added to test_classifier.html which
already has all of the infrastructure necessary for setting up a test
domain as a tracking domain.
2016-12-20 12:40:30 -05:00
Kirk Steuber
845ef3d6da Bug 1319571 - Change the output format of nsUrlClassifierDBService::ClassifyLocalWithTables from comma separated string to an array of strings r=francois
MozReview-Commit-ID: TXln2EQnZS
2016-11-29 13:04:43 -08:00
Ehsan Akhgari
45bfeafc80 Bug 1318768 - Part 3: Make nsIURIClassifier::ClassifyLocalWithTables() usable in the content process; r=gcp,baku 2016-11-22 08:17:34 -05:00
Ehsan Akhgari
4dfc942bf0 Bug 1318768 - Part 2: Make nsIURIClassifier::Classify() available in the content process; r=gcp,baku 2016-11-22 08:17:26 -05:00
Sebastian Hengst
6cf65ed900 Bug 1310297 - Remove test annotations using b2g, mulet or gonk: toolkit. r=RyanVM
MozReview-Commit-ID: I5LuDjnM7By
2016-11-05 11:29:22 +01:00
dimi
9c42f796bc Bug 1301269 - Fix update retry timer is released before firing. r=francois
MozReview-Commit-ID: KF1j2EFuxpa
2016-10-21 14:40:11 +08:00
Mark Banner
233309fbe2 Bug 1251003 - Change .eslintrc files to .eslintrc.js to avoid obsolete config file format. r=mossop
MozReview-Commit-ID: JrbFxQ5rj6I
2016-10-18 08:38:10 +01:00
dimi
b64e697a4d Bug 1297518 - Increase gethash timeout for testcases. r=gcp
MozReview-Commit-ID: BmX6UzGhfhf
2016-09-06 12:21:19 +08:00
Thomas Nguyen
95d0b2d935 Bug 1299036 - Fix Intermittent toolkit/components/url-classifier/tests/mochitest/test_classifier_worker.html. r=dimi,gcp.
MozReview-Commit-ID: 3YgxgjpV7Ay
2016-09-02 15:01:48 +08:00
dimi
909ab12b52 Bug 1291024 - Avoid caching safebrowsing testcase resources. r=francois
MozReview-Commit-ID: 9SB5diTrr5F
2016-08-23 15:51:29 +08:00
dimi
42f87b344b Bug 1296201 - Wait for SafeBrowsing,jsm to be initialized before running testcase. r=francois
MozReview-Commit-ID: 8o3cszqJK36
2016-08-24 17:00:08 +08:00
dimi
ac0dea5510 Bug 1254766 - Stop caching Safe Browsing completions to disk. r=gcp
MozReview-Commit-ID: 8Qnc8yymgDL
2016-08-11 08:17:39 +08:00
Dimi Lee
7ed05ebc31 Bug 1289028 - Retry when url-classifier test_gethash.html hits an exception. r=francois
MozReview-Commit-ID: 9BR7RfAthcU
2016-07-29 08:21:01 +08:00
dimi
8f13e1c1d1 Bug 1272239 - Part 3: Testcase, test gethash. r=francois
MozReview-Commit-ID: 3IkrdJgZNP1
2016-07-21 15:40:03 +08:00
dimi
a710168dd3 Bug 1272239 - Part 2: Testcase, only tables with provider could register gethash url in listmanager. r=francois
MozReview-Commit-ID: FcnXswQyerb
2016-07-21 15:37:00 +08:00
dimi
bc9ea8c453 Bug 1281083 - P2. Testcase for changing the urlclassifier.*Table. r=francois
MozReview-Commit-ID: Ge0NSpyEb82
2016-07-18 22:31:34 +08:00
Thomas Nguyen
b89b23bd95 Bug 1025965 - Rename browser.safebrowsing.enabled to browser.safebrowsing.phishing.enabled. r=francios
MozReview-Commit-ID: 3TMs6MPtWsC
2016-05-09 14:44:08 +08:00