File tree Expand file tree Collapse file tree 3 files changed +76
-0
lines changed
browser/extensions/webcompat
testing/webcompat/interventions/tests Expand file tree Collapse file tree 3 files changed +76
-0
lines changed Original file line number Diff line number Diff line change 57565756 }
57575757 ]
57585758 },
5759+ "1994704" : {
5760+ "label" : " avlguest.justice.nsw.gov.au" ,
5761+ "bugs" : {
5762+ "1994704" : {
5763+ "issue" : " page-fails-to-load" ,
5764+ "matches" : [" *://avlguest.justice.nsw.gov.au/*" ]
5765+ }
5766+ },
5767+ "interventions" : [
5768+ {
5769+ "platforms" : [" desktop" ],
5770+ "content_scripts" : {
5771+ "all_frames" : true ,
5772+ "js" : [" 1994704-avlguest.justice.nsw.gov.au-shim-mozRTC-APIs.js" ]
5773+ }
5774+ }
5775+ ]
5776+ },
57595777 "1995452" : {
57605778 "label" : " polymarket.com" ,
57615779 "bugs" : {
Original file line number Diff line number Diff line change 1+ /* This Source Code Form is subject to the terms of the Mozilla Public
2+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+ "use strict" ;
6+
7+ /**
8+ * Bug 1994704 - avlguest.justice.nsw.gov.au test page does not load
9+ *
10+ * The page relies on non-standard mozRTCPeerConnection, which is no longer
11+ * needed. We can just set it to RTCPeerConnection.
12+ */
13+
14+ /* globals exportFunction */
15+
16+ console . info (
17+ "moz-prefixed JS APIs are being shimmed for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1994704 for details."
18+ ) ;
19+
20+ window . wrappedJSObject . mozRTCPeerConnection =
21+ window . wrappedJSObject . RTCPeerConnection ;
22+
23+ window . wrappedJSObject . mozRTCSessionDescription =
24+ window . wrappedJSObject . RTCSessionDescription ;
25+
26+ window . wrappedJSObject . mozRTCIceCandidate =
27+ window . wrappedJSObject . RTCIceCandidate ;
Original file line number Diff line number Diff line change 1+ import pytest
2+
3+ URL = "https://avlguest.justice.nsw.gov.au/call/test.link"
4+ IFRAME_CSS = "#widget-frame"
5+ ERROR_MSG = "ReferenceError: mozRTCPeerConnection is not defined"
6+ SUCCESS_CSS = "a.install.btn-success"
7+ INSTALL_APP_CSS = "#installApp"
8+
9+
10+ @pytest .mark .skip_platforms ("android" )
11+ @pytest .mark .asyncio
12+ @pytest .mark .with_interventions
13+ async def test_enabled (client ):
14+ await client .navigate (URL , wait = "none" )
15+ client .switch_to_frame (client .await_css (IFRAME_CSS ))
16+ assert client .await_css (SUCCESS_CSS , is_displayed = True )
17+
18+
19+ @pytest .mark .skip_platforms ("android" )
20+ @pytest .mark .asyncio
21+ @pytest .mark .without_interventions
22+ async def test_disabled (client ):
23+ await client .navigate (URL , await_console_message = ERROR_MSG )
24+
25+
26+ @pytest .mark .only_platforms ("android" )
27+ @pytest .mark .asyncio
28+ @pytest .mark .with_interventions
29+ async def test_app_installation_requested_on_android (client ):
30+ await client .navigate (URL , wait = "none" )
31+ assert client .await_css (INSTALL_APP_CSS , is_displayed = True )
You can’t perform that action at this time.
0 commit comments