Index: LayoutTests/inspector/sources/debugger/async-callstack-reload-no-crash.html |
diff --git a/LayoutTests/inspector/sources/debugger/async-callstack-reload-no-crash.html b/LayoutTests/inspector/sources/debugger/async-callstack-reload-no-crash.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1fdd5e0122e2d89af006c979fa8e928e3af2c177 |
--- /dev/null |
+++ b/LayoutTests/inspector/sources/debugger/async-callstack-reload-no-crash.html |
@@ -0,0 +1,54 @@ |
+<html> |
+<head> |
+<script src="../../../http/tests/inspector/inspector-test.js"></script> |
+<script src="../../../http/tests/inspector/debugger-test.js"></script> |
+<script> |
+ |
+function testFunction() |
+{ |
+ setInterval(callback, 0); |
+ debugger; |
+} |
+ |
+function callback() |
+{ |
+ return window.__foo; |
+} |
+ |
+function test() |
+{ |
+ var maxAsyncCallStackDepth = 4; |
+ InspectorTest.startDebuggerTest(step1, true); |
+ |
+ function step1() |
+ { |
+ DebuggerAgent.setAsyncCallStackDepth(maxAsyncCallStackDepth, step2); |
+ } |
+ |
+ function step2() |
+ { |
+ InspectorTest.runTestFunctionAndWaitUntilPaused(didPause); |
+ } |
+ |
+ function didPause() |
+ { |
+ InspectorTest.addResult("Reloading the page..."); |
+ InspectorTest.reloadPage(afterReload); |
+ } |
+ |
+ function afterReload() |
+ { |
+ InspectorTest.addResult("PASS: Reloaded successfully."); |
+ InspectorTest.completeDebuggerTest(); |
+ } |
+} |
+ |
+</script> |
+</head> |
+<body onload="runTest()"> |
+<p> |
+Tests that page reload with async stacks turned on does not crash. |
+<a href="https://code.google.com/p/chromium/issues/detail?id=441223">Bug 441223.</a> |
+</p> |
+</body> |
+</html> |