diff options
Diffstat (limited to 'testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-getter.html')
-rw-r--r-- | testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-getter.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-getter.html b/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-getter.html new file mode 100644 index 000000000..a6bd53015 --- /dev/null +++ b/testing/web-platform/tests/websockets/interfaces/WebSocket/bufferedAmount/bufferedAmount-defineProperty-getter.html @@ -0,0 +1,18 @@ +<!doctype html> +<meta charset=utf-8> +<title>WebSockets: defineProperty getter for bufferedAmount</title> +<script src=/resources/testharness.js></script> +<script src=/resources/testharnessreport.js></script> +<script src=../../../../constants.js?pipe=sub></script> +<meta name="variant" content=""> +<meta name="variant" content="?wss"> +<div id=log></div> +<script> +test(function(){ + Object.defineProperty(WebSocket.prototype, 'bufferedAmount', { + get: function() { return 'foo'; } + }); + var ws = new WebSocket('ws://example.invalid/'); + assert_equals(ws.bufferedAmount, 'foo'); +}); +</script> |