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

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

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 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/resource s/inspector-protocol-test.js"></script>
4 <script>
5
6 function testFunction()
7 {
8 window.counter = 0;
9 var handler = {
10 get: function(target, name){
11 window.counter++;
12 return Reflect.get.apply(this, arguments);
13 },
14 set: function(target, name){
15 window.counter++;
16 return Reflect.set.apply(this, arguments);
17 },
18 getPrototypeOf: function(target) {
19 window.counter++;
20 return Reflect.getPrototypeOf.apply(this, arguments);
21 },
22 setPrototypeOf: function(target) {
23 window.counter++;
24 return Reflect.setPrototypeOf.apply(this, arguments);
25 },
26 isExtensible: function(target) {
27 window.counter++;
28 return Reflect.isExtensible.apply(this, arguments);
29 },
30 isExtensible: function(target) {
31 window.counter++;
32 return Reflect.isExtensible.apply(this, arguments);
33 },
34 isExtensible: function(target) {
35 window.counter++;
36 return Reflect.isExtensible.apply(this, arguments);
37 },
38 preventExtensions: function() {
39 window.counter++;
40 return Reflect.preventExtensions.apply(this, arguments);
41 },
42 getOwnPropertyDescriptor: function() {
43 window.counter++;
44 return Reflect.getOwnPropertyDescriptor.apply(this, arguments);
45 },
46 defineProperty: function() {
47 window.counter++;
48 return Reflect.defineProperty.apply(this, arguments);
49 },
50 has: function() {
51 window.counter++;
52 return Reflect.has.apply(this, arguments);
53 },
54 get: function() {
55 window.counter++;
56 return Reflect.get.apply(this, arguments);
57 },
58 set: function() {
59 window.counter++;
60 return Reflect.set.apply(this, arguments);
61 },
62 deleteProperty: function() {
63 window.counter++;
64 return Reflect.deleteProperty.apply(this, arguments);
65 },
66 ownKeys: function() {
67 window.counter++;
68 return Reflect.ownKeys.apply(this, arguments);
69 },
70 apply: function() {
71 window.counter++;
72 return Reflect.apply.apply(this, arguments);
73 },
74 construct: function() {
75 window.counter++;
76 return Reflect.construct.apply(this, arguments);
77 }
78 };
79 return new Proxy({ a : 1}, handler);
80 }
81
82 function test()
83 {
84 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "testFuncti on()"}, requestProperties);
85
86 function requestProperties(result)
87 {
88 InspectorTest.sendCommandOrDie("Runtime.getProperties", { objectId: resu lt.result.objectId, generatePreview: true }, checkCounter);
89 }
90
91 function checkCounter(result)
92 {
93 InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "window .counter" }, dumpCounter);
94 }
95
96 function dumpCounter(result)
97 {
98 InspectorTest.logObject(result);
99 InspectorTest.completeTest();
100 }
101 }
102 </script>
103 </head>
104 <body onLoad="runTest();">
105 Check that while Runtime.getProperties call on proxy object no user defined trap will be executed.
106 </body>
107 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698