Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
pavelsavara authored Apr 8, 2024
commit 2a9b34f2ba13bcaa1ea0d7f13deb6d718db0b3a0
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public async Task DownloadProgressFinishes(bool failAssemblyDownload)

var result = await RunSdkStyleAppForPublish(new(
Configuration: "Debug",
TestScenario: "ModuleConfigTests",
TestScenario: "DownloadResourceProgressTest",
BrowserQueryString: new Dictionary<string, string> { ["failAssemblyDownload"] = failAssemblyDownload.ToString().ToLowerInvariant() }
));
Assert.True(
Expand Down Expand Up @@ -63,7 +63,7 @@ public async Task OutErrOverrideWorks()

var result = await RunSdkStyleAppForPublish(new(
Configuration: "Debug",
TestScenario: "ModuleConfigTests"
TestScenario: "OutErrOverrideWorks"
));
Assert.True(
result.TestOutput.Any(m => m.Contains("Emscripten out override works.")),
Expand Down
23 changes: 15 additions & 8 deletions src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ switch (testCase) {
case "AppSettingsTest":
dotnet.withApplicationEnvironment(params.get("applicationEnvironment"));
break;
case "ModuleConfigTests":
case "DownloadResourceProgressTest":
if (params.get("failAssemblyDownload") === "true") {
let assemblyCounter = 0;
let failAtAssemblyNumbers = [
Expand Down Expand Up @@ -63,14 +63,18 @@ switch (testCase) {
if (loaded === total && loaded !== 0) {
testOutput("DownloadResourceProgress: Finished");
}
},
out: () => {
}
});
break;
case "OutErrOverrideWorks":
dotnet.withModuleConfig({
out: (message) => {
console.log("Emscripten out override works!");
console.log(console)
console.log(message)
},
err: () => {
console.log("Emscripten err override works!");
console.error(console)
err: (message) => {
console.error("Emscripten err override works!");
console.error(message)
},
});
break;
Expand Down Expand Up @@ -102,9 +106,12 @@ try {
exports.AppSettingsTest.Run();
exit(0);
break;
case "ModuleConfigTests":
case "DownloadResourceProgressTest":
exit(0);
break;
case "OutErrOverrideWorks":
dotnet.run();
break;
case "DebugLevelTest":
testOutput("WasmDebugLevel: " + config.debugLevel);
exit(0);
Expand Down