Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: third_party/WebKit/LayoutTests/inspector/elements/edit/edit-dom-actions-1.html

Issue 1875373002: DevTools: split edit-dom-actions.html into three tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split into two tests Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector/elements/edit/edit-dom-actions-1.html
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/edit/edit-dom-actions-1.html b/third_party/WebKit/LayoutTests/inspector/elements/edit/edit-dom-actions-1.html
new file mode 100644
index 0000000000000000000000000000000000000000..c168b7d764062e9e676dd94e9a88df3da4f29268
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/elements/edit/edit-dom-actions-1.html
@@ -0,0 +1,92 @@
+<html>
+<head>
+<script src="../../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../../http/tests/inspector/elements-test.js"></script>
+<script src="edit-dom-test.js"></script>
+<script>
+
+function test()
+{
+ // Save time on style updates.
+ WebInspector.StylesSidebarPane.prototype.update = function() {};
+ WebInspector.MetricsSidebarPane.prototype.update = function() {};
+
+ InspectorTest.runTestSuite([
+ function testSetUp(next)
+ {
+ InspectorTest.expandElementsTree(next);
+ },
+
+ function testRemove(next)
+ {
+ InspectorTest.domActionTestForNodeId("testRemove", "node-to-remove", testBody, next);
+
+ function testBody(node, done)
+ {
+ var treeElement = InspectorTest.firstElementsTreeOutline().findTreeElement(node);
+ treeElement.remove();
+ InspectorTest.runAfterPendingDispatches(done);
+ }
+ },
+
+ function testSetNodeName(next)
+ {
+ InspectorTest.domActionTestForNodeId("testSetNodeName", "node-to-set-name", testBody, next);
+
+ function testBody(node, done)
+ {
+ InspectorTest.editNodePartAndRun(node, "webkit-html-tag-name", "span", done);
+ }
+ },
+
+ function testSetNodeNameInput(next)
+ {
+ InspectorTest.domActionTestForNodeId("testSetNodeNameInput", "node-to-set-name-input", testBody, next);
+
+ function testBody(node, done)
+ {
+ InspectorTest.editNodePartAndRun(node, "webkit-html-tag-name", "input", done);
+ }
+ },
+
+ function testSetNodeValue(next)
+ {
+ InspectorTest.domActionTestForNodeId("testSetNodeValue", "node-to-set-value", testBody, next);
+
+ function testBody(node, done)
+ {
+ InspectorTest.editNodePartAndRun(node, "webkit-html-text-node", " \n Edited Text \n ", done);
+ }
+ },
+ ]);
+}
+
+</script>
+</head>
+
+<body onload="runTest()">
+<p>
+Tests that user can mutate DOM by means of elements panel.
+</p>
+
+<div>
+ <div id="testRemove">
+ <div id="node-to-remove"></div>
+ </div>
+
+ <div id="testSetNodeName">
+ <div id="node-to-set-name"></div>
+ </div>
+
+ <div id="testSetNodeNameInput">
+ <div id="node-to-set-name-input"></div>
+ </div>
+
+ <div id="testSetNodeValue">
+ <div id="node-to-set-value">
+ Text
+ </div>
+ </div>
+</div>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698