diff --git a/html/cross-origin-opener-policy/resources/resource-popup.html b/html/cross-origin-opener-policy/resources/resource-popup.html
index f6b811407f1b0a..2957e35f59b6ae 100644
--- a/html/cross-origin-opener-policy/resources/resource-popup.html
+++ b/html/cross-origin-opener-policy/resources/resource-popup.html
@@ -13,7 +13,7 @@
close();
};
const id = setInterval(() => {
- if (win.location.href !== 'about:blank') {
+ if (win.closed || win.location.href !== 'about:blank') {
clearInterval(id);
bc.postMessage({name: win.name || null, closed: win.closed});
}