<style>body{}</style>
<body>
This test passes if it does not crash.
<script>
if (window.testRunner)
  testRunner.dumpAsText();
var style = document.styleSheets[0].ownerNode;
style.type = 'p';
style.innerHTML = 't';
console.assert(document.styleSheets.length == 0);

if (document.styleSheets.length) {
  document.body.offsetTop;
  document.styleSheets[0].deleteRule(0);
  document.designMode = 'on';
}
</script>
