MCPcopy Create free account
hub / github.com/nodejs/node / runNext

Function runNext

test/fixtures/wpt/encoding/resources/encode-form-common.js:103–140  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

101});
102
103function runNext(id) {
104 var i = currentChunkIndex;
105 currentChunkIndex += 1;
106
107 var iframe = frames[id];
108 var form = forms[id];
109 var input = inputs[id];
110
111 input.value = cplist[i]
112 .map(function(x) {
113 return String.fromCodePoint(x.cp);
114 })
115 .join(separator);
116 form.submit();
117
118 iframe.onload = function() {
119 var url = iframe.contentWindow.location;
120 var query = url.search;
121 var result_string = query.substr(query.indexOf("=") + 1);
122 var results = result_string.split(encodedSeparator);
123
124 for (var j = 0; j < cplist[i].length; j++) {
125 var t = tests[i][j];
126 if (t) {
127 t.step(function() {
128 assert_equals(
129 normalizeStr(results[j]),
130 normalizeStr(cplist[i][j].expected)
131 );
132 });
133 t.done();
134 }
135 }
136 if (currentChunkIndex < numChunks) {
137 runNext(id);
138 }
139 };
140}

Callers 1

Calls 7

mapMethod · 0.65
assert_equalsFunction · 0.50
normalizeStrFunction · 0.50
joinMethod · 0.45
indexOfMethod · 0.45
splitMethod · 0.45
doneMethod · 0.45

Tested by

no test coverage detected