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

Unified Diff: LayoutTests/inspector/sources/debugger/event-listener-breakpoints-xhr.html

Issue 1153923005: DevTools: shard inspector/debugger tests for faster execution. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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
Index: LayoutTests/inspector/sources/debugger/event-listener-breakpoints-xhr.html
diff --git a/LayoutTests/inspector/sources/debugger/event-listener-breakpoints-xhr.html b/LayoutTests/inspector/sources/debugger/event-listener-breakpoints-xhr.html
deleted file mode 100644
index 534697cbdea59e057545b01cbba880bb64b729b8..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/sources/debugger/event-listener-breakpoints-xhr.html
+++ /dev/null
@@ -1,107 +0,0 @@
-<html>
-<head>
-<script src="../../../http/tests/inspector/inspector-test.js"></script>
-<script src="../../../http/tests/inspector/debugger-test.js"></script>
-<script>
-
-function testFunction()
-{
- sendXHR();
-}
-
-function sendXHR()
-{
- var xhr = new XMLHttpRequest();
- xhr.onreadystatechange = function()
- {
- xhr.onreadystatechange = null;
- };
- function downloadEnd()
- {
- xhr.removeEventListener("loadend", downloadEnd, false);
- }
- function uploadEnd()
- {
- xhr.upload.removeEventListener("loadend", uploadEnd, false);
- }
- function downloadProgress()
- {
- xhr.removeEventListener("progress", downloadProgress, false);
- }
- function uploadProgress()
- {
- xhr.upload.removeEventListener("progress", uploadProgress, false);
- }
- function loadCallback()
- {
- xhr.onload = null;
- xhr.onerror = null;
- }
- xhr.onload = loadCallback;
- xhr.onerror = loadCallback;
- xhr.addEventListener("loadend", downloadEnd, false);
- xhr.addEventListener("progress", downloadProgress, false);
- xhr.upload.addEventListener("loadend", uploadEnd, false);
- xhr.upload.addEventListener("progress", uploadProgress, false);
- xhr.open("POST", "http://localhost/?now=" + Date.now(), true);
- xhr.send(String(sendXHR));
-}
-
-function test()
-{
- var pane = WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints;
- var xhrTargetNames = ["XMLHttpRequest", "XMLHttpRequestUpload"];
-
- InspectorTest.setQuiet(true);
- InspectorTest.startDebuggerTest(step1);
-
- function step1()
- {
- pane._setBreakpoint("listener:load");
- pane._setBreakpoint("listener:error");
- pane._setBreakpoint("listener:loadend", xhrTargetNames);
- pane._setBreakpoint("listener:progress", xhrTargetNames);
- pane._setBreakpoint("listener:readystatechange", xhrTargetNames);
- InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
- }
-
- var totalBreaks = 6;
- var callStacksOutput = [];
- function didPause(callFrames, reason, breakpointIds, asyncStackTrace, auxData)
- {
- --totalBreaks;
- auxData = auxData || {};
- var result = InspectorTest.captureStackTraceIntoString(callFrames) + "\n";
- result += "Event target: " + auxData["targetName"] + "\n";
-
- callStacksOutput.push(result);
- if (totalBreaks) {
- InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(InspectorTest, didPause));
- } else {
- InspectorTest.addResult("Captured call stacks in no particular order:");
- callStacksOutput.sort();
- InspectorTest.addResults(callStacksOutput);
- completeTest();
- }
- }
-
- function completeTest()
- {
- pane._removeBreakpoint("listener:load");
- pane._removeBreakpoint("listener:error");
- pane._removeBreakpoint("listener:loadend", xhrTargetNames);
- pane._removeBreakpoint("listener:progress", xhrTargetNames);
- pane._removeBreakpoint("listener:readystatechange", xhrTargetNames);
- InspectorTest.runAfterPendingDispatches(InspectorTest.completeDebuggerTest.bind(InspectorTest));
- }
-}
-
-</script>
-</head>
-
-<body onload="runTest()">
-<p>
-Tests event listener breakpoints on XHRs.
-</p>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698