Bug 867992 - Fix for intermittent browser_webconsole_bug_630733_response_redirect_headers.js | Timed out while waiting for: 301 and 404 responses; r=me

This commit is contained in:
Mihai Sucan 2014-01-16 14:43:57 +02:00
parent 867d82bd44
commit ce386df079
2 changed files with 9 additions and 18 deletions

View File

@ -192,7 +192,6 @@ skip-if = os == "linux" # Intermittent failures, bug 952865
[browser_webconsole_bug_623749_ctrl_a_select_all_winnt.js] [browser_webconsole_bug_623749_ctrl_a_select_all_winnt.js]
run-if = os == "win" run-if = os == "win"
[browser_webconsole_bug_630733_response_redirect_headers.js] [browser_webconsole_bug_630733_response_redirect_headers.js]
skip-if = os == "linux" # Intermittent failures, bug 867992
[browser_webconsole_bug_632275_getters_document_width.js] [browser_webconsole_bug_632275_getters_document_width.js]
[browser_webconsole_bug_632347_iterators_generators.js] [browser_webconsole_bug_632347_iterators_generators.js]
[browser_webconsole_bug_632817.js] [browser_webconsole_bug_632817.js]

View File

@ -12,12 +12,6 @@ const TEST_URI = "http://example.com/browser/browser/devtools/webconsole/test/te
let lastFinishedRequests = {}; let lastFinishedRequests = {};
let webConsoleClient; let webConsoleClient;
function requestDoneCallback(aHttpRequest )
{
let status = aHttpRequest.response.status;
lastFinishedRequests[status] = aHttpRequest;
}
function consoleOpened(hud) function consoleOpened(hud)
{ {
webConsoleClient = hud.ui.webConsoleClient; webConsoleClient = hud.ui.webConsoleClient;
@ -26,20 +20,18 @@ function consoleOpened(hud)
"The saveRequestAndResponseBodies property was successfully set."); "The saveRequestAndResponseBodies property was successfully set.");
HUDService.lastFinishedRequest.callback = requestDoneCallback; HUDService.lastFinishedRequest.callback = requestDoneCallback;
waitForSuccess(waitForResponses);
content.location = TEST_URI; content.location = TEST_URI;
}); });
}
let waitForResponses = { function requestDoneCallback(aHttpRequest)
name: "301 and 404 responses", {
validatorFn: function() let status = aHttpRequest.response.status;
{ lastFinishedRequests[status] = aHttpRequest;
return "301" in lastFinishedRequests && if ("301" in lastFinishedRequests &&
"404" in lastFinishedRequests; "404" in lastFinishedRequests) {
}, getHeaders();
successFn: getHeaders, }
failureFn: finishTest,
};
} }
function getHeaders() function getHeaders()