Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLDocument/named-item-not-found.html

Issue 2065523002: binding: Fixes the fallback mechanism of Document's named properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <head>
2 <title>Test of named properties in Document</title>
3 <script src="../../../resources/testharness.js"></script>
4 <script src="../../../resources/testharnessreport.js"></script>
5 </head>
6 <body>
7 <img id="title"/>
8 <iframe id="f" srcdoc='<img id="title"/>'></iframe>
9 <script>
10 'use strict';
11
12 test(() => {
13 assert_equals(document.title, "Test of named properties in Document", "<img> w ith 'id' and empty 'name' must not be found as a named property. Should fallbac k to the built-in property.");
14
15 // Use a child frame's document. Otherwise, breaking the document results
16 // breaking the test harness.
17 let d = f.contentDocument;
18 d.__proto__ = null;
19 assert_equals(d.title, undefined, "Should fallback to the built-in property, a nd then should get undefined because of no prototype object.");
20 }, "document.title falls back to the built-in property.");
21 </script>
22 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698