| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -118,7 +118,8 @@ class StatusRuleSet { | |||
| 118 | 118 | if (key.includes('*')) { | |
| 119 | 119 | this.patternMatch.push(new StatusRule(key, rules[key], key)); | |
| 120 | 120 | } else { | |
| 121 | - this.exactMatch[key] = new StatusRule(key, rules[key]); | ||
| 121 | + const normalizedPath = path.normalize(key); | ||
| 122 | + this.exactMatch[normalizedPath] = new StatusRule(key, rules[key]); | ||
| 122 | 123 | } | |
| 123 | 124 | } | |
| 124 | 125 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,17 +10,17 @@ See [test/wpt](../../wpt/README.md) for information on how these tests are run. | |||
| 10 | 10 | ||
| 11 | 11 | Last update: | |
| 12 | 12 | ||
| 13 | + - common: https://github.com/web-platform-tests/wpt/tree/3586ff740b/common | ||
| 13 | 14 | - console: https://github.com/web-platform-tests/wpt/tree/3b1f72e99a/console | |
| 14 | - - encoding: https://github.com/web-platform-tests/wpt/tree/3c9820d1cc/encoding | ||
| 15 | - - url: https://github.com/web-platform-tests/wpt/tree/1783c9bccf/url | ||
| 16 | - - resources: https://github.com/web-platform-tests/wpt/tree/351a99782b/resources | ||
| 17 | - - interfaces: https://github.com/web-platform-tests/wpt/tree/b4be9a3fdf/interfaces | ||
| 18 | - - html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/2c5c3c4c27/html/webappapis/microtask-queuing | ||
| 19 | - - html/webappapis/timers: https://github.com/web-platform-tests/wpt/tree/264f12bc7b/html/webappapis/timers | ||
| 20 | - - hr-time: https://github.com/web-platform-tests/wpt/tree/a5d1774ecf/hr-time | ||
| 21 | - - common: https://github.com/web-platform-tests/wpt/tree/841a51412f/common | ||
| 22 | - - dom/abort: https://github.com/web-platform-tests/wpt/tree/7caa3de747/dom/abort | ||
| 15 | + - dom/abort: https://github.com/web-platform-tests/wpt/tree/625e1310ce/dom/abort | ||
| 16 | + - encoding: https://github.com/web-platform-tests/wpt/tree/35f70910d3/encoding | ||
| 23 | 17 | - FileAPI: https://github.com/web-platform-tests/wpt/tree/3b279420d4/FileAPI | |
| 18 | + - hr-time: https://github.com/web-platform-tests/wpt/tree/9910784394/hr-time | ||
| 19 | + - html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/2c5c3c4c27/html/webappapis/microtask-queuing | ||
| 20 | + - html/webappapis/timers: https://github.com/web-platform-tests/wpt/tree/5873f2d8f1/html/webappapis/timers | ||
| 21 | + - interfaces: https://github.com/web-platform-tests/wpt/tree/8602e9c9a1/interfaces | ||
| 22 | + - resources: https://github.com/web-platform-tests/wpt/tree/e366371a19/resources | ||
| 23 | + - url: https://github.com/web-platform-tests/wpt/tree/59d28c8f2d/url | ||
| 24 | 24 | ||
| 25 | 25 | [Web Platform Tests]: https://github.com/web-platform-tests/wpt | |
| 26 | 26 | [`git node wpt`]: https://github.com/nodejs/node-core-utils/blob/master/docs/git-node.md#git-node-wpt | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,63 @@ | |||
| 1 | + // META: script=./resources/ranges.js | ||
| 2 | + | ||
| 3 | + const decode = (input, output, desc) => { | ||
| 4 | + test(function () { | ||
| 5 | + for (const encoding of ["gb18030", "gbk"]) { | ||
| 6 | + assert_equals( | ||
| 7 | + new TextDecoder(encoding).decode(new Uint8Array(input)), | ||
| 8 | + output, | ||
| 9 | + ); | ||
| 10 | + } | ||
| 11 | + }, "gb18030 decoder: " + desc); | ||
| 12 | + }; | ||
| 13 | + | ||
| 14 | + decode([115], "s", "ASCII"); | ||
| 15 | + decode([0x80], "\u20AC", "euro"); | ||
| 16 | + decode([0xFF], "\uFFFD", "initial byte out of accepted ranges"); | ||
| 17 | + decode([0x81], "\uFFFD", "end of queue, gb18030 first not 0"); | ||
| 18 | + decode([0x81, 0x28], "\ufffd(", "two bytes 0x81 0x28"); | ||
| 19 | + decode([0x81, 0x40], "\u4E02", "two bytes 0x81 0x40"); | ||
| 20 | + decode([0x81, 0x7E], "\u4E8A", "two bytes 0x81 0x7e"); | ||
| 21 | + decode([0x81, 0x7F], "\ufffd\u007f", "two bytes 0x81 0x7f"); | ||
| 22 | + decode([0x81, 0x80], "\u4E90", "two bytes 0x81 0x80"); | ||
| 23 | + decode([0x81, 0xFE], "\u4FA2", "two bytes 0x81 0xFE"); | ||
| 24 | + decode([0x81, 0xFF], "\ufffd", "two bytes 0x81 0xFF"); | ||
| 25 | + decode([0xFE, 0x40], "\uFA0C", "two bytes 0xFE 0x40"); | ||
| 26 | + decode([0xFE, 0xFE], "\uE4C5", "two bytes 0xFE 0xFE"); | ||
| 27 | + decode([0xFE, 0xFF], "\ufffd", "two bytes 0xFE 0xFF"); | ||
| 28 | + decode([0x81, 0x30], "\ufffd", "two bytes 0x81 0x30"); | ||
| 29 | + decode([0x81, 0x30, 0xFE], "\ufffd", "three bytes 0x81 0x30 0xFE"); | ||
| 30 | + decode([0x81, 0x30, 0xFF], "\ufffd0\ufffd", "three bytes 0x81 0x30 0xFF"); | ||
| 31 | + decode( | ||
| 32 | + [0x81, 0x30, 0xFE, 0x29], | ||
| 33 | + "\ufffd0\ufffd)", | ||
| 34 | + "four bytes 0x81 0x30 0xFE 0x29", | ||
| 35 | + ); | ||
| 36 | + decode([0xFE, 0x39, 0xFE, 0x39], "\ufffd", "four bytes 0xFE 0x39 0xFE 0x39"); | ||
| 37 | + decode([0x81, 0x35, 0xF4, 0x36], "\u1E3E", "pointer 7458"); | ||
| 38 | + decode([0x81, 0x35, 0xF4, 0x37], "\ue7c7", "pointer 7457"); | ||
| 39 | + decode([0x81, 0x35, 0xF4, 0x38], "\u1E40", "pointer 7459"); | ||
| 40 | + decode([0x84, 0x31, 0xA4, 0x39], "\uffff", "pointer 39419"); | ||
| 41 | + decode([0x84, 0x31, 0xA5, 0x30], "\ufffd", "pointer 39420"); | ||
| 42 | + decode([0x8F, 0x39, 0xFE, 0x39], "\ufffd", "pointer 189999"); | ||
| 43 | + decode([0x90, 0x30, 0x81, 0x30], "\u{10000}", "pointer 189000"); | ||
| 44 | + decode([0xE3, 0x32, 0x9A, 0x35], "\u{10FFFF}", "pointer 1237575"); | ||
| 45 | + decode([0xE3, 0x32, 0x9A, 0x36], "\ufffd", "pointer 1237576"); | ||
| 46 | + decode([0x83, 0x36, 0xC8, 0x30], "\uE7C8", "legacy ICU special case 1"); | ||
| 47 | + decode([0xA1, 0xAD], "\u2026", "legacy ICU special case 2"); | ||
| 48 | + decode([0xA1, 0xAB], "\uFF5E", "legacy ICU special case 3"); | ||
| 49 | + | ||
| 50 | + let i = 0; | ||
| 51 | + for (const range of ranges) { | ||
| 52 | + const pointer = range[0]; | ||
| 53 | + decode( | ||
| 54 | + [ | ||
| 55 | + Math.floor(pointer / 12600) + 0x81, | ||
| 56 | + Math.floor((pointer % 12600) / 1260) + 0x30, | ||
| 57 | + Math.floor((pointer % 1260) / 10) + 0x81, | ||
| 58 | + pointer % 10 + 0x30, | ||
| 59 | + ], | ||
| 60 | + range[1], | ||
| 61 | + "range " + i++, | ||
| 62 | + ); | ||
| 63 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,28 @@ | |||
| 1 | + const gbkPointers = [ | ||
| 2 | + 6432, 7533, 7536, 7672, 7673, 7674, 7675, 7676, 7677, 7678, 7679, 7680, 7681, 7682, 7683, 7684, | ||
| 3 | + 23766, 23770, 23771, 23772, 23773, 23774, 23776, 23777, 23778, 23779, 23780, 23781, 23782, 23784, 23785, 23786, | ||
| 4 | + 23787, 23790, 23791, 23792, 23793, 23796, 23797, 23798, 23799, 23800, 23801, 23802, 23803, 23805, 23806, 23807, | ||
| 5 | + 23808, 23809, 23810, 23811, 23813, 23814, 23815, 23816, 23817, 23818, 23819, 23820, 23821, 23822, 23823, 23824, | ||
| 6 | + 23825, 23826, 23827, 23828, 23831, 23832, 23833, 23834, 23835, 23836, 23837, 23838, 23839, 23840, 23841, 23842, | ||
| 7 | + 23843, 23844 | ||
| 8 | + ]; | ||
| 9 | + const codePoints = [ | ||
| 10 | + 0x20ac, 0x1e3f, 0x01f9, 0x303e, 0x2ff0, 0x2ff1, 0x2ff2, 0x2ff3, 0x2ff4, 0x2ff5, 0x2ff6, 0x2ff7, 0x2ff8, 0x2ff9, 0x2ffa, 0x2ffb, | ||
| 11 | + 0x2e81, 0x2e84, 0x3473, 0x3447, 0x2e88, 0x2e8b, 0x359e, 0x361a, 0x360e, 0x2e8c, 0x2e97, 0x396e, 0x3918, 0x39cf, 0x39df, 0x3a73, | ||
| 12 | + 0x39d0, 0x3b4e, 0x3c6e, 0x3ce0, 0x2ea7, 0x2eaa, 0x4056, 0x415f, 0x2eae, 0x4337, 0x2eb3, 0x2eb6, 0x2eb7, 0x43b1, 0x43ac, 0x2ebb, | ||
| 13 | + 0x43dd, 0x44d6, 0x4661, 0x464c, 0x4723, 0x4729, 0x477c, 0x478d, 0x2eca, 0x4947, 0x497a, 0x497d, 0x4982, 0x4983, 0x4985, 0x4986, | ||
| 14 | + 0x499f, 0x499b, 0x49b7, 0x49b6, 0x4ca3, 0x4c9f, 0x4ca0, 0x4ca1, 0x4c77, 0x4ca2, 0x4d13, 0x4d14, 0x4d15, 0x4d16, 0x4d17, 0x4d18, | ||
| 15 | + 0x4d19, 0x4dae | ||
| 16 | + ]; | ||
| 17 | + | ||
| 18 | + for (let i = 0; i < gbkPointers.length; i++) { | ||
| 19 | + const pointer = gbkPointers[i]; | ||
| 20 | + test(function() { | ||
| 21 | + const lead = pointer / 190 + 0x81; | ||
| 22 | + const trail = pointer % 190; | ||
| 23 | + const offset = trail < 0x3F ? 0x40 : 0x41; | ||
| 24 | + const encoded = [lead, trail + offset]; | ||
| 25 | + const decoded = new TextDecoder("GBK").decode(new Uint8Array(encoded)).charCodeAt(0); | ||
| 26 | + assert_equals(decoded, codePoints[i]); | ||
| 27 | + }, "gbk pointer: " + pointer) | ||
| 28 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,49 @@ | |||
| 1 | + // META: title=Encoding API: TextDecoder decode() optional arguments | ||
| 2 | + | ||
| 3 | + test(t => { | ||
| 4 | + const decoder = new TextDecoder(); | ||
| 5 | + | ||
| 6 | + // Just passing nothing. | ||
| 7 | + assert_equals( | ||
| 8 | + decoder.decode(undefined), '', | ||
| 9 | + 'Undefined as first arg should decode to empty string'); | ||
| 10 | + | ||
| 11 | + // Flushing an incomplete sequence. | ||
| 12 | + decoder.decode(new Uint8Array([0xc9]), {stream: true}); | ||
| 13 | + assert_equals( | ||
| 14 | + decoder.decode(undefined), '\uFFFD', | ||
| 15 | + 'Undefined as first arg should flush the stream'); | ||
| 16 | + | ||
| 17 | + }, 'TextDecoder decode() with explicit undefined'); | ||
| 18 | + | ||
| 19 | + test(t => { | ||
| 20 | + const decoder = new TextDecoder(); | ||
| 21 | + | ||
| 22 | + // Just passing nothing. | ||
| 23 | + assert_equals( | ||
| 24 | + decoder.decode(undefined, undefined), '', | ||
| 25 | + 'Undefined as first arg should decode to empty string'); | ||
| 26 | + | ||
| 27 | + // Flushing an incomplete sequence. | ||
| 28 | + decoder.decode(new Uint8Array([0xc9]), {stream: true}); | ||
| 29 | + assert_equals( | ||
| 30 | + decoder.decode(undefined, undefined), '\uFFFD', | ||
| 31 | + 'Undefined as first arg should flush the stream'); | ||
| 32 | + | ||
| 33 | + }, 'TextDecoder decode() with undefined and undefined'); | ||
| 34 | + | ||
| 35 | + test(t => { | ||
| 36 | + const decoder = new TextDecoder(); | ||
| 37 | + | ||
| 38 | + // Just passing nothing. | ||
| 39 | + assert_equals( | ||
| 40 | + decoder.decode(undefined, {}), '', | ||
| 41 | + 'Undefined as first arg should decode to empty string'); | ||
| 42 | + | ||
| 43 | + // Flushing an incomplete sequence. | ||
| 44 | + decoder.decode(new Uint8Array([0xc9]), {stream: true}); | ||
| 45 | + assert_equals( | ||
| 46 | + decoder.decode(undefined, {}), '\uFFFD', | ||
| 47 | + 'Undefined as first arg should flush the stream'); | ||
| 48 | + | ||
| 49 | + }, 'TextDecoder decode() with undefined and options'); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,6 @@ | |||
| 1 | 1 | // META: title=Encoding API: Encoding labels | |
| 2 | 2 | // META: script=resources/encodings.js | |
| 3 | + // META: timeout=long | ||
| 3 | 4 | ||
| 4 | 5 | var whitespace = [' ', '\t', '\n', '\f', '\r']; | |
| 5 | 6 | encodings_table.forEach(function(section) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,3 +26,12 @@ async_test(function() { | |||
| 26 | 26 | this.done(); | |
| 27 | 27 | }, 2000); | |
| 28 | 28 | }, 'High resolution time has approximately the right relative magnitude'); | |
| 29 | + | ||
| 30 | + test(function() { | ||
| 31 | + var didHandle = false; | ||
| 32 | + self.performance.addEventListener("testEvent", function() { | ||
| 33 | + didHandle = true; | ||
| 34 | + }, { once: true} ); | ||
| 35 | + self.performance.dispatchEvent(new Event("testEvent")); | ||
| 36 | + assert_true(didHandle, "Performance extends EventTarget, so event dispatching should work."); | ||
| 37 | + }, "Performance interface extends EventTarget."); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,12 @@ | |||
| 1 | + setup({ single_test: true }); | ||
| 2 | + var i = 0; | ||
| 3 | + var interval; | ||
| 4 | + function next() { | ||
| 5 | + i++; | ||
| 6 | + if (i === 20) { | ||
| 7 | + clearInterval(interval); | ||
| 8 | + done(); | ||
| 9 | + } | ||
| 10 | + } | ||
| 11 | + setTimeout(assert_unreached, 1000); | ||
| 12 | + interval = setInterval(next, -100); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,3 @@ | |||
| 1 | + setup({ single_test: true }); | ||
| 2 | + setTimeout(done, -100); | ||
| 3 | + setTimeout(assert_unreached, 10); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments