Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: chrome/test/data/safe_browsing/malware_websocket.html

Issue 2952583002: SafeBrowsing support for WebSocket (post-network-servicification) (Closed)
Patch Set: Fix header files for move of service lookup Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <title>Test whether a WebSocket connection triggers a SafeBrowsing interstitial< /title>
2 <script>
3 // Construct the WebSocket URL from the page URL. The server should not be
4 // configured to accept a WebSocket handshake at this endpoint, or the "not
5 // blocked" test will fail. A 404 error is perfect.
6 const wsUrl = new URL('/safe_browsing/malware-ws', document.location.href);
7 wsUrl.protocol = 'ws';
8 const ws = new WebSocket(wsUrl.href);
9 // The "not blocked" test looks for this title change to verify that the request
10 // has not been blocked.
11 ws.onerror = () => { document.title = 'COMPLETED'; };
12 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698