Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / elements / styles-1 / edit-name-with-trimmed-value.html
blob57c3e7e2a586b83ea671eaace045a7b05649d7b4
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script>
7 function test()
9 InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
11 function step1()
13 var treeElement = InspectorTest.getElementStylePropertyTreeItem("background");
14 InspectorTest.addResult("Viewing 'background' value in Styles:");
15 InspectorTest.addResult(treeElement.valueElement.textContent);
17 treeElement.startEditing(treeElement.nameElement);
18 treeElement.nameElement.textContent = "background-image";
19 treeElement.nameElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
20 InspectorTest.waitForStyleApplied(step2);
23 function step2()
25 var treeElement = InspectorTest.getElementStylePropertyTreeItem("background-image");
26 InspectorTest.addResult("Renamed 'background' to 'background-image' (edited value):");
27 InspectorTest.addResult(treeElement.valueElement.textContent);
28 InspectorTest.completeTest();
32 </script>
33 </head>
35 <body onload="runTest()">
36 <p>
37 Tests that editing a CSS property name in the Styles pane retains its original, non-trimmed value text.
38 </p>
40 <div id="inspected" style="background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC)" />
42 </body>
43 </html>