Skip to content

Commit 0e28cb1

Browse files
committed
update tests
1 parent eb22fdb commit 0e28cb1

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

playwright/src/test/java/com/microsoft/playwright/TestScreencast.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,8 @@ void saveAsShouldThrowWhenNoVideoFrames(@TempDir Path videosDir) {
7979
if (!popup.isClosed()) {
8080
popup.waitForClose(() -> {});
8181
}
82-
// WebKit pauses renderer before win.close() and actually writes something.
83-
if (isWebKit()) {
84-
popup.video().saveAs(saveAsPath);
85-
assertTrue(Files.exists(saveAsPath));
86-
} else {
87-
PlaywrightException e = assertThrows(PlaywrightException.class, () -> popup.video().saveAs(saveAsPath));
88-
assertTrue(e.getMessage().contains("Page did not produce any video frames"), e.getMessage());
89-
}
82+
PlaywrightException e = assertThrows(PlaywrightException.class, () -> popup.video().saveAs(saveAsPath));
83+
assertTrue(e.getMessage().contains("Page did not produce any video frames"), e.getMessage());
9084
}
9185
}
9286

playwright/src/test/java/com/microsoft/playwright/TestWorkers.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ void shouldFormatNumberUsingContextLocale() {
193193
page.navigate(server.EMPTY_PAGE);
194194
Worker worker = page.waitForWorker(() -> page.evaluate(
195195
"() => new Worker(URL.createObjectURL(new Blob(['console.log(1)'], {type: 'application/javascript'})))"));
196-
assertEquals("10\u00A0000,2", worker.evaluate("() => (10000.20).toLocaleString()"));
196+
// https://github.com/microsoft/playwright/issues/38919
197+
String expected = isFirefox() ? "10.000,2" : "10\u00A0000,2";
198+
assertEquals(expected, worker.evaluate("() => (10000.20).toLocaleString()"));
197199
context.close();
198200
}
199201

0 commit comments

Comments
 (0)