(url)
| 16542 | } |
| 16543 | |
| 16544 | function isResourceUrlAllowedByPolicy(url) { |
| 16545 | var parsedUrl = urlResolve(url.toString()); |
| 16546 | var i, n, allowed = false; |
| 16547 | // Ensure that at least one item from the whitelist allows this url. |
| 16548 | for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) { |
| 16549 | if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) { |
| 16550 | allowed = true; |
| 16551 | break; |
| 16552 | } |
| 16553 | } |
| 16554 | if (allowed) { |
| 16555 | // Ensure that no item from the blacklist blocked this url. |
| 16556 | for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) { |
| 16557 | if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) { |
| 16558 | allowed = false; |
| 16559 | break; |
| 16560 | } |
| 16561 | } |
| 16562 | } |
| 16563 | return allowed; |
| 16564 | } |
| 16565 | |
| 16566 | function generateHolderType(Base) { |
| 16567 | var holderType = function TrustedValueHolderType(trustedValue) { |
no test coverage detected