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

Side by Side Diff: third_party/WebKit/LayoutTests/bindings/pair-iterators.html

Issue 2777183004: Make pair iterators inherit from %IteratorPrototype%. (Closed)
Patch Set: Fix the build after The Blink Rename Created 3 years, 8 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/LayoutTests/external/wpt/fetch/api/headers/headers-basic-expected.txt » ('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 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script>
4 <script>
5 test(() => {
6 // Headers.idl has an iterable<k, v> declaration.
7 let iterator = new Headers().entries();
8 let iteratorProto = Object.getPrototypeOf(iterator);
9 let iteratorProtoProto = Object.getPrototypeOf(iteratorProto);
10
11 assert_array_equals(Object.getOwnPropertyNames(iterator), [],
12 "The default iterator object has no properties of its own .");
13 assert_array_equals(Object.getOwnPropertySymbols(iterator), [],
14 "The default iterator object has no symbols of its own.") ;
15
16 assert_in_array("next", Object.getOwnPropertyNames(iteratorProto),
17 "The iterator prototype object has a property called 'next'." );
18 let nextProperty = Object.getOwnPropertyDescriptor(iteratorProto, "next");
19 assert_true(nextProperty.configurable, "The 'next' property must be configura ble.");
20 assert_true(nextProperty.enumerable, "The 'next' property must be enumerable. ");
21 assert_true(nextProperty.writable, "The 'next' property must be writable.");
22
23 assert_equals(iteratorProtoProto,
24 Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator] ())),
25 "The iterator prototype object's [[Prototype]] is %IteratorProt otype.");
26 assert_array_equals(Object.getOwnPropertyNames(iteratorProtoProto), [],
27 "%IteratorPrototype% has no properties of its own");
28 assert_array_equals(Object.getOwnPropertySymbols(iteratorProtoProto),
29 [Symbol.iterator],
30 "%IteratorPrototype% has defines @@iterator.");
31 assert_equals(Object.getPrototypeOf(iteratorProtoProto), Object.prototype,
32 "%IteratorPrototype% descends from %ObjectPrototype%.");
33 }, "Iterators from pair-iterable interfaces inherit from %IteratorPrototype%");
34 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt/fetch/api/headers/headers-basic-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698