Commit Graph

1568 Commits

Author SHA1 Message Date
Nihanth Subramanya
502b80b17b Bug 1584479 - Part 2: Update socialtracking test. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D51444
2019-11-02 09:53:51 +00:00
Dorel Luca
2060c2bf48 Backed out 4 changesets (bug 1584479) for Browser-chrome failures in toolkit/components/antitracking/test/browser/browser_socialtracking.js
Backed out changeset b0d9877bd8b0 (bug 1584479)
Backed out changeset d2c56bd61b08 (bug 1584479)
Backed out changeset 0edb22786545 (bug 1584479)
Backed out changeset 7e03b392edb3 (bug 1584479)
2019-11-02 01:18:42 +02:00
Nihanth Subramanya
c49b864217 Bug 1584479 - Part 2: Update socialtracking test. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D51444
2019-11-01 22:02:12 +00:00
Ehsan Akhgari
ecff46f411 Bug 1591738 - Fix a few leaks in VariableLengthPrefixSet under OOM conditions; r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D50709
2019-10-28 08:12:23 +00:00
DimiDL
631e17994a Bug 1512937 - P2. Do not generate an extra framgment for URLs without a path. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D49881
2019-10-28 08:27:52 +00:00
DimiDL
2a0522cf1d Bug 1512937 - P1. Change the #include order in the Safe Browsing gtest. r=gcp
There were compiler errors while I added a gtest testcase.
This patch updates the Test* files to include a common header, remove redundant headers,
and include missing headers.

Differential Revision: https://phabricator.services.mozilla.com/D49880
2019-10-28 08:27:49 +00:00
DimiDL
0efc0af4f1 Bug 1553855 - P2. Fix Safe Browsing testcase errors after introducing LazyIdle thread. r=gcp
A LazyIdle thread should be created and removed by the same thread. This
patch fixes testcases that trigger the assertion.

Depends on D49874

Differential Revision: https://phabricator.services.mozilla.com/D49875
2019-10-24 14:03:25 +00:00
DimiDL
5b587dad7e Bug 1553855 - P1. Make the Classifier Update thread a LazyIdle thread. r=gcp
Safe Browsing update thread wakes up every 30 mins to update tables from google
and 60 mins to update tables from mozilla.

Since the update thread doesn't have always to be alive, we change the
update thread to be a LazyIdle thread instead.

Differential Revision: https://phabricator.services.mozilla.com/D49874
2019-10-24 14:02:27 +00:00
Geoff Brown
708ce0c097 Bug 1585119 - Re-enable yet more mochitests on android; r=geckoview-reviewers,snorp
Most of these tests have been disabled for a long time; they run well
in the current test environment.
This completes my review of skipped Android tests.

Differential Revision: https://phabricator.services.mozilla.com/D49954
2019-10-22 20:10:27 +00:00
Jean-Yves Avenard
ddeb965a06 Bug 1588899 - P1. Move classification flags related method to nsIClassifiedChannel. r=Ehsan,baku
This is where it should have been in the first place. Those attributes belong there.

Differential Revision: https://phabricator.services.mozilla.com/D49577
2019-10-19 04:30:24 +00:00
DimiDL
234dabb67d Bug 1584931 - Replace ContentTask.spawn with SpecialPowers.spawn for flash blocking testcases. r=gcp
To make us pass flash blocking testcases when fission is enabled, we should use
SpecialPowers.spawn instead of ContentTask.spawn because the iframes in the testcases
may be cross-origin iframes.

Differential Revision: https://phabricator.services.mozilla.com/D49388
2019-10-16 07:38:34 +00:00
Tom Ritter
7fcaff0e75 Bug 1585366 - Remove a gcc mangling workaround for Windows r=dmajor
Bug 1329593 introduced this for the mingw-gcc build; but we no longer support this
build and mingw-clang does not need it.

