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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-get-properties-on-proxy.js

Issue 2954093003: [DevTools] Migrate inspector-protocol/runtime tests to new harness (Closed)
Patch Set: fail: Created 3 years, 5 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
OLDNEW
(Empty)
1 (async function(testRunner) {
2 let {page, session, dp} = await testRunner.startBlank(`Check that while Runtim e.getProperties call on proxy object no user defined trap will be executed.`);
3
4 function testFunction() {
5 window.counter = 0;
6 var handler = {
7 get: function(target, name) {
8 window.counter++;
9 return Reflect.get.apply(this, arguments);
10 },
11 set: function(target, name) {
12 window.counter++;
13 return Reflect.set.apply(this, arguments);
14 },
15 getPrototypeOf: function(target) {
16 window.counter++;
17 return Reflect.getPrototypeOf.apply(this, arguments);
18 },
19 setPrototypeOf: function(target) {
20 window.counter++;
21 return Reflect.setPrototypeOf.apply(this, arguments);
22 },
23 isExtensible: function(target) {
24 window.counter++;
25 return Reflect.isExtensible.apply(this, arguments);
26 },
27 isExtensible: function(target) {
28 window.counter++;
29 return Reflect.isExtensible.apply(this, arguments);
30 },
31 isExtensible: function(target) {
32 window.counter++;
33 return Reflect.isExtensible.apply(this, arguments);
34 },
35 preventExtensions: function() {
36 window.counter++;
37 return Reflect.preventExtensions.apply(this, arguments);
38 },
39 getOwnPropertyDescriptor: function() {
40 window.counter++;
41 return Reflect.getOwnPropertyDescriptor.apply(this, arguments);
42 },
43 defineProperty: function() {
44 window.counter++;
45 return Reflect.defineProperty.apply(this, arguments);
46 },
47 has: function() {
48 window.counter++;
49 return Reflect.has.apply(this, arguments);
50 },
51 get: function() {
52 window.counter++;
53 return Reflect.get.apply(this, arguments);
54 },
55 set: function() {
56 window.counter++;
57 return Reflect.set.apply(this, arguments);
58 },
59 deleteProperty: function() {
60 window.counter++;
61 return Reflect.deleteProperty.apply(this, arguments);
62 },
63 ownKeys: function() {
64 window.counter++;
65 return Reflect.ownKeys.apply(this, arguments);
66 },
67 apply: function() {
68 window.counter++;
69 return Reflect.apply.apply(this, arguments);
70 },
71 construct: function() {
72 window.counter++;
73 return Reflect.construct.apply(this, arguments);
74 }
75 };
76 return new Proxy({ a : 1}, handler);
77 }
78
79 var response = await dp.Runtime.evaluate({expression: '(' + testFunction.toStr ing() + ')()'});
80 await dp.Runtime.getProperties({ objectId: response.result.result.objectId, ge neratePreview: true });
81 response = await dp.Runtime.evaluate({ expression: 'window.counter' });
82 testRunner.logObject(response.result);
83 testRunner.completeTest();
84 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698