(elementOrAmpDoc)
| 127 | * @param {!Element|!./service/ampdoc-impl.AmpDoc} elementOrAmpDoc |
| 128 | */ |
| 129 | export function runChunksForTesting(elementOrAmpDoc) { |
| 130 | const service = chunkInstanceForTesting(elementOrAmpDoc); |
| 131 | const errors = []; |
| 132 | while (true) { |
| 133 | try { |
| 134 | if (!service.execute_(/* idleDeadline */ null)) { |
| 135 | break; |
| 136 | } |
| 137 | } catch (e) { |
| 138 | errors.push(e); |
| 139 | } |
| 140 | } |
| 141 | if (errors.length) { |
| 142 | throw errors[0]; |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * The priority of a chunk task. Higher priority tasks have higher values. |
no test coverage detected