| height: calc(var(--scaleFactor) * (var(--baseLength))); /* The extra parentheses around the second operand are necessary. */ |
| <p>This test PASSED if it doesn't cause a crash, especially when run with Guard Malloc or MallocScribble enabled.</p> |
| // Iterating at least 100 times seems to reliably reproduce the crash when run without Guard Malloc/MallocScribble enabled. |
| for (var i = 0; i < 100; ++i) { |
| var oldStyleElement = document.querySelector("style"); |
| var newStyleElement = document.createElement("style"); |
| newStyleElement.textContent = oldStyleElement.textContent; |
| document.head.removeChild(oldStyleElement); |
| document.head.appendChild(newStyleElement); |