Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / custom / crash-without-dom-wrapper.html
blobb5e7e44a1a5c722dadf175061e98e3fff2c88e2d
1 <script src="../../../resources/testharness.js"></script>
2 <script src="../../../resources/testharnessreport.js"></script>
3 <script>setTimeout("document.querySelector('iframe').remove()", 20);</script>
4 <script src="test-harness-utils.js"></script>
5 <body>
6 <script>
7 (function () {
8 var test = async_test('crash expected without crbug/446076 fix');
9 withFrame(function (frame) {
10 var doc = frame.contentDocument;
11 var step = test.step_func(function(event) {
12 doc.body.firstChild.remove();
13 window.removeEventListener('message', step);
14 frame.remove();
15 test.done();
16 });
17 window.addEventListener('message', step);
19 var script = doc.createElement('script');
20 script.textContent =
21 'var proto = Object.create(HTMLElement.prototype); ' +
22 'document.registerElement("x-a", {prototype: proto}); ' +
23 'document.body.innerHTML = "<x-a>"; ' +
24 'window.parent.postMessage({step: "remove"}, "*");';
25 doc.body.appendChild(script);
26 });
27 })();
28 </script>