Skip to content

Commit eb586d0

Browse files
committed
Firefox 133
1 parent b69df79 commit eb586d0

File tree

3 files changed

+33
-26
lines changed

3 files changed

+33
-26
lines changed

src/main/java/org/htmlunit/javascript/host/worker/DedicatedWorkerGlobalScope.java

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,19 @@
4949
import org.htmlunit.javascript.configuration.JsxGetter;
5050
import org.htmlunit.javascript.configuration.JsxSetter;
5151
import org.htmlunit.javascript.configuration.WorkerJavaScriptConfiguration;
52+
import org.htmlunit.javascript.host.PermissionStatus;
53+
import org.htmlunit.javascript.host.Permissions;
54+
import org.htmlunit.javascript.host.PushManager;
55+
import org.htmlunit.javascript.host.PushSubscription;
56+
import org.htmlunit.javascript.host.PushSubscriptionOptions;
5257
import org.htmlunit.javascript.host.Window;
5358
import org.htmlunit.javascript.host.WindowOrWorkerGlobalScopeMixin;
5459
import org.htmlunit.javascript.host.event.Event;
5560
import org.htmlunit.javascript.host.event.MessageEvent;
61+
import org.htmlunit.javascript.host.event.SecurityPolicyViolationEvent;
62+
import org.htmlunit.javascript.host.media.MediaSource;
63+
import org.htmlunit.javascript.host.media.SourceBuffer;
64+
import org.htmlunit.javascript.host.media.SourceBufferList;
5665
import org.htmlunit.util.MimeType;
5766

