Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / runtime / runtime-getProperties.html
blob7ec3470c9770490ed6efd29bad9999c9c72a7e5e
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script>
6 var object1 = { get foo() { return 1; }, set foo(value) { } };
7 var object2 = { get foo() { return 1; } };
9 function test()
11 var obj1, obj2;
13 function dumpProperties(next, properties)
15 for (var i = 0; i < properties.length; ++i)
16 dumpProperty(properties[i]);
17 next();
20 InspectorTest.runTestSuite([
21 function testSetUp(next)
23 InspectorTest.evaluateInPage("dumpObjects('Initial')", step0);
25 function step0()
27 InspectorTest.RuntimeAgent.evaluate("object1", step1);
30 function step1(error, result, wasThrown)
32 obj1 = InspectorTest.runtimeModel.createRemoteObject(result);
33 InspectorTest.RuntimeAgent.evaluate("object2", step2);
36 function step2(error, result, wasThrown)
38 obj2 = InspectorTest.runtimeModel.createRemoteObject(result);
39 next();
43 function testGetterAndSetter(next)
45 obj1.getOwnProperties(dumpProperties.bind(this, next));
48 function testGetterOnly(next)
50 obj2.getOwnProperties(dumpProperties.bind(this, next));
52 ]);
54 function convertPropertyValueForTest(propertyObject, fieldName)
56 var value = propertyObject[fieldName];
57 if (value)
58 propertyObject[fieldName] = { type: value.type, description: value.description.replace("function foo", "function "), objectId: value.objectId };
61 function dumpProperty(property)
63 if (property.name === "__proto__")
64 return;
66 convertPropertyValueForTest(property, "value");
67 convertPropertyValueForTest(property, "getter");
68 convertPropertyValueForTest(property, "setter");
69 InspectorTest.dump(property, { objectId: "formatAsTypeName" });
73 </script>
74 </head>
76 <body onload="runTest()">
77 <p>
78 Tests RemoteObject.getProperties.
79 </p>
81 </body>
82 </html>