Fix size check for not restored reason set in WPT

A wrong property `length` was used for comparing the size of the set,
this CL fixes that by changing `length` to `size`.

Bug: 1446619
Change-Id: Icb003734b620e717337d5d785cee8f24342bf2e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4568467
Reviewed-by: Yuzu Saijo <yuzus@chromium.org>
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1149530}
diff --git a/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js b/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js
index 53bcdcc..cb73f52 100644
--- a/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js
+++ b/html/browsers/browsing-the-web/back-forward-cache/resources/rc-helper.js
@@ -75,8 +75,8 @@
   }
   collectReason(result);
 
-  assert_equals(notRestoredReasonsSet.length,
-      expectedNotRestoredReasonsSet.length);
+  assert_equals(notRestoredReasonsSet.size,
+      expectedNotRestoredReasonsSet.size);
 
   for (let reason of expectedNotRestoredReasonsSet) {
     assert_true(notRestoredReasonsSet.has(reason));