3 <script src=
"inspector-test.js"></script>
4 <script src=
"console-test.js"></script>
5 <script src=
"network-test.js"></script>
7 function requestHelper(method
, url
)
9 // Make synchronous requests for simplicity.
10 console
.log("sending a %s request to %s", method
, url
);
11 makeSimpleXHR(method
, url
, false);
14 function makeRequests()
16 // 1. Page that exists.
17 requestHelper("GET", "resources/xhr-exists.html");
18 // 2. Page that doesn't exist.
19 requestHelper("GET", "resources/xhr-does-not-exist.html");
21 requestHelper("POST", "resources/post-target.cgi");
22 // 4. Cross-origin request
23 requestHelper("GET", "http://localhost:8000/inspector/resources/xhr-exists.html");
34 InspectorTest
.evaluateInPage("makeRequests()", step2
);
36 InspectorTest
.NetworkAgent
.setMonitoringXHREnabled(true, callback
);
43 InspectorTest
.evaluateInPage("makeRequests()", step3
);
45 InspectorTest
.NetworkAgent
.setMonitoringXHREnabled(false, callback
);
52 InspectorTest
.dumpConsoleMessages();
53 InspectorTest
.completeTest();
55 InspectorTest
.runAfterPendingDispatches(finish
);
58 //# sourceURL=console-xhr-logging.html
62 <body onload=
"runTest()">
64 Tests that XMLHttpRequest Logging works when Enabled and doesn't show logs when Disabled.