Skip to content

Commit

Permalink
Firefox 133
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Nov 27, 2024
1 parent b69df79 commit eb586d0
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,19 @@
import org.htmlunit.javascript.configuration.JsxGetter;
import org.htmlunit.javascript.configuration.JsxSetter;
import org.htmlunit.javascript.configuration.WorkerJavaScriptConfiguration;
import org.htmlunit.javascript.host.PermissionStatus;
import org.htmlunit.javascript.host.Permissions;
import org.htmlunit.javascript.host.PushManager;
import org.htmlunit.javascript.host.PushSubscription;
import org.htmlunit.javascript.host.PushSubscriptionOptions;
import org.htmlunit.javascript.host.Window;
import org.htmlunit.javascript.host.WindowOrWorkerGlobalScopeMixin;
import org.htmlunit.javascript.host.event.Event;
import org.htmlunit.javascript.host.event.MessageEvent;
import org.htmlunit.javascript.host.event.SecurityPolicyViolationEvent;
import org.htmlunit.javascript.host.media.MediaSource;
import org.htmlunit.javascript.host.media.SourceBuffer;
import org.htmlunit.javascript.host.media.SourceBufferList;
import org.htmlunit.util.MimeType;

/**
Expand Down Expand Up @@ -155,16 +164,19 @@ public void jsConstructor() {

// hack for the moment
if (browserVersion.isFirefox()) {
delete("MediaSource");
delete("Permissions");
delete("PermissionStatus");
delete("PushManager");
delete("PushSubscription");
delete("PushSubscriptionOptions");
delete("SecurityPolicyViolationEvent");
delete("ServiceWorkerRegistration");
delete("SourceBuffer");
delete("SourceBufferList");
delete(MediaSource.class.getSimpleName());
delete(SecurityPolicyViolationEvent.class.getSimpleName());
delete(SourceBuffer.class.getSimpleName());
delete(SourceBufferList.class.getSimpleName());
}

if (browserVersion.isFirefoxESR()) {
delete(Permissions.class.getSimpleName());
delete(PermissionStatus.class.getSimpleName());
delete(PushManager.class.getSimpleName());
delete(PushSubscription.class.getSimpleName());
delete(PushSubscriptionOptions.class.getSimpleName());
delete(ServiceWorkerRegistration.class.getSimpleName());
}

if (!webClient.getOptions().isWebSocketEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.htmlunit.junit.BrowserRunner;
import org.htmlunit.junit.BrowserRunner.Alerts;
import org.htmlunit.junit.BrowserRunner.HtmlUnitNYI;
import org.htmlunit.junit.BrowserRunner.NotYetImplemented;
import org.htmlunit.util.MimeType;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -6046,7 +6047,6 @@ public void periodicWave() throws Exception {
*/
@Test
@Alerts(DEFAULT = "function Permissions() { [native code] }",
FF = "exception",
FF_ESR = "exception")
public void permissions() throws Exception {
test("Permissions");
Expand All @@ -6066,7 +6066,6 @@ public void permissionSettings() throws Exception {
*/
@Test
@Alerts(DEFAULT = "function PermissionStatus() { [native code] }",
FF = "exception",
FF_ESR = "exception")
public void permissionStatus() throws Exception {
test("PermissionStatus");
Expand Down Expand Up @@ -6348,7 +6347,6 @@ public void pushEvent() throws Exception {
*/
@Test
@Alerts(DEFAULT = "function PushManager() { [native code] }",
FF = "exception",
FF_ESR = "exception")
public void pushManager() throws Exception {
test("PushManager");
Expand Down Expand Up @@ -6377,7 +6375,6 @@ public void pushRegistrationManager() throws Exception {
*/
@Test
@Alerts(DEFAULT = "function PushSubscription() { [native code] }",
FF = "exception",
FF_ESR = "exception")
public void pushSubscription() throws Exception {
test("PushSubscription");
Expand All @@ -6388,7 +6385,6 @@ public void pushSubscription() throws Exception {
*/
@Test
@Alerts(DEFAULT = "function PushSubscriptionOptions() { [native code] }",
FF = "exception",
FF_ESR = "exception")
public void pushSubscriptionOptions() throws Exception {
test("PushSubscriptionOptions");
Expand Down Expand Up @@ -6717,7 +6713,9 @@ public void selection() throws Exception {
* @throws Exception if the test fails
*/
@Test
@Alerts("exception")
@Alerts(DEFAULT = "exception",
FF = "function ServiceWorker() { [native code] }")
@HtmlUnitNYI(FF = "exception")
public void serviceWorker() throws Exception {
test("ServiceWorker");
}
Expand All @@ -6726,7 +6724,9 @@ public void serviceWorker() throws Exception {
* @throws Exception if the test fails
*/
@Test
@Alerts("exception")
@Alerts(DEFAULT = "exception",
FF = "function ServiceWorkerContainer() { [native code] }")
@HtmlUnitNYI(FF = "exception")
public void serviceWorkerContainer() throws Exception {
test("ServiceWorkerContainer");
}
Expand Down Expand Up @@ -6754,7 +6754,6 @@ public void serviceWorkerMessageEvent() throws Exception {
*/
@Test
@Alerts(DEFAULT = "function ServiceWorkerRegistration() { [native code] }",
FF = "exception",
FF_ESR = "exception")
public void serviceWorkerRegistration() throws Exception {
test("ServiceWorkerRegistration");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6043,7 +6043,6 @@ public void periodicWave() throws Exception {
*/
@Test
@Alerts(DEFAULT = "function",
FF = "undefined",
FF_ESR = "undefined")
public void permissions() throws Exception {
test("Permissions");
Expand All @@ -6063,7 +6062,6 @@ public void permissionSettings() throws Exception {
*/
@Test
@Alerts(DEFAULT = "function",
FF = "undefined",
FF_ESR = "undefined")
public void permissionStatus() throws Exception {
test("PermissionStatus");
Expand Down Expand Up @@ -6345,7 +6343,6 @@ public void pushEvent() throws Exception {
*/
@Test
@Alerts(DEFAULT = "function",
FF = "undefined",
FF_ESR = "undefined")
public void pushManager() throws Exception {
test("PushManager");
Expand Down Expand Up @@ -6374,7 +6371,6 @@ public void pushRegistrationManager() throws Exception {
*/
@Test
@Alerts(DEFAULT = "function",
FF = "undefined",
FF_ESR = "undefined")
public void pushSubscription() throws Exception {
test("PushSubscription");
Expand All @@ -6385,7 +6381,6 @@ public void pushSubscription() throws Exception {
*/
@Test
@Alerts(DEFAULT = "function",
FF = "undefined",
FF_ESR = "undefined")
public void pushSubscriptionOptions() throws Exception {
test("PushSubscriptionOptions");
Expand Down Expand Up @@ -6714,7 +6709,8 @@ public void selection() throws Exception {
* @throws Exception if the test fails
*/
@Test
@Alerts("undefined")
@Alerts(DEFAULT = "undefined",
FF = "function")
public void serviceWorker() throws Exception {
test("ServiceWorker");
}
Expand All @@ -6723,7 +6719,8 @@ public void serviceWorker() throws Exception {
* @throws Exception if the test fails
*/
@Test
@Alerts("undefined")
@Alerts(DEFAULT = "undefined",
FF = "function")
public void serviceWorkerContainer() throws Exception {
test("ServiceWorkerContainer");
}
Expand Down Expand Up @@ -6751,7 +6748,6 @@ public void serviceWorkerMessageEvent() throws Exception {
*/
@Test
@Alerts(DEFAULT = "function",
FF = "undefined",
FF_ESR = "undefined")
public void serviceWorkerRegistration() throws Exception {
test("ServiceWorkerRegistration");
Expand Down

0 comments on commit eb586d0

Please sign in to comment.