chromium/third_party/blink/web_tests/http/tests/security/document-clone-node-change-domain.html

<!DOCTYPE html>
<html>
<head>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
    <script>
        if (document.location.hostname == "127.0.0.1") {
            document.location.hostname = "subdomain.example.test";
        } else {
            test(function () {
                var doc = document.cloneNode(true);
                assert_equals(document.domain, 'subdomain.example.test');
                assert_equals(doc.domain, 'subdomain.example.test');

                document.domain = 'example.test';
                assert_equals(document.domain, 'example.test');
                assert_equals(doc.domain, 'example.test');

                document.domain = 'subdomain.example.test';
            }, "Cloned documents share the underlying domain after the clone.");
        }
    </script>
</head>
<body>
</body>
</html>