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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/js/webidl-sequence-conversion.html

Issue 1936433002: Use [[DefineOwnProperty]] when converting IDL array values (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/ToV8.h » ('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 <body>
5 <div></div>
6 <script>
7
8 test(function () {
9
10 var div = document.querySelector("div");
11 var clickEvent = null;
12
13 div.addEventListener("click", function (ev) { clickEvent = ev; });
14 div.click();
15
16 assert_not_equals(clickEvent, null, "click event captured");
17
18 var getter_called = false;
19 var setter_called = false;
20
21 Object.defineProperty(Array.prototype, "0", {
22 get: function () { getter_called = true; },
23 set: function () { setter_called = true; }
24 });
25
26 var path = clickEvent.path;
27
28 delete Array.prototype["0"];
29
30 assert_false(getter_called, "Array.prototype[0] getter called");
31 assert_false(setter_called, "Array.prototype[0] setter called");
32
33 assert_equals(clickEvent.path.length, 5, "click event path length");
34
35 }, "conversion should use [[DefineOwnProperty]]");
36
37 </script>
38 </body>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/ToV8.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698