Commit Graph

665 Commits

Author SHA1 Message Date
Oana Pop Rus
9af0a616ef Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-07-04 06:38:21 +03:00
Jeff Gilbert
1fffe82028 Bug 1560736 - Re-enable tests.
Differential Revision: https://phabricator.services.mozilla.com/D36686
2019-07-02 23:25:40 +00:00
Kris Maglione
1eb6dde4ac Bug 1541557: Part 5 - Update callers of ChromeScript.sendSyncMessage to use sendQuery instead. r=nika
Since JSWindowActors don't have direct access to synchronous messaging,
ChromeScript callers are going to need to migrate to asynchronous messaging
and queries instead.

Since there's no comparable API to sendQuery for frame message managers, this
patch adds a stub that uses synchronous messaging, but makes the API appear
asynchronous, and migrates callers to use it instead of direct synchronous
messaging. This will be replaced with a true synchronous API in the actor
migration.

Fortunately, most of the time, this actually leads to simpler code. The
`sendQuery` API doesn't have the odd return value semantics of
`sendSyncMessage`, and can usually just be used as a drop-in replacement. Many
of the `sendSyncMessage` callers don't actually use the result, and can just
be changed to `sendAsyncMessage`. And many of the existing async messaging
users can be changed to just use `sendQuery` rather than sending messages and
adding response listeners.

However, the APZ code is an exception. It relies on intricate properties of
the event loop, and doesn't have an easy way to slot in promise handlers, so I
migrated it to using sync messaging via process message managers instead.

Differential Revision: https://phabricator.services.mozilla.com/D35055
2019-06-12 12:40:51 -07:00
Kris Maglione
b971320e6c Bug 1541557: Part 4 - Stop relying on synchronous preference getters/setters. r=nika
The SpecialPowers set*Pref/get*Pref APIs currently use synchronous messaging
to set and get preference values from the parent process. Aside from directly
affecting callers of those APIs, it also affects callers of `pushPrefEnv`,
which is meant to be asynchronous, but is in practice usually synchronous due
to the synchronous messaging it uses.

This patch updates the getPref APIs to use the in-process preference service
(which most callers are expecting anyway), and also updates the callers of
the setPref and pushPrefEnv APIs to await the result if they're relying on it
taking effect immediately.

Unfortunately, there are some corner cases in tests that appear to only work
because of the quirks of the current sync messaging approach. The synchronous
setPref APIs, for instance, trigger preference changes in the parent
instantly, but don't update the values in the child until we've returned to
the event loop and had a chance to process the notifications from the parent.
The differnce in timing leads some tests to fail in strange ways, which this
patch works around by just adding timeouts.

There should be follow-ups for test owners to fix the flakiness.

Differential Revision: https://phabricator.services.mozilla.com/D35054
2019-06-13 09:34:39 -07:00
Kris Maglione
4753549aee Bug 1541557: Part 3 - Update callers of sync SpecialPowers functions to await the return value. r=nika
When we migrate SpecialPowers to a JSWindowActor, it will no longer be able to
use synchronous IPC messaging, which means that its current synchronous APIs
will have to become asynchronous.

This patch doesn't change the behavior of those functions, but it does change
their callers to `await` their return values rather than using them directly.
This pattern will work the same whether the functions return a promise or a
plain value, which simplifies the migration.

Differential Revision: https://phabricator.services.mozilla.com/D35053
2019-06-12 11:41:32 -07:00
Cosmin Sabou
232f9839d7 Bug 1560736 - Disable test_socialtracking.html for frequent failures. a=testonly 2019-07-01 02:44:31 +03:00
dlee
f59bb40e5d Bug 1531354 - P5. Safe Browsing test entries are directly stored in LookupCache. r=gcp
Create test entries via update introduces performance overhead.
We can store them directly in LookupCache and do not save test entries
to disk.

