<!doctype html>

<html>
    <body>
        <script>

            var passed = false;

            try {
                eval('true');
            } catch(e) {
                passed = true;
            }

            window.top.postMessage('csp10:' + (passed ? 'passed' : 'failed'), '*');

        </script>
    </body>
</html>
<!doctype html>

<html>
    <body>
        <script>

            var passed = false;

            try {
                eval('true');
            } catch(e) {
                passed = true;
            }

            if (window.top.postMessage) {
                window.top.postMessage('csp10:' + (passed ? 'passed' : 'failed'), '*');
            }

        </script>
    </body>
</html>
Fix CSP test in old browsers that do not support postMessage
Fix CSP test in old browsers that do not support postMessage
