From 848f9b688d9174dbf4ea5262519c4eed5b5f1249 Mon Sep 17 00:00:00 2001 From: Matt R Date: Sun, 7 May 2017 01:05:20 +0100 Subject: [PATCH] Bug 1361473 - Implemented new 'transferred-larger-than' filter; r=Honza MozReview-Commit-ID: FBGj1YnMaJt --HG-- extra : rebase_source : 440fea57f325de4a67e374bce3540a5c15882227 --- .../client/netmonitor/src/utils/filter-text-utils.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/devtools/client/netmonitor/src/utils/filter-text-utils.js b/devtools/client/netmonitor/src/utils/filter-text-utils.js index 280e5d085359..43c6a10aec6f 100644 --- a/devtools/client/netmonitor/src/utils/filter-text-utils.js +++ b/devtools/client/netmonitor/src/utils/filter-text-utils.js @@ -43,6 +43,7 @@ const FILTER_FLAGS = [ "set-cookie-value", "mime-type", "larger-than", + "transferred-larger-than", "is", "has-response-header", "regexp", @@ -98,6 +99,7 @@ function processFlagFilter(type, value) { case "size": case "transferred": case "larger-than": + case "transferred-larger-than": let multiplier = 1; if (value.endsWith("k")) { multiplier = 1024; @@ -165,6 +167,13 @@ function isFlagFilterMatch(item, { type, value, negative }) { case "larger-than": match = item.contentSize > value; break; + case "transferred-larger-than": + if (item.fromCache) { + match = false; + } else { + match = item.transferredSize > value; + } + break; case "mime-type": match = item.mimeType.includes(value); break;