11cb0ef41Sopenharmony_civar tests = []; 21cb0ef41Sopenharmony_ci 31cb0ef41Sopenharmony_cifunction iframeRef(frameRef) { 41cb0ef41Sopenharmony_ci return frameRef.contentWindow 51cb0ef41Sopenharmony_ci ? frameRef.contentWindow.document 61cb0ef41Sopenharmony_ci : frameRef.contentDocument; 71cb0ef41Sopenharmony_ci} 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_cifunction showNodes(decoder) { 101cb0ef41Sopenharmony_ci var iframe = iframeRef(document.getElementById("scrwin")); 111cb0ef41Sopenharmony_ci nodes = iframe.querySelectorAll("span"); 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_ci for (var i = 0; i < nodes.length; i++) { 141cb0ef41Sopenharmony_ci var test = subsetTest(async_test, 151cb0ef41Sopenharmony_ci "U+" + 161cb0ef41Sopenharmony_ci nodes[i].dataset.cp + 171cb0ef41Sopenharmony_ci " " + 181cb0ef41Sopenharmony_ci String.fromCodePoint(parseInt(nodes[i].dataset.cp, 16)) + 191cb0ef41Sopenharmony_ci " " + 201cb0ef41Sopenharmony_ci decoder(nodes[i].dataset.bytes) + 211cb0ef41Sopenharmony_ci " " + 221cb0ef41Sopenharmony_ci nodes[i].dataset.bytes 231cb0ef41Sopenharmony_ci ); 241cb0ef41Sopenharmony_ci if (test) { 251cb0ef41Sopenharmony_ci tests[i] = test; 261cb0ef41Sopenharmony_ci } 271cb0ef41Sopenharmony_ci } 281cb0ef41Sopenharmony_ci 291cb0ef41Sopenharmony_ci for (var i = 0; i < nodes.length; i++) { 301cb0ef41Sopenharmony_ci if (tests[i]) { 311cb0ef41Sopenharmony_ci tests[i].step(function() { 321cb0ef41Sopenharmony_ci assert_equals( 331cb0ef41Sopenharmony_ci nodes[i].textContent, 341cb0ef41Sopenharmony_ci decoder(nodes[i].dataset.bytes) 351cb0ef41Sopenharmony_ci ); 361cb0ef41Sopenharmony_ci }); 371cb0ef41Sopenharmony_ci tests[i].done(); 381cb0ef41Sopenharmony_ci } 391cb0ef41Sopenharmony_ci } 401cb0ef41Sopenharmony_ci} 41