GeezerVison is showing github.com — test: remove unused common utilities · nodejs/node@f48992f
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: test/common/README.md -31Lines changed: 0 additions & 31 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -853,24 +853,6 @@ socket.write(frame.data); | 853 | 853 |
| 854 | 854 | The serialized `Buffer` may be retrieved using the `frame.data` property. | 855 | 855 |
| 856 | | -### Class: DataFrame extends Frame | 857 | | - | 858 | | -The `http2.DataFrame` is a subclass of `http2.Frame` that serializes a `DATA` | 859 | | -frame. | 860 | | - | 861 | | -<!-- eslint-disable no-undef, node-core/require-common-first, node-core/required-modules --> | 862 | | - | 863 | | -```js | 864 | | -// id is the 32-bit stream identifier | 865 | | -// payload is a Buffer containing the DATA payload | 866 | | -// padlen is an 8-bit integer giving the number of padding bytes to include | 867 | | -// final is a boolean indicating whether the End-of-stream flag should be set, | 868 | | -// defaults to false. | 869 | | -const frame = new http2.DataFrame(id, payload, padlen, final); | 870 | | - | 871 | | -socket.write(frame.data); | 872 | | -``` | 873 | | - | 874 | 856 | ### Class: HeadersFrame | 875 | 857 |
| 876 | 858 | The `http2.HeadersFrame` is a subclass of `http2.Frame` that serializes a | @@ -1138,19 +1120,6 @@ are likely sufficient to hold a single file of `size` bytes. This is useful for | 1138 | 1120 | skipping tests that require hundreds of megabytes or even gigabytes of temporary | 1139 | 1121 | files, but it is inaccurate and susceptible to race conditions. | 1140 | 1122 |
| 1141 | | -## UDP pair helper | 1142 | | - | 1143 | | -The `common/udppair` module exports a function `makeUDPPair` and a class | 1144 | | -`FakeUDPWrap`. | 1145 | | - | 1146 | | -`FakeUDPWrap` emits `'send'` events when data is to be sent on it, and provides | 1147 | | -an `emitReceived()` API for actin as if data has been received on it. | 1148 | | - | 1149 | | -`makeUDPPair` returns an object `{ clientSide, serverSide }` where each side | 1150 | | -is an `FakeUDPWrap` connected to the other side. | 1151 | | - | 1152 | | -There is no difference between client or server side beyond their names. | 1153 | | - | 1154 | 1123 | ## WPT module | 1155 | 1124 |
| 1156 | 1125 | ### `harness` | |
Collapse file Copy file name to clipboardExpand all lines: test/common/crypto.js -18Lines changed: 0 additions & 18 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -33,23 +33,6 @@ const modp2buf = Buffer.from([ | 33 | 33 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | 34 | 34 | ]); | 35 | 35 |
| 36 | | -function testDH({ publicKey: alicePublicKey, privateKey: alicePrivateKey }, | 37 | | - { publicKey: bobPublicKey, privateKey: bobPrivateKey }, | 38 | | - expectedValue) { | 39 | | - const buf1 = crypto.diffieHellman({ | 40 | | - privateKey: alicePrivateKey, | 41 | | - publicKey: bobPublicKey, | 42 | | - }); | 43 | | - const buf2 = crypto.diffieHellman({ | 44 | | - privateKey: bobPrivateKey, | 45 | | - publicKey: alicePublicKey, | 46 | | - }); | 47 | | - assert.deepStrictEqual(buf1, buf2); | 48 | | - | 49 | | - if (expectedValue !== undefined) | 50 | | - assert.deepStrictEqual(buf1, expectedValue); | 51 | | -} | 52 | | - | 53 | 36 | // Asserts that the size of the given key (in chars or bytes) is within 10% of | 54 | 37 | // the expected size. | 55 | 38 | function assertApproximateSize(key, expectedSize) { | @@ -117,7 +100,6 @@ const sec1EncExp = (cipher) => getRegExpForPEM('EC PRIVATE KEY', cipher); | 117 | 100 |
| 118 | 101 | module.exports = { | 119 | 102 | modp2buf, | 120 | | - testDH, | 121 | 103 | assertApproximateSize, | 122 | 104 | testEncryptDecrypt, | 123 | 105 | testSignVerify, | |
Collapse file Copy file name to clipboardExpand all lines: test/common/http2.js -19Lines changed: 0 additions & 19 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -81,24 +81,6 @@ class SettingsFrame extends Frame { | 81 | 81 | } | 82 | 82 | } | 83 | 83 |
| 84 | | -class DataFrame extends Frame { | 85 | | - constructor(id, payload, padlen = 0, final = false) { | 86 | | - let len = payload.length; | 87 | | - let flags = 0; | 88 | | - if (final) flags |= FLAG_EOS; | 89 | | - const buffers = [payload]; | 90 | | - if (padlen > 0) { | 91 | | - buffers.unshift(Buffer.from([padlen])); | 92 | | - buffers.push(PADDING.slice(0, padlen)); | 93 | | - len += padlen + 1; | 94 | | - flags |= FLAG_PADDED; | 95 | | - } | 96 | | - super(len, 0, flags, id); | 97 | | - buffers.unshift(this[kFrameData]); | 98 | | - this[kFrameData] = Buffer.concat(buffers); | 99 | | - } | 100 | | -} | 101 | | - | 102 | 84 | class HeadersFrame extends Frame { | 103 | 85 | constructor(id, payload, padlen = 0, final = false) { | 104 | 86 | let len = payload.length; | @@ -138,7 +120,6 @@ class AltSvcFrame extends Frame { | 138 | 120 | module.exports = { | 139 | 121 | Frame, | 140 | 122 | AltSvcFrame, | 141 | | - DataFrame, | 142 | 123 | HeadersFrame, | 143 | 124 | SettingsFrame, | 144 | 125 | PingFrame, | |
Collapse file Copy file name to clipboardExpand all lines: test/common/tick.js -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | 'use strict'; | 2 | | -require('../common'); | 3 | 2 |
| 4 | 3 | module.exports = function tick(x, cb) { | 5 | 4 | function ontick() { | |
Collapse file Copy file name to clipboardExpand all lines: test/common/udppair.js -101Lines changed: 0 additions & 101 deletions
|