<commit_before><!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>window.open doesn't match node-remote</title>
</head>
<body>
    <button id="winopen" onclick="winopen('result')">Open</button>
    <script>
      function out(id, msg) {
        var result = document.createElement('h1');
        result.setAttribute('id', id);
        result.innerHTML = msg;
        document.body.appendChild(result);
      }
    function winopen(id) {
        var win = window.open('http://localhost:{port}/index.html');
        win.onload = function() {
            out(id, 'success');
        };
    }
    </script>
</body>
</html><commit_msg>[test] fix race condition in issue4180-remote-win-open<commit_after><!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>window.open doesn't match node-remote</title>
</head>
<body>
    <button id="winopen" onclick="winopen('result')">Open</button>
    <script>
      function out(id, msg) {
        var result = document.createElement('h1');
        result.setAttribute('id', id);
        result.innerHTML = msg;
        document.body.appendChild(result);
      }
    if (window.opener) {
         console.log("==> IN NEW WINDOW");
         window.opener.postMessage('success', '*');
    }
    window.addEventListener('message', function(e) {
       console.log("==> SUCCESS");
       out('result', e.data);
    });
    function winopen(id) {
        window.open('http://localhost:{port}/index.html');
    }
    </script>
</body>
</html>
{'fraction_non_alphanumeric': 0.18254950495049505, 'fraction_numerical': 0.0049504950495049506, 'mean_word_length': 2.896385542168675, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 35, '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': '3218599', 'n_tokens_mistral': 521, 'n_tokens_neox': 510, 'n_words': 95}