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

Unified Diff: tools/android/loading/content_classification_lens_unittest.py

Issue 1645953002: Conditional import of adblocker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: tools/android/loading/content_classification_lens_unittest.py
diff --git a/tools/android/loading/content_classification_lens_unittest.py b/tools/android/loading/content_classification_lens_unittest.py
index cca7d52b9082b2784a8f7e68465425022cc7eabd..b4f5ad1b066370037bc51a430cc56d0db01a640b 100644
--- a/tools/android/loading/content_classification_lens_unittest.py
+++ b/tools/android/loading/content_classification_lens_unittest.py
@@ -25,6 +25,13 @@ class ContentClassificationLensTestCase(unittest.TestCase):
'frame_id': '123.13', 'parent_frame_id': _MAIN_FRAME_ID}]
_RULES = ['bla.com']
+ def testNoRules(self):
+ trace = test_utils.LoadingTraceFromEvents(
+ [self._REQUEST], self._PAGE_EVENTS)
+ lens = ContentClassificationLens(trace, [], [])
+ self.assertFalse(lens.IsAdRequest(self._REQUEST))
+ self.assertFalse(lens.IsTrackingRequest(self._REQUEST))
+
def testAdRequest(self):
trace = test_utils.LoadingTraceFromEvents(
[self._REQUEST], self._PAGE_EVENTS)

Powered by Google App Engine
This is Rietveld 408576698