<commit_before>function runTest()
{
    FBTest.sysout("issue6402.START");

    FBTest.openNewTab(basePath + "console/6402/issue6402.html", function(wrappedWin)
    {
        var tasks = new FBTest.TaskList();
        var iframe = wrappedWin.document.querySelector("#iframe");

        // Note: do NOT reload at this moment.
        FBTest.enableConsolePanel();

        // Note: Test for the FW.Firebug.getConsoleByGlobal() function.
        var oriIframeConsoleInstance = FW.Firebug.getConsoleByGlobal(iframe.contentWindow);

        tasks.push(reloadIframe, iframe);

        tasks.push(testGetConsoleByGlobal, iframe, oriIframeConsoleInstance);

        tasks.wrapAndPush(checkConsole, wrappedWin, "false", "window._console should NOT refer to "+
            "the exposed Firebug console");

        tasks.push(FBTest.reload);

        tasks.wrapAndPush(checkConsole, wrappedWin, "true", "window._console should refer to the "+
            "exposed Firebug console");

        tasks.push(checkConsoleXMLPage);

        tasks.run(function()
        {
            FBTestFirebug.testDone("issue6402.DONE");
        });

    });
}

function checkConsole(win, expectedResult, message)
{
    var $id = win.document.getElementById.bind(win.document);<commit_msg>Fix console/6402 test<commit_after>function runTest()
{
    FBTest.sysout("issue6402.START");

    FBTest.openNewTab(basePath + "console/6402/issue6402.html", function()
    {
        // Note: do NOT reload at this moment.
        FBTest.enableConsolePanel(function(wrappedWin)
        {
            var tasks = new FBTest.TaskList();
            var iframe = wrappedWin.document.querySelector("#iframe");

            // Note: Test for the FW.Firebug.getConsoleByGlobal() function.
            var oriIframeConsoleInstance = FW.Firebug.getConsoleByGlobal(iframe.contentWindow);

            tasks.push(reloadIframe, iframe);

            tasks.push(testGetConsoleByGlobal, iframe, oriIframeConsoleInstance);

            tasks.wrapAndPush(checkConsole, wrappedWin, "false", "window._console should NOT refer to "+
                "the exposed Firebug console");

            tasks.push(FBTest.reload);

            tasks.wrapAndPush(checkConsole, wrappedWin, "true", "window._console should refer to the "+
                "exposed Firebug console");

            tasks.push(checkConsoleXMLPage);

            tasks.run(function()
            {
                FBTestFirebug.testDone("issue6402.DONE");
            });
        });
    });
}

function checkConsole(win, expectedResult, message)
{
    var $id = win.document.getElementById.bind(win.document);
{'fraction_non_alphanumeric': 0.11276758409785932, 'fraction_numerical': 0.013761467889908258, 'mean_word_length': 2.7279202279202277, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1354413', 'n_tokens_mistral': 781, 'n_tokens_neox': 709, 'n_words': 139}