mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 879246 - Fix intermittent failure in test_sourcemaps-02.js. r=past
This commit is contained in:
parent
9c48ac1688
commit
bb6f1f512c
@ -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/"
|
||||
|
Loading…
Reference in New Issue
Block a user