Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/frames/open-then-unload.html | 
| diff --git a/third_party/WebKit/LayoutTests/fast/frames/open-then-unload.html b/third_party/WebKit/LayoutTests/fast/frames/open-then-unload.html | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..21284074327cb54e3c17c1a0e6fc86175dfda31b | 
| --- /dev/null | 
| +++ b/third_party/WebKit/LayoutTests/fast/frames/open-then-unload.html | 
| @@ -0,0 +1,25 @@ | 
| +<!DOCTYPE html> | 
| +<html> | 
| +<head> | 
| +<script src="../../resources/js-test.js"></script> | 
| +<script> | 
| +jsTestIsAsync = true; | 
| + | 
| +function runTest() { | 
| + description('Test that document.open() doesn\'t allow frames to be attached during frame detach.'); | 
| + window[0].document.open(); | 
| 
 
dcheng
2016/02/03 03:13:29
At this point, LoadEventProgress gets reset to Loa
 
 | 
| + window[0].document.appendChild(document.createElement('iframe')); | 
| 
 
dcheng
2016/02/03 03:13:29
Right now, our tree looks like this:
[Main frame]
 
 | 
| + window[0][0].addEventListener('unload', function() { | 
| + window[0].document.documentElement.appendChild(document.createElement('iframe')); | 
| 
 
dcheng
2016/02/03 03:13:29
Since Child B's load event progress is normal, we
 
 | 
| + shouldBe('1', 'window[0].length'); | 
| 
 
dcheng
2016/02/03 03:13:29
If the iframe load is blocked, then window[0].leng
 
 | 
| + shouldBeUndefined('window[0][1]'); | 
| + finishJSTest(); | 
| + }); | 
| + window[0].location = 'data:text/plain,Hello world!'; | 
| +} | 
| +</script> | 
| +</head> | 
| +<body onload="runTest()"> | 
| +<iframe></iframe> | 
| +</body> | 
| +</html> |