зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1765731 - [wdspec] Remove outdated test_origin_header_allowed_when_bidi_disabled test. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D144257
This commit is contained in:
Родитель
0d042306e7
Коммит
50b1762488
|
@ -2,8 +2,6 @@ import json
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from http.client import HTTPConnection
|
|
||||||
|
|
||||||
from tests.support.http_request import HTTPRequest
|
from tests.support.http_request import HTTPRequest
|
||||||
from . import using_context
|
from . import using_context
|
||||||
|
|
||||||
|
@ -72,37 +70,3 @@ def test_debugger_address_true_fission_override(session):
|
||||||
session.execute_script("""return Services.appinfo.fissionAutostart""")
|
session.execute_script("""return Services.appinfo.fissionAutostart""")
|
||||||
is True
|
is True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("origin", [None, "", "sometext", "http://localhost:1234"])
|
|
||||||
@pytest.mark.capabilities(
|
|
||||||
{
|
|
||||||
"moz:debuggerAddress": True,
|
|
||||||
"moz:firefoxOptions": {
|
|
||||||
"prefs": {
|
|
||||||
"remote.active-protocols": 2,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
)
|
|
||||||
def test_origin_header_allowed_when_bidi_disabled(session, origin):
|
|
||||||
debugger_address = session.capabilities.get("moz:debuggerAddress")
|
|
||||||
assert debugger_address is not None
|
|
||||||
|
|
||||||
url = f"http://{debugger_address}/json/version"
|
|
||||||
|
|
||||||
conn = HTTPConnection(debugger_address)
|
|
||||||
conn.putrequest("GET", url)
|
|
||||||
|
|
||||||
if origin is not None:
|
|
||||||
conn.putheader("Origin", origin)
|
|
||||||
|
|
||||||
conn.putheader("Connection", "upgrade")
|
|
||||||
conn.putheader("Upgrade", "websocket")
|
|
||||||
conn.putheader("Sec-WebSocket-Key", "dGhlIHNhbXBsZSBub25jZQ==")
|
|
||||||
conn.putheader("Sec-WebSocket-Version", "13")
|
|
||||||
conn.endheaders()
|
|
||||||
|
|
||||||
response = conn.getresponse()
|
|
||||||
|
|
||||||
assert response.status == 200
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче