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

Unified Diff: LayoutTests/inspector/elements/set-attribute.html

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-attribute.html
diff --git a/LayoutTests/inspector/elements/set-attribute.html b/LayoutTests/inspector/elements/set-attribute.html
deleted file mode 100644
index a77e8cb53c3109544a0d249f06d206b9e9a65deb..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/elements/set-attribute.html
+++ /dev/null
@@ -1,143 +0,0 @@
-<html>
-<head>
-<script src="../../http/tests/inspector/inspector-test.js"></script>
-<script src="../../http/tests/inspector/elements-test.js"></script>
-<script>
-
-function setAttribute(name, value)
-{
- var node = document.getElementById("node");
- node.setAttribute(name, value);
-}
-
-function removeAttribute(name)
-{
- var node = document.getElementById("node");
- node.removeAttribute(name);
-}
-
-function test()
-{
- var targetNode;
-
- InspectorTest.runTestSuite([
- function testDumpInitial(next)
- {
- function callback(node)
- {
- targetNode = node;
- InspectorTest.addResult("========= Original ========");
- InspectorTest.dumpElementsTree(targetNode);
- next();
- }
- InspectorTest.selectNodeWithId("node", callback);
- },
-
- function testAttributeUpdated(next)
- {
- function callback()
- {
- InspectorTest.domModel.removeEventListener(WebInspector.DOMModel.Events.AttrModified, callback);
- InspectorTest.addResult("===== On attribute set =====");
- InspectorTest.dumpElementsTree(targetNode);
- next();
- }
- InspectorTest.domModel.addEventListener(WebInspector.DOMModel.Events.AttrModified, callback);
- InspectorTest.evaluateInPage("setAttribute('name', 'value')");
- },
-
- function testAttributeSameValueNotUpdated(next)
- {
- function callback()
- {
- InspectorTest.addResult("===== On attribute modified (should be 'newValue') =====");
- InspectorTest.dumpElementsTree(targetNode);
- InspectorTest.domModel.removeEventListener(WebInspector.DOMModel.Events.AttrModified, callback);
- next();
- }
- InspectorTest.domModel.addEventListener(WebInspector.DOMModel.Events.AttrModified, callback);
- // Setting the same property value should not result in the AttrModified event.
- InspectorTest.evaluateInPage("setAttribute('name', 'value')");
- InspectorTest.evaluateInPage("setAttribute('name', 'value')");
- InspectorTest.evaluateInPage("setAttribute('name', 'newValue')");
- },
-
- function testAttributeRemoved(next)
- {
- function callback()
- {
- InspectorTest.domModel.removeEventListener(WebInspector.DOMModel.Events.AttrRemoved, callback);
- InspectorTest.addResult("=== On attribute removed ===");
- InspectorTest.dumpElementsTree(targetNode);
- next();
- }
- InspectorTest.domModel.addEventListener(WebInspector.DOMModel.Events.AttrRemoved, callback);
- InspectorTest.evaluateInPage("removeAttribute('name')");
- },
-
- function testSetAttributeValue(next)
- {
- function callback()
- {
- InspectorTest.domModel.removeEventListener(WebInspector.DOMModel.Events.AttrModified, callback);
- InspectorTest.addResult("=== Set attribute value ===");
- InspectorTest.dumpElementsTree(targetNode);
- next();
- }
- InspectorTest.domModel.addEventListener(WebInspector.DOMModel.Events.AttrModified, callback);
- targetNode.setAttributeValue("foo", "bar");
- },
-
- function testSetAttributeText(next)
- {
- function callback()
- {
- InspectorTest.domModel.removeEventListener(WebInspector.DOMModel.Events.AttrRemoved, callback);
- InspectorTest.addResult("=== Set attribute as text ===");
- InspectorTest.dumpElementsTree(targetNode);
- next();
- }
- InspectorTest.domModel.addEventListener(WebInspector.DOMModel.Events.AttrRemoved, callback);
- targetNode.setAttribute("foo", "foo2='baz2' foo3='baz3'");
- },
-
- function testRemoveAttributeAsText(next)
- {
- function callback()
- {
- InspectorTest.domModel.removeEventListener(WebInspector.DOMModel.Events.AttrRemoved, callback);
- InspectorTest.addResult("=== Remove attribute as text ===");
- InspectorTest.dumpElementsTree(targetNode);
- next();
- }
- InspectorTest.domModel.addEventListener(WebInspector.DOMModel.Events.AttrRemoved, callback);
- targetNode.setAttribute("foo3", "");
- },
-
- function testSetMalformedAttributeText(next)
- {
- function callback(error)
- {
- InspectorTest.addResult("Error: " + error);
- InspectorTest.domModel.removeEventListener(WebInspector.DOMModel.Events.AttrModified, callback);
- InspectorTest.addResult("=== Set malformed attribute as text ===");
- InspectorTest.dumpElementsTree(targetNode);
- next();
- }
- targetNode.setAttribute("foo2", "foo2='missingquote", callback);
- }
- ]);
-}
-
-</script>
-</head>
-
-<body onload="runTest()">
-<p>
-Tests that elements panel updates dom tree structure upon setting attribute.
-</p>
-
-<div id="node"></div>
-
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698