зеркало из https://github.com/mozilla/gecko-dev.git
Bug 879246 - Fix intermittent failure in test_sourcemaps-02.js. r=past
This commit is contained in:
Родитель
60d9a4f6fd
Коммит
e7414531e2
|
@ -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/"
|
||||
|
|
Загрузка…
Ссылка в новой задаче