Differential Revision: https://phabricator.services.mozilla.com/D34576
2019-06-29 19:05:41 +00:00
Andreea Pavel
583dd126a7 Bug 1560736 - delete extra skip-if condition 2019-06-28 07:22:13 +03:00
Andreea Pavel
d5461605f0 Bug 1560736 - correct skip-if condition
Differential Revision: https://phabricator.services.mozilla.com/D36281
2019-06-28 03:03:45 +00:00
Andreea Pavel
f236b7b24d Bug 1560736 - disabled test_socialtracking_annotate.html on android debug r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D36267
2019-06-28 00:33:32 +00:00
Andrea Marchesini
d89749c697 Bug 1560040 - Introduce 2 new URL-Classifier features to annotate and block social trackers - tests, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D35422
2019-06-22 16:54:04 +00:00
Gijs Kruitbosch
91c33838c9 Bug 1519434 - only allow perma-enabling non-flash plugins, r=jmathies,aswan
Differential Revision: https://phabricator.services.mozilla.com/D34213
2019-06-13 08:41:28 +00:00
Gijs Kruitbosch
572dbf7379 Bug 1519434 - remove plugin click to play pref as running without it won't make sense anymore, r=aswan
Differential Revision: https://phabricator.services.mozilla.com/D34212
2019-06-13 08:40:59 +00:00
Andreea Pavel
cc37a3c8a9 Backed out 7 changesets (bug 1519434) for mochiest failures e.g test_bug1165981.html on a CLOSED TREE
Backed out changeset 1314623831ad (bug 1519434)
Backed out changeset 6dd4fa67e209 (bug 1519434)
Backed out changeset b241c580b293 (bug 1519434)
Backed out changeset b48dca2f487f (bug 1519434)
Backed out changeset 49c64ed2e67b (bug 1519434)
Backed out changeset dd009a001c6c (bug 1519434)
Backed out changeset 5b6ec4d2f0ab (bug 1519434)
2019-06-12 23:31:16 +03:00
Gijs Kruitbosch
ec5127afdc Bug 1519434 - only allow perma-enabling non-flash plugins, r=jmathies,aswan
Differential Revision: https://phabricator.services.mozilla.com/D34213
2019-06-12 18:49:42 +00:00
Gijs Kruitbosch
74e20f32e6 Bug 1519434 - remove plugin click to play pref as running without it won't make sense anymore, r=aswan
Differential Revision: https://phabricator.services.mozilla.com/D34212
2019-06-12 18:49:30 +00:00
Boris Zbarsky
cae135dd3f Bug 1557501. Stop using [array] in nsIPrefBranch. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D34032
2019-06-07 01:01:12 +00:00
Zibi Braniecki
45dab10e39 Bug 1552714 - Fix two tests which were caught not waiting for l10n but checking for l10n values. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D33741
2019-06-06 16:33:18 +00:00
Sylvestre Ledru
69746836db Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D30883
2019-05-25 17:46:15 +00:00
Alastor Wu
f288425092 Bug 1550633 - part17 : enable loading for track elements in 'browser_cache.js ' and 'trackerFrame.html '. r=timhuang
As now we won't load disabled text track, we have to mark track as default in order to trigger loading which would be done by automatically text track selection, or to set its track mode explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D32359
2019-05-24 19:07:18 +00:00
arthur.iakab
699b884244 Backed out changeset a296439a25ff (bug 1519636) for frequent Windows cppunit failures CLOSED TREE 2019-05-24 14:26:01 +03:00
Sylvestre Ledru
10a773a4ca Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D30883
2019-05-24 09:59:17 +00:00
dlee
355b8e4b76 Bug 1542744 - P3. Run the same prefixset testcases for different configuration. r=gcp
This patch does the following:
1. Run the same prefixset tests when
  * browser.safebrowsing.prefixset.max_array_size = 0
  * browser.safebrowsing.prefixset.max_array_size = UINT32_MAX

  This makes sure both of the methods to store prefixset are tested by existing testcases

2. Refine gtest with test fixture
3. Add TinySet and LargeSet testcases

Differential Revision: https://phabricator.services.mozilla.com/D30338
2019-05-14 22:42:28 +00:00
shindli
35dcb332ae Backed out 3 changesets (bug 1542744) for causing perma mochitest failures in /builds/worker/workspace/build/src/obj-firefox/dist/include/mozilla/StaticPrefList CLOSED TREE
Backed out changeset f94b6f3a7fff (bug 1542744)
Backed out changeset c51b622bb1fe (bug 1542744)
Backed out changeset aedbe6cdd06f (bug 1542744)
2019-05-15 01:41:06 +03:00
dlee
c07fea4783 Bug 1542744 - P3. Run the same prefixset testcases for different configuration. r=gcp
This patch does the following:
1. Run the same prefixset tests when
  * browser.safebrowsing.prefixset.max_array_size = 0
  * browser.safebrowsing.prefixset.max_array_size = UINT32_MAX

  This makes sure both of the methods to store prefixset are tested by existing testcases

