Index: third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-get-properties-on-proxy.html |
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-get-properties-on-proxy.html b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-get-properties-on-proxy.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..afaf0a7d101ab300782e1a363f51942c239a395c |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-get-properties-on-proxy.html |
@@ -0,0 +1,107 @@ |
+<html> |
+<head> |
+<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script> |
+<script> |
+ |
+function testFunction() |
+{ |
+ window.counter = 0; |
+ var handler = { |
+ get: function(target, name){ |
+ window.counter++; |
+ return Reflect.get.apply(this, arguments); |
+ }, |
+ set: function(target, name){ |
+ window.counter++; |
+ return Reflect.set.apply(this, arguments); |
+ }, |
+ getPrototypeOf: function(target) { |
+ window.counter++; |
+ return Reflect.getPrototypeOf.apply(this, arguments); |
+ }, |
+ setPrototypeOf: function(target) { |
+ window.counter++; |
+ return Reflect.setPrototypeOf.apply(this, arguments); |
+ }, |
+ isExtensible: function(target) { |
+ window.counter++; |
+ return Reflect.isExtensible.apply(this, arguments); |
+ }, |
+ isExtensible: function(target) { |
+ window.counter++; |
+ return Reflect.isExtensible.apply(this, arguments); |
+ }, |
+ isExtensible: function(target) { |
+ window.counter++; |
+ return Reflect.isExtensible.apply(this, arguments); |
+ }, |
+ preventExtensions: function() { |
+ window.counter++; |
+ return Reflect.preventExtensions.apply(this, arguments); |
+ }, |
+ getOwnPropertyDescriptor: function() { |
+ window.counter++; |
+ return Reflect.getOwnPropertyDescriptor.apply(this, arguments); |
+ }, |
+ defineProperty: function() { |
+ window.counter++; |
+ return Reflect.defineProperty.apply(this, arguments); |
+ }, |
+ has: function() { |
+ window.counter++; |
+ return Reflect.has.apply(this, arguments); |
+ }, |
+ get: function() { |
+ window.counter++; |
+ return Reflect.get.apply(this, arguments); |
+ }, |
+ set: function() { |
+ window.counter++; |
+ return Reflect.set.apply(this, arguments); |
+ }, |
+ deleteProperty: function() { |
+ window.counter++; |
+ return Reflect.deleteProperty.apply(this, arguments); |
+ }, |
+ ownKeys: function() { |
+ window.counter++; |
+ return Reflect.ownKeys.apply(this, arguments); |
+ }, |
+ apply: function() { |
+ window.counter++; |
+ return Reflect.apply.apply(this, arguments); |
+ }, |
+ construct: function() { |
+ window.counter++; |
+ return Reflect.construct.apply(this, arguments); |
+ } |
+ }; |
+ return new Proxy({ a : 1}, handler); |
+} |
+ |
+function test() |
+{ |
+ InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "testFunction()"}, requestProperties); |
+ |
+ function requestProperties(result) |
+ { |
+ InspectorTest.sendCommandOrDie("Runtime.getProperties", { objectId: result.result.objectId, generatePreview: true }, checkCounter); |
+ } |
+ |
+ function checkCounter(result) |
+ { |
+ InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "window.counter" }, dumpCounter); |
+ } |
+ |
+ function dumpCounter(result) |
+ { |
+ InspectorTest.logObject(result); |
+ InspectorTest.completeTest(); |
+ } |
+} |
+</script> |
+</head> |
+<body onLoad="runTest();"> |
+Check that while Runtime.getProperties call on proxy object no user defined trap will be executed. |
+</body> |
+</html> |