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

Side by Side Diff: chrome/test/data/extensions/api_test/webrequest/test_types.js

Issue 2449913002: Support WebSocket in WebRequest API. (Closed)
Patch Set: Add tests for onAuthRequired path for WS handshake. Created 3 years, 10 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 function getStyleURL() { 5 function getStyleURL() {
6 // This is not a style sheet, but it must still be classified as "stylesheet" 6 // This is not a style sheet, but it must still be classified as "stylesheet"
7 // because it is loaded as a style sheet. 7 // because it is loaded as a style sheet.
8 return getServerURL('empty.html?as-style'); 8 return getServerURL('empty.html?as-style');
9 } 9 }
10 10
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 603
604 var frame = document.createElement('iframe'); 604 var frame = document.createElement('iframe');
605 document.body.appendChild(frame); 605 document.body.appendChild(frame);
606 frame.contentWindow.onunload = function() { 606 frame.contentWindow.onunload = function() {
607 console.log('Going to send beacon...'); 607 console.log('Going to send beacon...');
608 var sentBeacon = frame.contentWindow.navigator.sendBeacon(getSlowURL()); 608 var sentBeacon = frame.contentWindow.navigator.sendBeacon(getSlowURL());
609 chrome.test.assertTrue(sentBeacon); 609 chrome.test.assertTrue(sentBeacon);
610 }; 610 };
611 frame.remove(); 611 frame.remove();
612 }, 612 },
613
614 // Note: The 'websocket' type is tested separately in 'test_websocket.js'.
613 ]); 615 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698