OLD | NEW |
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 Loading... |
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 ]); |
OLD | NEW |