5867
/**
@@ -155,16 +164,19 @@ public void jsConstructor() {
155164

156165
// hack for the moment
157166
if (browserVersion.isFirefox()) {
158-
delete("MediaSource");
159-
delete("Permissions");
160-
delete("PermissionStatus");
161-
delete("PushManager");
162-
delete("PushSubscription");
163-
delete("PushSubscriptionOptions");
164-
delete("SecurityPolicyViolationEvent");
165-
delete("ServiceWorkerRegistration");
166-
delete("SourceBuffer");
167-
delete("SourceBufferList");
167+
delete(MediaSource.class.getSimpleName());
168+
delete(SecurityPolicyViolationEvent.class.getSimpleName());
169+
delete(SourceBuffer.class.getSimpleName());
170+
delete(SourceBufferList.class.getSimpleName());
171+
}
172+
173+
if (browserVersion.isFirefoxESR()) {
174+
delete(Permissions.class.getSimpleName());
175+
delete(PermissionStatus.class.getSimpleName());
176+
delete(PushManager.class.getSimpleName());
177+
delete(PushSubscription.class.getSimpleName());
178+
delete(PushSubscriptionOptions.class.getSimpleName());
179+
delete(ServiceWorkerRegistration.class.getSimpleName());
168180
}
169181

170182
if (!webClient.getOptions().isWebSocketEnabled()) {

src/test/java/org/htmlunit/general/DedicatedWorkerGlobalScopeClassNameTest.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.htmlunit.junit.BrowserRunner;
2424
import org.htmlunit.junit.BrowserRunner.Alerts;
2525
import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI;
26+
import org.htmlunit.junit.BrowserRunner.NotYetImplemented;
2627
import org.htmlunit.util.MimeType;
2728
import org.junit.Test;
2829
import org.junit.runner.RunWith;
@@ -6046,7 +6047,6 @@ public void periodicWave() throws Exception {
60466047
*/
60476048
@Test
60486049
@Alerts(DEFAULT = "function Permissions() { [native code] }",
6049-
FF = "exception",
60506050
FF_ESR = "exception")
60516051
public void permissions() throws Exception {
60526052
test("Permissions");
@@ -6066,7 +6066,6 @@ public void permissionSettings() throws Exception {
60666066
*/
60676067
@Test
60686068
@Alerts(DEFAULT = "function PermissionStatus() { [native code] }",
6069-
FF = "exception",
60706069
FF_ESR = "exception")
60716070
public void permissionStatus() throws Exception {
60726071
test("PermissionStatus");
@@ -6348,7 +6347,6 @@ public void pushEvent() throws Exception {
63486347
*/
63496348
@Test
63506349
@Alerts(DEFAULT = "function PushManager() { [native code] }",
6351-
FF = "exception",
63526350
FF_ESR = "exception")
63536351
public void pushManager() throws Exception {
63546352
test("PushManager");
@@ -6377,7 +6375,6 @@ public void pushRegistrationManager() throws Exception {
63776375
*/
63786376
@Test
63796377
@Alerts(DEFAULT = "function PushSubscription() { [native code] }",
6380-
FF = "exception",
63816378
FF_ESR = "exception")
63826379
public void pushSubscription() throws Exception {
63836380
test("PushSubscription");
@@ -6388,7 +6385,6 @@ public void pushSubscription() throws Exception {
63886385
*/
63896386
@Test
63906387
@Alerts(DEFAULT = "function PushSubscriptionOptions() { [native code] }",
6391-
FF = "exception",
63926388
FF_ESR = "exception")
63936389
public void pushSubscriptionOptions() throws Exception {
63946390
test("PushSubscriptionOptions");
@@ -6717,7 +6713,9 @@ public void selection() throws Exception {
67176713
* @throws Exception if the test fails
67186714
*/
67196715
@Test
6720-
@Alerts("exception")
6716+
@Alerts(DEFAULT = "exception",
6717+
FF = "function ServiceWorker() { [native code] }")
6718+
@HtmlUnitNYI(FF = "exception")
67216719
public void serviceWorker() throws Exception {
67226720
test("ServiceWorker");
67236721
}
@@ -6726,7 +6724,9 @@ public void serviceWorker() throws Exception {
67266724
* @throws Exception if the test fails
67276725
*/
67286726
@Test
6729-
@Alerts("exception")
6727+
@Alerts(DEFAULT = "exception",
6728+
FF = "function ServiceWorkerContainer() { [native code] }")
6729+
@HtmlUnitNYI(FF = "exception")
67306730
public void serviceWorkerContainer() throws Exception {
67316731
test("ServiceWorkerContainer");
67326732
}
@@ -6754,7 +6754,6 @@ public void serviceWorkerMessageEvent() throws Exception {
67546754
*/
67556755
@Test
67566756
@Alerts(DEFAULT = "function ServiceWorkerRegistration() { [native code] }",
6757-
FF = "exception",
67586757
FF_ESR = "exception")
67596758
public void serviceWorkerRegistration() throws Exception {
67606759
test("ServiceWorkerRegistration");

src/test/java/org/htmlunit/general/DedicatedWorkerGlobalScopeTypeOfTest.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6043,7 +6043,6 @@ public void periodicWave() throws Exception {
60436043
*/
60446044
@Test
60456045
@Alerts(DEFAULT = "function",
6046-
FF = "undefined",
60476046
FF_ESR = "undefined")
60486047
public void permissions() throws Exception {
60496048
test("Permissions");
@@ -6063,7 +6062,6 @@ public void permissionSettings() throws Exception {
60636062
*/
60646063
@Test
60656064
@Alerts(DEFAULT = "function",
6066-
FF = "undefined",
60676065
FF_ESR = "undefined")
60686066
public void permissionStatus() throws Exception {
60696067
test("PermissionStatus");
@@ -6345,7 +6343,6 @@ public void pushEvent() throws Exception {
63456343
*/
63466344
@Test
63476345
@Alerts(DEFAULT = "function",
6348-
FF = "undefined",
63496346
FF_ESR = "undefined")
63506347
public void pushManager() throws Exception {
63516348
test("PushManager");
@@ -6374,7 +6371,6 @@ public void pushRegistrationManager() throws Exception {
63746371
*/
63756372
@Test
63766373
@Alerts(DEFAULT = "function",
6377-
FF = "undefined",
63786374
FF_ESR = "undefined")
63796375
public void pushSubscription() throws Exception {
63806376
test("PushSubscription");
@@ -6385,7 +6381,6 @@ public void pushSubscription() throws Exception {
63856381
*/
63866382
@Test
63876383
@Alerts(DEFAULT = "function",
6388-
FF = "undefined",
63896384
FF_ESR = "undefined")
63906385
public void pushSubscriptionOptions() throws Exception {
63916386
test("PushSubscriptionOptions");
@@ -6714,7 +6709,8 @@ public void selection() throws Exception {
67146709
* @throws Exception if the test fails
67156710
*/
67166711
@Test
6717-
@Alerts("undefined")
6712+
@Alerts(DEFAULT = "undefined",
6713+
FF = "function")
67186714
public void serviceWorker() throws Exception {
67196715
test("ServiceWorker");
67206716
}
@@ -6723,7 +6719,8 @@ public void serviceWorker() throws Exception {
67236719
* @throws Exception if the test fails
67246720
*/
67256721
@Test
6726-
@Alerts("undefined")
6722+
@Alerts(DEFAULT = "undefined",
6723+
FF = "function")
67276724
public void serviceWorkerContainer() throws Exception {
67286725
test("ServiceWorkerContainer");
67296726
}
@@ -6751,7 +6748,6 @@ public void serviceWorkerMessageEvent() throws Exception {
67516748
*/
67526749
@Test
67536750
@Alerts(DEFAULT = "function",
6754-
FF = "undefined",
67556751
FF_ESR = "undefined")
67566752
public void serviceWorkerRegistration() throws Exception {
67576753
test("ServiceWorkerRegistration");

0 commit comments

Comments
 (0)