| Index: chrome/browser/resources/net_internals/events_view.js
|
| ===================================================================
|
| --- chrome/browser/resources/net_internals/events_view.js (revision 158398)
|
| +++ chrome/browser/resources/net_internals/events_view.js (working copy)
|
| @@ -285,9 +285,23 @@
|
| var filterInfo = this.parseDirective_(filterText, directive);
|
| if (filterInfo == null)
|
| break;
|
| - if (!filter[directive])
|
| - filter[directive] = [];
|
| - filter[directive].push(filterInfo.parameter);
|
| +
|
| + // Split parameters around commas and remove empty elements.
|
| + var parameters = filterInfo.parameter.split(',');
|
| + parameters = parameters.filter(function(string) {
|
| + return string.length > 0;
|
| + });
|
| +
|
| + // If there's already a matching filter, take the intersection.
|
| + // This behavior primarily exists for tests. It is not correct
|
| + // when one of the 'type' filters is a partial match.
|
| + if (filter[directive]) {
|
| + parameters = parameters.filter(function(string) {
|
| + return filter[directive].indexOf(string) != -1;
|
| + });
|
| + }
|
| +
|
| + filter[directive] = parameters;
|
| filterText = filterInfo.remainingText;
|
| }
|
| }
|
|
|