| background-color: silver; |
| box-shadow: 0 0 10px black; |
| testRunner.waitUntilDone(); |
| function sortedJSONStringify(object, space) |
| if (o.hasOwnProperty(key)) |
| return JSON.stringify(sorted(object), function(key, value) { |
| if (typeof value === 'object' && !Array.isArray(value) && !(typeof(value) === 'function')) |
| function getUIScript(layerID) |
| uiController.doAfterPresentationUpdate(function() { |
| var layerProperties = JSON.stringify(uiController.propertiesOfLayerWithID(${layerID})); |
| uiController.uiScriptComplete(layerProperties); |
| var layerID = internals.layerIDForElement(document.getElementById('composited')); |
| testRunner.runUIScript(getUIScript(layerID), function(layerProperties) { |
| var propertiesAsJSON = JSON.parse(layerProperties); |
| document.getElementById('layer-properties').textContent = sortedJSONStringify(propertiesAsJSON, 4); |
| window.addEventListener('load', doTest, false); |
| <div id="composited" class="composited box"> |
| <pre id="layer-properties"></pre> |