2. Refine gtest with test fixture
3. Add TinySet and LargeSet testcases

Differential Revision: https://phabricator.services.mozilla.com/D30338
2019-05-10 17:40:11 +00:00
Boris Zbarsky
a9b6918cce Bug 1551399 part 2. Stop using [array] in url-classifier's makeFindFullHashRequestV4. r=dimi,gcp
Differential Revision: https://phabricator.services.mozilla.com/D31022
2019-05-14 09:57:16 +00:00
Boris Zbarsky
d288f51dc3 Bug 1551399 part 1. Stop using [array] in url-classifier's makeUpdateRequestV4. r=dimi,gcp
Differential Revision: https://phabricator.services.mozilla.com/D31020
2019-05-14 09:50:42 +00:00
Geoff Brown
55ee3dbaff Bug 1551226 - Run Android x86_64 7.0/debug mochitests; r=snorp
We can run /debug mochitests against geckoview for the cost of another dozen
or so test annotations. Both /opt and /debug mochitests are nearly worthy of
tier 1, but still waiting for bug 1534732.

Differential Revision: https://phabricator.services.mozilla.com/D30931
2019-05-13 20:52:36 +00:00
Ehsan Akhgari
ec06a69fb8 Bug 1500533 - Ensure that TLS session resumption tickets are only consumed if the channel isn't isolated by anti-tracking checks; r=michal,baku
Differential Revision: https://phabricator.services.mozilla.com/D26996
2019-04-18 01:00:22 +00:00
Brian Grinstead
6bf5cf3d2a Bug 1544322 - Part 2.1 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in everything except for dom/ r=bzbarsky
This excludes dom/, otherwise the file size is too large for phabricator to handle.

This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.

