Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-protocol / dom / dom-svg-attribute-case.html
blobaed300306d0f28e4c6d268cfab0b23c993cfb1e1
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
4 <script>
6 function test()
8 var rootNodeId;
9 var nodeId;
11 InspectorTest.eventHandler["DOM.attributeModified"] = onAttributeModified;
13 InspectorTest.sendCommand("DOM.getDocument", {}, onGotDocument);
15 function onGotDocument(msg)
17 if (msg.error) {
18 InspectorTest.log(msg.error.message);
19 InspectorTest.completeTest();
20 return;
22 rootNodeId = msg.result.root.nodeId;
23 getMainNodeId();
26 function getMainNodeId(next)
28 InspectorTest.sendCommand("DOM.querySelector", { "nodeId": rootNodeId, "selector": "#main" }, onQuery);
29 function onQuery(msg)
31 if (!checkError(msg))
32 return;
33 nodeId = msg.result.nodeId;
34 onGotMainNodeId();
38 function onGotMainNodeId()
40 InspectorTest.log("Original attributes:");
41 dumpMainElementAttributes(onDumpedOriginal);
44 function onDumpedOriginal()
46 InspectorTest.sendCommand("DOM.setAttributesAsText", { "nodeId": nodeId, "name": "viewBox", "text": "viewBox=\"0 0 120 120\"" });
49 function onAttributeModified(msg) {
50 var result = msg.params;
51 InspectorTest.log("Modified attribute:");
52 InspectorTest.log(result.name + "=" + result.value);
53 InspectorTest.completeTest();
56 function dumpMainElementAttributes(next)
58 InspectorTest.sendCommand("DOM.getAttributes", { "nodeId": nodeId }, onAttributes);
60 function onAttributes(msg)
62 if (!checkError(msg))
63 return;
64 var array = msg.result.attributes;
65 for (var i = 0; i < array.length; i += 2)
66 InspectorTest.log(array[i] + "=" + array[i + 1]);
67 next();
71 function checkError(msg)
73 if (msg.error) {
74 InspectorTest.log(msg.error.message);
75 InspectorTest.completeTest();
76 return false;
78 return true;
81 </script>
82 </head>
83 <body onload="runTest()">
84 Test that DOM attribute case is preserved when modified in XML documents.
85 <svg id="main" xmlns="http://www.w3.org/2000/svg" width="600" height="500" viewBox="0 0 100 120" />
86 </body>
87 </html>