{"size": 663, "ext": "js", "max_stars_repo_path": "test/testcase/infinite_loop_test.js", "max_stars_repo_name": "VikashAbhay/DaumEditor", "max_stars_repo_stars_event_min_datetime": "2015-10-06T14:51:43.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-29T10:28:43.000Z", "max_issues_repo_path": "test/testcase/infinite_loop_test.js", "max_issues_repo_name": "VikashAbhay/DaumEditor", "max_issues_repo_issues_event_min_datetime": "2015-10-06T23:55:40.000Z", "max_issues_repo_issues_event_max_datetime": "2017-11-14T10:33:02.000Z", "max_forks_repo_path": "test/testcase/infinite_loop_test.js", "max_forks_repo_name": "VikashAbhay/DaumEditor", "max_forks_repo_forks_event_min_datetime": "2015-10-06T14:55:42.000Z", "max_forks_repo_forks_event_max_datetime": "2021-05-25T06:39:52.000Z"}
{"max_stars_count": 97, "max_issues_count": 55, "max_forks_count": 58, "avg_line_length": 25.5, "max_line_length": 90, "alphanum_fraction": 0.4585218703}
module("infinite loop");

($tx.msie && $tx.msie_ver <= 8)&&
test("infinite loop", function() {
    var cont =
    '<P id="s">P</P>' +
    '<SPAN id="e">' +
        '<SPAN>' +
            '<DIV>' +
                    'DIV' +
        '</SPAN>' +
        '<SPAN>SPAN</SPAN>'
                '</DIV>' +
    '</SPAN>';

    assi.setContent(cont);
    var range = goog.dom.Range.createFromNodes(assi.$('s').firstChild, 0, assi.$('e'), 3);
    range.select();
    var loop = 0;
    goog.iter.forEach(range.__iterator__(), function(node) {
        if (loop++ >= 50) {
            throw goog.iter.StopIteration;
        }
    });
    ok(loop < 50, "IE에서 무한 루프가 발생함");
});