Disable WebSocket in WatchOS
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Jun 2018 02:42:00 +0000 (02:42 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Jun 2018 02:42:00 +0000 (02:42 +0000)
commit3e5a5743edbff66fe9f85b4406a1dde6beae2f0c
treeef8a1a2a433e10cfd86cd6e46f9bcd0955f44cda
parentc55a4c321e2ae5700bed47b6838a41bed16894ab
Disable WebSocket in WatchOS
https://bugs.webkit.org/show_bug.cgi?id=186931
<rdar://problem/39584458>

Reviewed by Wenson Hsieh.

Source/WebCore:

Add a runtime flag to enable/disable WebSocket.
By default, flag is on for all platforms except for WatchOS.

Test: fast/dom/Window/watchos/websocket/watchos/no-websocket-in-watchos.html

* Modules/websockets/WebSocket.idl:
* page/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebSocketEnabled):
(WebCore::RuntimeEnabledFeatures::webSocketEnabled const):

LayoutTests:

* TestExpectations:
* fast/dom/Window/watchos/no-websocket-in-watchos-expected.txt: Added.
* fast/dom/Window/watchos/no-websocket-in-watchos.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/watchos/no-websocket-in-watchos-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Window/watchos/no-websocket-in-watchos.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/websockets/WebSocket.idl
Source/WebCore/page/RuntimeEnabledFeatures.cpp
Source/WebCore/page/RuntimeEnabledFeatures.h