Bug 879246 - Fix intermittent failure in test_sourcemaps-02.js. r=past

This commit is contained in:
Nick Fitzgerald 2013-06-05 12:13:31 -04:00
Родитель 60d9a4f6fd
Коммит e7414531e2
1 изменённых файлов: 5 добавлений и 9 удалений

Просмотреть файл

@ -35,23 +35,18 @@ function test_simple_source_map()
let numNewSources = 0;
gClient.addListener("newSource", function _onNewSource(aEvent, aPacket) {
if (++numNewSources !== 3) {
return;
}
gClient.removeListener("newSource", _onNewSource);
gClient.addOneTimeListener("paused", function (aEvent, aPacket) {
gThreadClient.getSources(function (aResponse) {
do_check_true(!aResponse.error, "Should not get an error");
for (let s of aResponse.sources) {
do_check_true(expectedSources.has(s.url),
"The source's url should be one of our original sources");
do_check_neq(s.url, "http://example.com/www/js/abc.js",
"Shouldn't get the generated source's url.")
expectedSources.delete(s.url);
}
do_check_eq(expectedSources.size, 0,
"Shouldn't be expecting any more sources");
"Should have found all the expected sources sources by now.");
finishClient(gClient);
});
@ -61,6 +56,7 @@ function test_simple_source_map()
new SourceNode(1, 0, "a.js", "function a() { return 'a'; }\n"),
new SourceNode(1, 0, "b.js", "function b() { return 'b'; }\n"),
new SourceNode(1, 0, "c.js", "function c() { return 'c'; }\n"),
"debugger;\n"
])).toStringWithSourceMap({
file: "abc.js",
sourceRoot: "http://example.com/www/js/"