Differential Revision: https://phabricator.services.mozilla.com/D48606
2019-10-08 21:00:08 +00:00
DimiDL
8b9611b260 Bug 1576374 - Use fallible append in ProtocolParser::AppendStream. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D48354
2019-10-07 15:02:39 +00:00
Sylvestre Ledru
49802d0a8e Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D47737
2019-10-06 18:29:55 +00:00
dimi
9d1acd1efc Bug 1585443 - Remove IsCanonicalizedIP assertion. r=Ehsan
Top-level URL and third-party URL can be an IP address, remove
IsCanonicalizedIP assertion and do not fragment a domain when the domain is an IP address

Differential Revision: https://phabricator.services.mozilla.com/D47916
2019-10-04 23:26:11 +00:00
dimi
0cf2b0722a Bug 1580416 - P2. Add a testcase to test a match can be found when whitelisted URI is eTLD. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D47213
2019-09-27 08:50:44 +00:00
DimiL
c33830dad9 Bug 1580416 - P1. Use a different fragment method when the URI is a pairwiseWhitelistedURI. r=Ehsan
This patch does the following to support matching a whitelisted URI when
its domain is eTLD+1:

1. add an URIType to indicate whether a URI is generated by
   UrlClassifierCommoon::CreatePairwiseWhiteListURI(), which crafts a
   whitelist URL like "toplevel.page/?resource=third.party.domain"

2. call LookupCache::GetLookupWhitelistFragments() if URIType is
   nsIUrlClassifierFeature::pairwiseWhitelistedURI before initiating
   a lookup.

3. implement LookupCache::GetLookupWhitelistFragments() which creates
   an additional fragment by removing the leading component of
   third.party.domain

