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

Unified Diff: LayoutTests/inspector/elements/edit-dom-test.js

Issue 1158883003: DevTools: shard inspector/elements tests for faster execution. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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: LayoutTests/inspector/elements/edit-dom-test.js
diff --git a/LayoutTests/inspector/elements/edit-dom-test.js b/LayoutTests/inspector/elements/edit-dom-test.js
deleted file mode 100644
index 4c804547963c1b3245bf69ba849040ee21741e8d..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/elements/edit-dom-test.js
+++ /dev/null
@@ -1,84 +0,0 @@
-function initialize_EditDOMTests()
-{
-
-// Preload codemirror which is used for "Edit as HTML".
-InspectorTest.preloadPanel("sources");
-
-InspectorTest.doAddAttribute = function(testName, dataNodeId, attributeText, next)
-{
- InspectorTest.domActionTestForNodeId(testName, dataNodeId, testBody, next);
-
- function testBody(node, done)
- {
- var editorElement = InspectorTest.editNodePart(node, "webkit-html-attribute");
- editorElement.dispatchEvent(InspectorTest.createKeyEvent("U+0009")); // Tab
-
- InspectorTest.runAfterPendingDispatches(testContinuation);
-
- function testContinuation()
- {
- var editorElement = WebInspector.panels.elements._treeOutlines[0]._shadowRoot.getSelection().anchorNode.parentElement;
- editorElement.textContent = attributeText;
- editorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
- InspectorTest.addSniffer(WebInspector.ElementsTreeOutline.prototype, "_updateModifiedNodes", done);
- }
- }
-}
-
-InspectorTest.domActionTestForNodeId = function(testName, dataNodeId, testBody, next)
-{
- function callback(testNode, continuation)
- {
- InspectorTest.selectNodeWithId(dataNodeId, continuation);
- }
- InspectorTest.domActionTest(testName, callback, testBody, next);
-}
-
-InspectorTest.domActionTest = function(testName, dataNodeSelectionCallback, testBody, next)
-{
- var testNode = InspectorTest.expandedNodeWithId(testName);
- InspectorTest.addResult("==== before ====");
- InspectorTest.dumpElementsTree(testNode);
-
- dataNodeSelectionCallback(testNode, step0);
-
- function step0(node)
- {
- InspectorTest.runAfterPendingDispatches(step1.bind(null, node));
- }
-
- function step1(node)
- {
- testBody(node, step2);
- }
-
- function step2()
- {
- InspectorTest.addResult("==== after ====");
- InspectorTest.dumpElementsTree(testNode);
- next();
- }
-}
-
-InspectorTest.editNodePart = function(node, className)
-{
- var treeElement = InspectorTest.firstElementsTreeOutline().findTreeElement(node);
- var textElement = treeElement.listItemElement.getElementsByClassName(className)[0];
- if (!textElement && treeElement.childrenListElement)
- textElement = treeElement.childrenListElement.getElementsByClassName(className)[0];
- treeElement._startEditingTarget(textElement);
- return textElement;
-}
-
-InspectorTest.editNodePartAndRun = function(node, className, newValue, step2, useSniffer)
-{
- var editorElement = InspectorTest.editNodePart(node, className);
- editorElement.textContent = newValue;
- editorElement.dispatchEvent(InspectorTest.createKeyEvent("Enter"));
- if (useSniffer)
- InspectorTest.addSniffer(WebInspector.ElementsTreeOutline.prototype, "_updateModifiedNodes", step2);
- else
- InspectorTest.runAfterPendingDispatches(step2);
-}
-
-}

Powered by Google App Engine
This is Rietveld 408576698