Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/events/crash-on-querying-event-path.html |
| diff --git a/third_party/WebKit/LayoutTests/http/tests/dom/crash-on-querying-event-path.html b/third_party/WebKit/LayoutTests/fast/events/crash-on-querying-event-path.html |
| similarity index 75% |
| rename from third_party/WebKit/LayoutTests/http/tests/dom/crash-on-querying-event-path.html |
| rename to third_party/WebKit/LayoutTests/fast/events/crash-on-querying-event-path.html |
| index 657bf25f120b7fe4df5fa95d3690b47759872102..8ffab27ad918f5d0ff316a96d01f9b85f728db2b 100644 |
| --- a/third_party/WebKit/LayoutTests/http/tests/dom/crash-on-querying-event-path.html |
| +++ b/third_party/WebKit/LayoutTests/fast/events/crash-on-querying-event-path.html |
| @@ -1,6 +1,6 @@ |
| <html> |
| <head> |
| -<script src="/js-test-resources/js-test.js"></script> |
| +<script src="../../resources/js-test.js"></script> |
| </head> |
| <body> |
| <script> |
| @@ -9,24 +9,18 @@ description('This is a regression test for crbug.com/400476. It should not crash |
| var root = document.documentElement; |
| var iframe = root.ownerDocument.createElement('iframe'); |
| -var timeouts = []; |
| -iframe.onload = iframeOnload; |
| -root.appendChild(iframe); |
| - |
| -function iframeOnload() { |
| +iframe.onload = function() { |
| var defaultView = iframe.contentDocument.defaultView; |
| defaultView.onpageshow = onPageShow; |
| - iframe.src = null; |
|
dcheng
2015/09/30 00:46:18
This test was flaking, so I did some investigation
|
| - timeouts[timeouts.length] = window.setTimeout(nextIframeLoaded, 100); |
| -} |
| + window.setTimeout(tryToCrash, 0); |
| +}; |
| +root.appendChild(iframe); |
| function onPageShow() { |
| eventObj = arguments[0]; |
| } |
| -function nextIframeLoaded() { |
| - timeouts.forEach(window.clearTimeout); |
| - |
| +function tryToCrash() { |
| // Access of eventObj.path caused the crash. |
| // The test is somewhat flaky, in that the test may pass as correct |
| // despite the bug being the code. The exact conditions |