Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Unified Diff: LayoutTests/http/tests/inspector/sources/debugger/async-callstack-network-initiator.html

Issue 416843002: DevTools: Send async stack trace with Network.Initiator. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/sources/debugger/async-callstack-network-initiator-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/inspector/sources/debugger/async-callstack-network-initiator.html
diff --git a/LayoutTests/inspector/sources/debugger/async-callstack-in-console.html b/LayoutTests/http/tests/inspector/sources/debugger/async-callstack-network-initiator.html
similarity index 58%
copy from LayoutTests/inspector/sources/debugger/async-callstack-in-console.html
copy to LayoutTests/http/tests/inspector/sources/debugger/async-callstack-network-initiator.html
index 4849239e8f5910c25ff9d550671dcf92c0f2617b..a7d1459fddb36015c496a290cd0ca036bf403280 100644
--- a/LayoutTests/inspector/sources/debugger/async-callstack-in-console.html
+++ b/LayoutTests/http/tests/inspector/sources/debugger/async-callstack-network-initiator.html
@@ -1,8 +1,8 @@
<html>
<head>
-<script src="../../../http/tests/inspector/inspector-test.js"></script>
-<script src="../../../http/tests/inspector/debugger-test.js"></script>
-<script src="../../../http/tests/inspector/console-test.js"></script>
+<script src="/inspector/inspector-test.js"></script>
+<script src="/inspector/debugger-test.js"></script>
+<script src="/inspector/console-test.js"></script>
<script>
function testFunction()
@@ -14,36 +14,25 @@ function testFunction()
function timeout1()
{
- console.trace();
setTimeout(timeout2, 0);
}
function timeout2()
{
- setTimeout(timeout3, 0);
- throw Error("foo");
+ sendXHR();
}
-function timeout3()
+function sendXHR()
{
- console.trace();
- var iframeWidnow = document.getElementById("iframe").contentWindow;
- tryPostMessage(iframeWidnow, "http://www.example.com");
-}
-
-function tryPostMessage(win, origin)
-{
- try {
- win.postMessage("Trying origin=" + origin, origin);
- } catch(ex) {
- console.error("FAIL: Error sending message to " + origin + ". " + ex);
- }
+ var xhr = new XMLHttpRequest();
+ xhr.open("POST", "/failure/foo", true /* async */);
+ xhr.send();
}
var test = function()
{
var maxAsyncCallStackDepth = 4;
- var numberOfConsoleMessages = 5;
+ var numberOfConsoleMessages = 2;
InspectorTest.setQuiet(true);
InspectorTest.startDebuggerTest(step1);
@@ -83,10 +72,7 @@ var test = function()
<body onload="runTest()">
<p>
-Tests asynchronous call stacks printed in console.
+Tests asynchronous call stacks printed in console for a Network.Initiator.
</p>
-<div><iframe src="resources/post-message-listener.html"
- id="iframe" width="800" height="100" style="border: 1px solid black;">
-</iframe></div>
</body>
</html>
« no previous file with comments | « no previous file | LayoutTests/http/tests/inspector/sources/debugger/async-callstack-network-initiator-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698