chromium/third_party/blink/web_tests/fast/dom/HTMLDocument/named-item-not-found.html

<head>
<title>Test of named properties in Document</title>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
</head>
<body>
<img id="title"/>
<iframe id="f" srcdoc='<img id="title"/>'></iframe>
<script>
'use strict';

test(() => {
  assert_equals(document.title, "Test of named properties in Document", "<img> with 'id' and empty 'name' must not be found as a named property.  Should fallback to the built-in property.");

  // Use a child frame's document.  Otherwise, breaking the document results
  // breaking the test harness.
  let d = f.contentDocument;
  d.__proto__ = null;
  assert_equals(d.title, undefined, "Should fallback to the built-in property, and then should get undefined because of no prototype object.");
}, "document.title falls back to the built-in property.");
</script>
</body>