(url)
| 20175 | } |
| 20176 | |
| 20177 | function isResourceUrlAllowedByPolicy(url) { |
| 20178 | var parsedUrl = urlResolve(url.toString()); |
| 20179 | var i, n, allowed = false; |
| 20180 | // Ensure that at least one item from the whitelist allows this url. |
| 20181 | for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) { |
| 20182 | if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) { |
| 20183 | allowed = true; |
| 20184 | break; |
| 20185 | } |
| 20186 | } |
| 20187 | if (allowed) { |
| 20188 | // Ensure that no item from the blacklist blocked this url. |
| 20189 | for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) { |
| 20190 | if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) { |
| 20191 | allowed = false; |
| 20192 | break; |
| 20193 | } |
| 20194 | } |
| 20195 | } |
| 20196 | return allowed; |
| 20197 | } |
| 20198 | |
| 20199 | function generateHolderType(Base) { |
| 20200 | var holderType = function TrustedValueHolderType(trustedValue) { |
no test coverage detected