This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.
Differential Revision: https://phabricator.services.mozilla.com/D53740
There are three major issues that we need to fix for tests if we move the
OnContentBlockingEvent to the parent process. First, we notify the event
in the idle queue in the parent process. For some reasons, the test
script could outrun the callbacks of the OnContentBlockingEvent. So, it
could happen that the UI hasn't got updated while we check its state. To
fix this, we make the test script to wait the UI to be updated
explicitly.
Second, the tracking UI tests would access the ContentblockingLog in the
content in order to get the hosts of different blocking categories. And
the log in the content may not be updated when we open the subview. And
there is no explicit way to know whether the log is updated or not. So,
we use SetTimeout to temporary fix this issue. Once we finish the work
that moving the ContentBlockingLog into the parent (Bug1599046), we can
remove this work-around.
Third, there is one test that it waits OnContentBlockingEvent in the
content. We make it to listen the event in the parent to fix it.
Differential Revision: https://phabricator.services.mozilla.com/D55650
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.
Differential Revision: https://phabricator.services.mozilla.com/D53740
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.
Differential Revision: https://phabricator.services.mozilla.com/D53740
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.
Differential Revision: https://phabricator.services.mozilla.com/D53740
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.
find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
if [ -n "$interfaces" ]; then
if [[ "$interfaces" == *$'\n'* ]]; then
regexp="\("
for i in $interfaces; do regexp="$regexp$i\|"; done
regexp="${regexp%%\\\|}\)"
else
regexp="$interfaces"
fi
interface=$(basename "$path")
rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
if [ $hits -eq 0 ]; then
echo "Removing ${interface} from ${path2}"
grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
mv -f "$path2".tmp "$path2"
fi
done
fi
done
Differential Revision: https://phabricator.services.mozilla.com/D55444
This patch does the following:
1. Disable flashblock when fission is enabled.
2. Update flashblock tests to expect "unknown" classification when fission is
enabled.
3. Remove skip-if=fission in flashblock mochitests.
Depends on D51098
Differential Revision: https://phabricator.services.mozilla.com/D55091
Although we decided to disable flashblock when fission is enabled, we
still need to update testcases so they can run normally in the fission mode.
Differential Revision: https://phabricator.services.mozilla.com/D51098
There are two places using DBService during a page load at startup:
1. nsChannelClassifier::Start, used by Phishing Protection
2. AsyncChannelClassifier::CheckChannel, used by Tracking Protection
Tracking protection checks happen before establishing a network connection, so it happens
prior to phishing protection checkes. When we load a page at
startup, ::CheckChannel API is called, but DBService is not yet created.
This patch fixes this issue by creating a DBService instance when
::GetWorker API is called without a DBService instance.
Differential Revision: https://phabricator.services.mozilla.com/D55248
There are two places using DBService during a page load at startup:
1. nsChannelClassifier::Start, used by Phishing Protection
2. AsyncChannelClassifier::CheckChannel, used by Tracking Protection
Tracking protection checks happen before establishing a network connection, so it happens
prior to phishing protection checkes. When we load a page at
startup, ::CheckChannel API is called, but DBService is not yet created.
This patch fixes this issue by creating a DBService instance when
::GetWorker API is called without a DBService instance.
Differential Revision: https://phabricator.services.mozilla.com/D55248
In AsyncApplyUpdate, the Safe Browsing update thread holds a reference
to 'Classifier'. In some scenarios(See Bug 1591112), the update
thread may be the last one holding the reference; hence the update
thread releases the 'Classifier' when the task is ended.
Classifier has to be created and destroyed in the same thread
because of the constrain of LazyIdelThread, in the current
implementation, it should be released by the worker thread.
This patch transfers the ownership of the reference of 'Classifier 'from the
update thread to the worker thread before its task is finished to make
sure we release 'Classifier' in the right thread.
Differential Revision: https://phabricator.services.mozilla.com/D53156
Most of these tests relied on assumptions that were broken by the updated
content event helpers (timing, being in a ContentTask, etc).
Depends on D51441
Differential Revision: https://phabricator.services.mozilla.com/D51442
Most of these tests relied on assumptions that were broken by the new content
event utils (timing, being in a ContentTask, etc).
Differential Revision: https://phabricator.services.mozilla.com/D51442
Most of these tests relied on assumptions that were broken by the new content
event utils (timing, being in a ContentTask, etc).
Differential Revision: https://phabricator.services.mozilla.com/D51442
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
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
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
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
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
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
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
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