(url)
| 17101 | } |
| 17102 | |
| 17103 | function isResourceUrlAllowedByPolicy(url) { |
| 17104 | var parsedUrl = urlResolve(url.toString()); |
| 17105 | var i, n, allowed = false; |
| 17106 | // Ensure that at least one item from the whitelist allows this url. |
| 17107 | for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) { |
| 17108 | if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) { |
| 17109 | allowed = true; |
| 17110 | break; |
| 17111 | } |
| 17112 | } |
| 17113 | if (allowed) { |
| 17114 | // Ensure that no item from the blacklist blocked this url. |
| 17115 | for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) { |
| 17116 | if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) { |
| 17117 | allowed = false; |
| 17118 | break; |
| 17119 | } |
| 17120 | } |
| 17121 | } |
| 17122 | return allowed; |
| 17123 | } |
| 17124 | |
| 17125 | function generateHolderType(Base) { |
| 17126 | var holderType = function TrustedValueHolderType(trustedValue) { |
no test coverage detected