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

Unified Diff: LayoutTests/inspector/elements/set-outer-html-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/set-outer-html-test.js
diff --git a/LayoutTests/inspector/elements/set-outer-html-test.js b/LayoutTests/inspector/elements/set-outer-html-test.js
deleted file mode 100644
index 7020c6f30fbdf1d31618a2258ef1737a0bbac6ed..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/elements/set-outer-html-test.js
+++ /dev/null
@@ -1,111 +0,0 @@
-var initialize_SetOuterHTMLTest = function() {
-
-InspectorTest.events = [];
-InspectorTest.containerId;
-
-InspectorTest.setUpTestSuite = function(next)
-{
- InspectorTest.expandElementsTree(step1);
-
- function step1()
- {
- InspectorTest.selectNodeWithId("container", step2);
- }
-
- function step2(node)
- {
- InspectorTest.containerId = node.id;
- InspectorTest.DOMAgent.getOuterHTML(InspectorTest.containerId, step3);
- }
-
- function step3(error, text)
- {
- InspectorTest.containerText = text;
-
- for (var key in WebInspector.DOMModel.Events) {
- var eventName = WebInspector.DOMModel.Events[key];
- InspectorTest.domModel.addEventListener(eventName, InspectorTest.recordEvent.bind(InspectorTest, eventName));
- }
-
- next();
- }
-}
-
-InspectorTest.recordEvent = function(eventName, event)
-{
- if (!event.data)
- return;
- var node = event.data.node || event.data;
- var parent = event.data.parent;
- for (var currentNode = parent || node; currentNode; currentNode = currentNode.parentNode) {
- if (currentNode.getAttribute("id") === "output")
- return;
- }
- InspectorTest.events.push("Event " + eventName + ": " + node.nodeName());
-}
-
-InspectorTest.patchOuterHTML = function(pattern, replacement, next)
-{
- InspectorTest.addResult("Replacing '" + pattern + "' with '" + replacement + "'\n");
- InspectorTest.setOuterHTML(InspectorTest.containerText.replace(pattern, replacement), next);
-}
-
-InspectorTest.patchOuterHTMLUseUndo = function(pattern, replacement, next)
-{
- InspectorTest.addResult("Replacing '" + pattern + "' with '" + replacement + "'\n");
- InspectorTest.setOuterHTMLUseUndo(InspectorTest.containerText.replace(pattern, replacement), next);
-}
-
-InspectorTest.setOuterHTML = function(newText, next)
-{
- InspectorTest.innerSetOuterHTML(newText, false, bringBack);
-
- function bringBack()
- {
- InspectorTest.addResult("\nBringing things back\n");
- InspectorTest.innerSetOuterHTML(InspectorTest.containerText, true, next);
- }
-}
-
-InspectorTest.setOuterHTMLUseUndo = function(newText, next)
-{
- InspectorTest.innerSetOuterHTML(newText, false, bringBack);
-
- function bringBack()
- {
- InspectorTest.addResult("\nBringing things back\n");
- InspectorTest.domModel.undo(InspectorTest._dumpOuterHTML.bind(InspectorTest, true, next));
- }
-}
-
-InspectorTest.innerSetOuterHTML = function(newText, last, next)
-{
- InspectorTest.DOMAgent.setOuterHTML(InspectorTest.containerId, newText, InspectorTest._dumpOuterHTML.bind(InspectorTest, last, next));
-}
-
-InspectorTest._dumpOuterHTML = function(last, next)
-{
- InspectorTest.RuntimeAgent.evaluate("document.getElementById(\"identity\").wrapperIdentity", dumpIdentity);
- function dumpIdentity(error, result)
- {
- InspectorTest.addResult("Wrapper identity: " + result.value);
- InspectorTest.events.sort();
- for (var i = 0; i < InspectorTest.events.length; ++i)
- InspectorTest.addResult(InspectorTest.events[i]);
- InspectorTest.events = [];
- }
-
- InspectorTest.DOMAgent.getOuterHTML(InspectorTest.containerId, callback);
-
- function callback(error, text)
- {
- InspectorTest.addResult("==========8<==========");
- InspectorTest.addResult(text);
- InspectorTest.addResult("==========>8==========");
- if (last)
- InspectorTest.addResult("\n\n\n");
- next();
- }
-}
-
-};

Powered by Google App Engine
This is Rietveld 408576698