<!DOCTYPE html>
<html>
<script src="../../../resources/js-test.js"></script>
<head>
<link id="hello" rel="import" href="resources/hello.html">
</head>
<body>
<script>
jsTestIsAsync = true;
var hello = document.getElementById("hello");
shouldBeNonNull("hello.import");

debug("Node removal should make import deleted.");
hello.parentNode.removeChild(hello);
shouldBeNull("hello.import");

debug("Re-inserting it shouldn't help.");
document.head.appendChild(hello);
window.setTimeout(function() {
    shouldBeNonNull("hello.import");
    finishJSTest();
}, 0);

</script>
</body>
</html>