| Index: LayoutTests/inspector/elements/highlight-dom-updates.html
|
| diff --git a/LayoutTests/inspector/elements/highlight-dom-updates.html b/LayoutTests/inspector/elements/highlight-dom-updates.html
|
| deleted file mode 100644
|
| index 7a07741f78819f9b49210d3cc7e5b7addfb58eaf..0000000000000000000000000000000000000000
|
| --- a/LayoutTests/inspector/elements/highlight-dom-updates.html
|
| +++ /dev/null
|
| @@ -1,178 +0,0 @@
|
| -<html>
|
| -<head>
|
| -<script src="../../http/tests/inspector/inspector-test.js"></script>
|
| -<script src="../../http/tests/inspector/elements-test.js"></script>
|
| -<script src="../../http/tests/inspector/console-test.js"></script>
|
| -<script>
|
| -
|
| -function appendChild(parentId, id)
|
| -{
|
| - var e = document.createElement("span");
|
| - e.id = id;
|
| - document.getElementById(parentId).appendChild(e);
|
| -}
|
| -
|
| -function remove(id)
|
| -{
|
| - document.getElementById(id).remove();
|
| -}
|
| -
|
| -function removeFirstChild(id)
|
| -{
|
| - document.getElementById(id).firstChild.remove();
|
| -}
|
| -
|
| -function setAttribute(id, name, value)
|
| -{
|
| - var e = document.getElementById(id);
|
| - if (value === undefined)
|
| - e.removeAttribute(name);
|
| - else
|
| - e.setAttribute(name, value);
|
| -}
|
| -
|
| -function setTextContent(id, content)
|
| -{
|
| - document.getElementById(id).textContent = content;
|
| -}
|
| -
|
| -function setFirstChildTextContent(id, content)
|
| -{
|
| - document.getElementById(id).firstChild.textContent = content;
|
| -}
|
| -
|
| -function test()
|
| -{
|
| - var attrTestNode;
|
| - var childTestNode;
|
| - var textTestNode;
|
| -
|
| - InspectorTest.runTestSuite([
|
| - function testDumpInitial(next)
|
| - {
|
| - function callback(node)
|
| - {
|
| - attrTestNode = InspectorTest.expandedNodeWithId("attrTest");
|
| - childTestNode = InspectorTest.expandedNodeWithId("childTest");
|
| - textTestNode = InspectorTest.expandedNodeWithId("textTest");
|
| - next();
|
| - }
|
| - InspectorTest.addResult("========= Original ========");
|
| - InspectorTest.dumpDOMUpdateHighlights(null);
|
| - InspectorTest.expandElementsTree(callback);
|
| - },
|
| -
|
| - function testSetAttributeOtherValue(next)
|
| - {
|
| - runAndDumpHighlights("setAttribute('attrTest', 'attrFoo', 'bar')", attrTestNode, next);
|
| - },
|
| -
|
| - function testSetAttributeEmpty(next)
|
| - {
|
| - runAndDumpHighlights("setAttribute('attrTest', 'attrFoo', '')", attrTestNode, next);
|
| - },
|
| -
|
| - function testAddAttribute(next)
|
| - {
|
| - runAndDumpHighlights("setAttribute('attrTest', 'attrBar', 'newBar')", attrTestNode, next);
|
| - },
|
| -
|
| - function testRemoveAttribute(next)
|
| - {
|
| - runAndDumpHighlights("setAttribute('attrTest', 'attrFoo')", attrTestNode, next);
|
| - },
|
| -
|
| - function testAppendChildToEmpty(next)
|
| - {
|
| - runAndDumpHighlights("appendChild('childTest', 'child1')", childTestNode, callback);
|
| - function callback()
|
| - {
|
| - // Expand the #childTest node.
|
| - InspectorTest.expandElementsTree(next);
|
| - }
|
| - },
|
| -
|
| - function testAppendChildToExpanded(next)
|
| - {
|
| - runAndDumpHighlights("appendChild('childTest', 'child2')", childTestNode, next);
|
| - },
|
| -
|
| - function testRemoveChild1(next)
|
| - {
|
| - runAndDumpHighlights("remove('child1')", childTestNode, next);
|
| - },
|
| -
|
| - function testRemoveChild2(next)
|
| - {
|
| - runAndDumpHighlights("remove('child2')", childTestNode, next);
|
| - },
|
| -
|
| - function testSetTextContent(next)
|
| - {
|
| - runAndDumpHighlights("setTextContent('textTest', 'Text')", textTestNode, next);
|
| - },
|
| -
|
| - function testSetTextNodeTextContent(next)
|
| - {
|
| - runAndDumpHighlights("setFirstChildTextContent('textTest', 'NewText')", textTestNode, next);
|
| - },
|
| -
|
| - function testRemoveInlineTextNode(next)
|
| - {
|
| - runAndDumpHighlights("removeFirstChild('textTest')", textTestNode, next);
|
| - },
|
| -
|
| - function testSetTextContentWithEmptyText(next)
|
| - {
|
| - runAndDumpHighlights("setTextContent('textTest', 'Text')", textTestNode, next);
|
| - },
|
| -
|
| - function testClearTextNodeTextContent(next)
|
| - {
|
| - runAndDumpHighlights("setFirstChildTextContent('textTest', '')", textTestNode, next);
|
| - },
|
| -
|
| - function testAppendChildWhenHidden(next)
|
| - {
|
| - WebInspector.ConsolePanel.show();
|
| - runAndDumpHighlights("appendChild('childTest', 'child1')", childTestNode, next);
|
| - }
|
| - ]);
|
| -
|
| - function runAndDumpHighlights(script, root, next)
|
| - {
|
| - dumpHighlights(root, next);
|
| - InspectorTest.evaluateInPage(script);
|
| - }
|
| -
|
| - function dumpHighlights(root, next)
|
| - {
|
| - InspectorTest.dumpDOMUpdateHighlights(root, callback);
|
| -
|
| - function callback()
|
| - {
|
| - var treeOutline = InspectorTest.firstElementsTreeOutline();
|
| - var highlights = treeOutline._element.getElementsByClassName("dom-update-highlight");
|
| - for (var i = 0; i < highlights.length; ++i)
|
| - highlights[i].classList.remove("dom-update-highlight");
|
| - next();
|
| - }
|
| - }
|
| -}
|
| -
|
| -</script>
|
| -</head>
|
| -
|
| -<body onload="runTest()">
|
| -<p>
|
| -Tests DOM update highlights in the DOM tree.
|
| -</p>
|
| -
|
| -<div id="container">
|
| - <div id="attrTest" attrFoo="foo"></div>
|
| - <div id="childTest"></div>
|
| - <div id="textTest"></div>
|
| -</div>
|
| -
|
| -</body>
|
| -</html>
|
|
|