Differential Revision: https://phabricator.services.mozilla.com/D47212
2019-09-27 13:22:18 +00:00
Anny Gakhokidze
9dd233aa38 Bug 1582531 - Update fission annotations for skipped tests that are now passing succesfully, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D47347
2019-09-27 14:25:10 +00:00
monikamaheshwari
edb30ffaec Bug 1578683 Turn on ESLint rule prefer-boolean-length-check for toolkit and browser r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D45629
2019-09-14 09:39:26 +00:00
Bogdan Tara
bc8754084e Bug 1580565 - Disable test_classify_by_default.html if fission r=mccr8,egao
Differential Revision: https://phabricator.services.mozilla.com/D45824
2019-09-13 11:09:53 +00:00
Andreas Farre
34aec78805 Bug 1560110 - Remove skip-ifs for tests. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D45379
2019-09-11 08:51:09 +00:00
dlee
a4a3fc3239 Bug 1576292 - Avoid using directory service off-main-thread in URL Classifier gtest. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D44728
2019-09-05 07:34:41 +00:00
Kashav Madan
b07197c2ee Bug 1562264 - Update skip-if annotations, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D41763
2019-08-23 16:05:08 +00:00
dlee
4fc32e69a6 Bug 1575842 - Do not use |ResetTables| when detecting Safe Browing database corruption in GetLookupCache. r=gcp
This patch replaces |ResetTables|(clear table's in-memory and on-disk
data) with |DeleteTables|(clear table's on-disk data) in GetLookupCache to avoid infinite
loop.

We can just delete on-disk data when file corruption is detected in |GetLookupCache|
without clearing the cache's internal data and refreshing current
active caches because in that scenario, the lookup cache failing to read
database has not yet added to the active caches list.

Differential Revision: https://phabricator.services.mozilla.com/D43181
2019-08-23 08:19:18 +00:00
dlee
76dc716330 Bug 1562822 - P3. Reset all the tables that fail to apply a Safe Browsing update. r=gcp
Before this patch, when Safe Browsing updating process discovers an error, it
quits and resets the table failing to update.
After this patch, updating process will continue to run when an error
occurs to find all the tables failing to apply an update.

Differential Revision: https://phabricator.services.mozilla.com/D42615
2019-08-21 12:08:12 +00:00
dlee
6aec2a81df Bug 1562822 - P2. Reset corrupted Safe Browsing database before triggering an update. r=gcp
Patch P2 & P3 refine how Safe Browsing handles Safe Browsing database
loading failure.

Safe Browsing databases are read in 3 scenarios:
1. |GetLookupCache| is called on startup. Safe Browsing reads prefix
files in this case. Metadata for updates(.sbstore, .metadata) are not
read in this scenario.

2. |TableRequest| is called before applying an update, Safe Browsing
reads update metadata to apply a partial update.

3. During an update, Safe Browsing reads both prefix files and metadata
in order to merge the update result.

For Case 1, we reset a table's database only when it returns FILE_CORRUPTED
while loading prefixes from the prefix file(.vlpset).

For Case 2, we reset a table's database when the table fails to load its
metadata file or prefix file. This is because we need to make sure both
files are complete so we can correctly perform a partial update.
Note that in this case, we don't just reset the database when "FILE_CORRUPTED"
is detected, we reset the database as long as an error occurs while loading the
database.

For Case 3, For all the tables failing to load their database during an
updating process, the databases of those tables will be reset.

Case 1 and Case 2 are done in Patch P2; Case 3 is done in Patch P3

Differential Revision: https://phabricator.services.mozilla.com/D42614
2019-08-21 12:08:03 +00:00
dlee
12fa90c9a8 Bug 1562822 - P1. Return NS_ERROR_FILE_CORRUPTED when Safe Browsing cannot read the header of its database. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D42613
2019-08-21 12:07:44 +00:00
dlee
50d290d00a Bug 1551524 - Report failure in LookupCache::WriteFile() if StoreToFile returns an error. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D42618
2019-08-20 18:07:42 +00:00
dlee
f6ca5472ae Bug 1573666 - Do not show warning message when there is no Safe Browsing V3 .sbstore files. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D41942
2019-08-19 09:34:18 +00:00
dlee
3297a79701 Bug 1574450 - Close inputstream before reseting HashStore file. r=gcp
mInputStream holds a reference to the current opened HashStore file.
While resetting the file, mInputStream should be closed first, otherwise,
the file->Remove returns failure code NS_ERROR_FILE_IS_LOCKED.
(This only happens in Windows platform)

Differential Revision: https://phabricator.services.mozilla.com/D42460
2019-08-19 07:45:33 +00:00
Razvan Maries
1f67d7021a Backed out 2 changesets (bug 1562264) for causing Android perma fails. CLOSED TREE
Backed out changeset b66eec7d2e55 (bug 1562264)
Backed out changeset 445eadfd8ce3 (bug 1562264)
2019-08-17 02:24:40 +03:00
Kashav Madan
a2c45b73c6 Bug 1562264 - Update skip-if annotations, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D41763
2019-08-16 17:31:52 +00:00
dlee
46a1c768ae Bug 1573176 - Fix SafeBrowsing doesn't use correct preference name for social tracking and cryptoming. r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D41645
2019-08-13 07:51:50 +00:00
Cosmin Sabou
44fa64cd1f Bug 1571698 - Annotate tests that also crash on opt builds. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D41459
2019-08-10 00:45:51 +00:00
dlee
0a6035c0c3 Bug 1564346 - SafeBrowsing gtest code refactoring. r=gcp
Refactor the gtest code because it confused me while adding new tests.
This patch focus on refining utility function but it also contains other
minor refinements.

Changes includes:
1. Add comments to utility function
2. Move common utility functions to Common.cpp and remove duplicates
3. Header file removal and reorder
4. Unify MPL commnetc
5. Replace anonymouse namespace with static function

Differential Revision: https://phabricator.services.mozilla.com/D37532
2019-08-08 14:29:40 +00:00
Noemi Erli
50ef59c9ee Backed out changeset 6ec4bd94bb51 (bug 1564346) for causing build bustages in TestVariableLengthPrefixSet.cpp CLOSED TREE 2019-08-07 18:57:31 +03:00
dlee
ea550ac41d Bug 1564346 - SafeBrowsing gtest code refactoring. r=gcp
Refactor the gtest code because it confused me while adding new tests.
This patch focus on refining utility function but it also contains other
minor refinements.

Changes includes:
1. Add comments to utility function
2. Move common utility functions to Common.cpp and remove duplicates
3. Header file removal and reorder
4. Unify MPL commnetc
5. Replace anonymouse namespace with static function

Differential Revision: https://phabricator.services.mozilla.com/D37532
2019-08-07 15:17:49 +00:00
Andrea Marchesini
cae07bca6f Bug 1570805 - [stp] Turn on Social Tracking Protection Prefs, r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D40928
2019-08-07 15:02:50 +00:00
Andrea Marchesini
214a46202a Bug 1570971 - Enable all the annotation URL-Classifier features and remove their prefs, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40420
2019-08-05 11:34:24 +00:00
Tom Schuster
0700472892 Bug 1558915 - Use infallible nsIURI::SchemeIs in toolkit/ r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40323
2019-08-02 16:31:54 +00:00
Mihai Alexandru Michis
5a74ddfbef Backed out 2 changesets (bug 1558915) for causing bustages. CLOSED TREE
Backed out changeset e44c9fd81e5b (bug 1558915)
Backed out changeset 3da6e9e86be4 (bug 1558915)
2019-08-02 12:17:42 +03:00
Tom Schuster
b637c03f89 Bug 1558915 - Use infallible nsIURI::SchemeIs in toolkit/ r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40323
2019-08-02 08:54:18 +00:00
Kris Maglione
2ca539ce53 Bug 1569832: Part 0 - Update crash annotations one last time. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D40096
2019-08-01 00:53:25 +00:00
dlee
270a61b3ea Bug 1562875 - Listmanager kiffoffUpdate doesn't need to obtain on-disk data. r=gcp
While listmanager called |kickoffUpdate|, it used to call |GetTables| to
retrieve update information and used the information to distinguish if
a table is a "existing" table or not.

In Bug 1045163, the "existing table" logic was removed, which also means we
don't need to call |GetTabkes| anymore. This patch removes calling
Classifier::TableRequest to reduce unnecessary disk IO during startup.

Differential Revision: https://phabricator.services.mozilla.com/D37037
2019-07-11 12:49:14 +00:00
Nicholas Nethercote
c4aacd8403 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

Differential Revision: https://phabricator.services.mozilla.com/D39138
2019-07-26 01:10:23 +00:00
Kris Maglione
1b5a278b6a Bug 1566952: Part 2 - Update Fission failure annotations after skipping crashes. r=mccr8
When a test crashes, the harness skips all of the remaining tests in the
directory. That means that with crashes skipped, we now try to run a whole lot
more tests than we did before, and a lot of them fail under Fission.

This patch adds annotations to the new failures that show up after part 1.

Differential Revision: https://phabricator.services.mozilla.com/D38726
2019-07-19 12:30:10 -07:00
Kris Maglione
0f4a61c1c2 Bug 1566952: Part 1 - Annotate mochitests that crash with Fission enabled. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D38725
2019-07-17 13:37:48 -07:00
Kris Maglione
9f00b7395d Bug 1566182: Annotate mochitests that fail with Fission enabled. r=mccr8
My preference was to annotate most of the failing tests with `fail-if` so that
if they start passing, the `fail-if` needs to be removed and they need to keep
passing. That doesn't work for tests that timeout, or which trigger failures
from their cleanup functions, however, so those tests need skip-if. And tests
with fail in their cleanup functions likely leave the browser in an
inconsistent state for subsequent tests, anyway, so really should be skipped
regardless.

There are some remaining tests which still fail because of crashes. I chose
not to skip them here, but to fix the crashes in separate bugs instead.

Differential Revision: https://phabricator.services.mozilla.com/D38247
2019-07-15 16:19:32 -07:00
Sylvestre Ledru
3bf4f867df Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D38057
2019-07-16 07:33:44 +00:00
dlee
86a94ce235 Bug 1560597 - Safe Browsing supports downloading social tracking list. r=baku
This patches only allows Safe Browsing to download the list, but the feature
is still default disabled and the lists will not be downloaded.

Turn on social tracking by setting:
"privacy.trackingprotection.socialtracking.enabled"
"privacy.trackingprotection.socialtracking.annotate.enabled"

Differential Revision: https://phabricator.services.mozilla.com/D37410
2019-07-11 08:04:05 +00:00