Differential Revision: https://phabricator.services.mozilla.com/D27456
2019-04-16 03:50:44 +00:00
Brian Grinstead
36c26fa2b9 Bug 1544322 - Part 1 - Remove the [type] attribute for one-liner <script> tags loading files in chrome://mochikit/content/ r=bzbarsky
This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 1` argument.

Differential Revision: https://phabricator.services.mozilla.com/D26812
2019-04-15 20:56:58 +00:00
Sylvestre Ledru
72e7e7d7e7 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D27245
2019-04-12 13:14:25 +00:00
Oana Pop Rus
9757115ee8 Backed out changeset acb04833e713 (bug 1500533) for assertion failure in nsHttpChannel.cpp on a CLOSED TREE 2019-04-11 23:15:08 +03:00
Ehsan Akhgari
8648b0b8e6 Bug 1500533 - Ensure that TLS session resumption tickets are only consumed if the channel isn't isolated by anti-tracking checks; r=michal,baku
Differential Revision: https://phabricator.services.mozilla.com/D26996
2019-04-11 18:36:16 +00:00
dlee
7320ffd6ce Bug 1543319 - P2. Swap the byte order in-place. r=gcp
We don't need an additional array just for byte reordering, replace
it with in-place processing.

Testcase are modified because the LookupCacheV4::Build API now clears the
input parameter.

Differential Revision: https://phabricator.services.mozilla.com/D26861
2019-04-10 20:53:17 +00:00
Sylvestre Ledru
1666e92b07 Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26280
2019-04-05 21:42:17 +00:00
Csoregi Natalia
2ded4ab36d Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru
ebe9c62d30 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098
2019-04-04 21:36:16 +00:00
Narcis Beleuzu
6b9ce2a82b Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru
194039a8d9 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098
2019-04-04 20:12:23 +00:00
dlee
84d4c57544 Bug 1539150 - Use window.open instead of setting iframe src in test_classify_by_default.html. ?baku r=baku
In the test_classify_by_default.html, we use "network.cookie.cookieBehavior"
to test if a channel is correctly classified.

Cookie restriction is only enabled in nightly and early beta so the
default preference is not always set. Although we set the preference
in the testcase, it is too late because that the channel's cookie
setting might inherit from it's parent and may end up with getting
the old(default) value.

In this patch, we use window.open to test the tracker frame to make
sure we use the udpated prefrence.

Differential Revision: https://phabricator.services.mozilla.com/D25657
2019-04-02 08:00:37 +00:00
Mark Banner
d5029e0dae Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850
2019-03-28 09:38:14 +00:00
Dimi Lee
606b46098e Bug 1522412 - P7. A mochitest to test different channel open call sites are classified. r=Ehsan
The goal of this testcase is to provide an easier way to add callsites
to test if it is correctly classified. This is a first step, more callsites should be added to
the testcase(See Bug 1532691)

Flow of the test case:
1. setup the server(trackerFrame.sjs) with the expceted number of request it should receive
2. load the test frame(trackerFrame.html) with cookie restriction off, to ensure all the tracking requests contain cookies
3. server responses a list of tracker's request with cookie after reciving all the requests
4. the list should contain all the trackers in the test frame.
5. enable cookie restriction and load the test frame again.
6. server responses a list of tracker's request without cookie after reciving all the requests
7. the list should contain all the trackers in the test frame.

Differential Revision: https://phabricator.services.mozilla.com/D22116
2019-03-25 12:51:58 +00:00
Dimi Lee
c830b2c5d0 Bug 1522412 - P6. Add a xpcshell-test for default classification. r=Ehsan
This patch adds a xpcsehll-test which tests all the combinations of
those parameters used by the heuristic classification algorithm.

Differential Revision: https://phabricator.services.mozilla.com/D22115
2019-03-25 12:50:29 +00:00
dlee
382ced01ab Bug 1522412 - P5. Do not use system principal in testcase to test tracking protection. r=Ehsan
Some testcases are chrome scope testcase hence the resources it loads are triggered by
"system principal". This will exempt the resource from classification.

So in this patch, we used a new window to for the tracker test frame.
The window creation code is referenced from test_privatebrowsing_trackingprotection.html.

Differential Revision: https://phabricator.services.mozilla.com/D22114
2019-03-25 12:49:28 +00:00
Gurzau Raul
8cd94b1658 Backed out 7 changesets (bug 1522412) for xpcshell failures at test_shouldclassify.js on a CLOSED TREE.
Backed out changeset 7c998456e1fd (bug 1522412)
Backed out changeset ebb581ddf1d1 (bug 1522412)
Backed out changeset 850e1c68d978 (bug 1522412)
Backed out changeset fe288a48cecb (bug 1522412)
Backed out changeset 5399bca472b1 (bug 1522412)
Backed out changeset 91e5b339fe11 (bug 1522412)
Backed out changeset b80098d0a5c4 (bug 1522412)
2019-03-21 11:02:09 +02:00
Dimi Lee
5f0ab01a26 Bug 1522412 - P7. A mochitest to test different channel open call sites are classified. r=Ehsan
The goal of this testcase is to provide an easier way to add callsites
to test if it is correctly classified. This is a first step, more callsites should be added to
the testcase(See Bug 1532691)

Flow of the test case:
1. setup the server(trackerFrame.sjs) with the expceted number of request it should receive
2. load the test frame(trackerFrame.html) with cookie restriction off, to ensure all the tracking requests contain cookies
3. server responses a list of tracker's request with cookie after reciving all the requests
4. the list should contain all the trackers in the test frame.
5. enable cookie restriction and load the test frame again.
6. server responses a list of tracker's request without cookie after reciving all the requests
7. the list should contain all the trackers in the test frame.

Differential Revision: https://phabricator.services.mozilla.com/D22116
2019-03-21 07:35:50 +00:00
Dimi Lee
126ede093d Bug 1522412 - P6. Add a xpcshell-test for default classification. r=Ehsan
This patch adds a xpcsehll-test which tests all the combinations of
those parameters used by the heuristic classification algorithm.

Differential Revision: https://phabricator.services.mozilla.com/D22115
2019-03-21 07:35:44 +00:00
dlee
71f2d7ef13 Bug 1522412 - P5. Do not use system principal in testcase to test tracking protection. r=Ehsan
Some testcases are chrome scope testcase hence the resources it loads are triggered by
"system principal". This will exempt the resource from classification.

So in this patch, we used a new window to for the tracker test frame.
The window creation code is referenced from test_privatebrowsing_trackingprotection.html.

Differential Revision: https://phabricator.services.mozilla.com/D22114
2019-03-21 07:34:17 +00:00
Andrea Marchesini
bab3563e61 Bug 1535799 - nsIHttpChannel.isTrackingResource should be a method, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D23765
2019-03-17 06:55:50 +00:00