| Index: LayoutTests/inspector/elements/styles/styles-history.html
|
| diff --git a/LayoutTests/inspector/elements/styles/styles-history.html b/LayoutTests/inspector/elements/styles/styles-history.html
|
| deleted file mode 100644
|
| index 961f4b4e09d08654e19dcc80a4f2bbc1feefc212..0000000000000000000000000000000000000000
|
| --- a/LayoutTests/inspector/elements/styles/styles-history.html
|
| +++ /dev/null
|
| @@ -1,137 +0,0 @@
|
| -<html>
|
| -<head>
|
| -
|
| -<link rel="stylesheet" href="resources/styles-history.css">
|
| -
|
| -<script src="../../../http/tests/inspector/inspector-test.js"></script>
|
| -<script src="../../../http/tests/inspector/elements-test.js"></script>
|
| -<script src="../../../http/tests/inspector/resources-test.js"></script>
|
| -<script src="styles-test.js"></script>
|
| -<script>
|
| -
|
| -function test()
|
| -{
|
| - InspectorTest.runAfterCachedResourcesProcessed(runTestSuite);
|
| -
|
| - var uiSourceCode;
|
| -
|
| - function runTestSuite()
|
| - {
|
| - InspectorTest.runTestSuite([
|
| - function testSetUp(next)
|
| - {
|
| - function visitUISourceCodes(currentUISourceCode)
|
| - {
|
| - if (currentUISourceCode.originURL().indexOf("styles-history.css") === -1)
|
| - return;
|
| - uiSourceCode = currentUISourceCode;
|
| - next();
|
| - }
|
| - WebInspector.workspace.uiSourceCodes().forEach(visitUISourceCodes);
|
| - },
|
| -
|
| - function testSetResourceContentMinor(next)
|
| - {
|
| - InspectorTest.addSniffer(WebInspector.StyleFile.prototype, "_styleContentSet", styleUpdatedMinor);
|
| - uiSourceCode.setWorkingCopy("body {\n margin: 15px;\n padding: 10px;\n}");
|
| -
|
| - function styleUpdatedMinor()
|
| - {
|
| - dumpHistory(next)();
|
| - }
|
| - },
|
| -
|
| - function testSetResourceContentMajor(next)
|
| - {
|
| - InspectorTest.addSniffer(WebInspector.StyleFile.prototype, "_styleContentSet", styleUpdatedMinor);
|
| - uiSourceCode.setWorkingCopy("body {\n margin: 20px;\n padding: 10px;\n}");
|
| -
|
| - function styleUpdatedMinor()
|
| - {
|
| - InspectorTest.addSniffer(WebInspector.StyleFile.prototype, "_styleContentSet", styleUpdatedMajor);
|
| - uiSourceCode.commitWorkingCopy(function() { });
|
| -
|
| - function styleUpdatedMajor()
|
| - {
|
| - dumpHistory(next)();
|
| - }
|
| - }
|
| - },
|
| -
|
| - function testSetContentViaModelMinor(next)
|
| - {
|
| - styleSheetForResource(step1);
|
| -
|
| - function step1(style)
|
| - {
|
| - var property = style.getLiveProperty("margin");
|
| - property.setText("margin:25px;", false, true, dumpHistory(next));
|
| - }
|
| - },
|
| -
|
| - function testSetContentViaModelMajor(next)
|
| - {
|
| - styleSheetForResource(step1);
|
| -
|
| - function step1(style)
|
| - {
|
| - var property = style.getLiveProperty("margin");
|
| - property.setText("margin:30px;", true, true);
|
| - InspectorTest.runAfterPendingDispatches(dumpHistory(next));
|
| - }
|
| - }
|
| - ]);
|
| - }
|
| -
|
| - function styleSheetForResource(callback)
|
| - {
|
| - InspectorTest.nodeWithId("mainBody", onNodeSelected);
|
| -
|
| - function onNodeSelected(node)
|
| - {
|
| - InspectorTest.CSSAgent.getMatchedStylesForNode(node.id, true, true, onMatchedStylesForNode);
|
| - }
|
| -
|
| - function onMatchedStylesForNode(error, matchedStyles)
|
| - {
|
| - if (error) {
|
| - InspectorTest.addResult("error: " + error);
|
| - InspectorTest.completeTest();
|
| - return;
|
| - }
|
| - for (var i = 0; i < matchedStyles.length; ++i) {
|
| - var rule = matchedStyles[i].rule;
|
| - if (rule.origin !== "regular")
|
| - continue;
|
| - callback(WebInspector.CSSStyleDeclaration.parsePayload(InspectorTest.cssModel, rule.style));
|
| - return;
|
| - }
|
| - InspectorTest.addResult("error: did not find any regular rule");
|
| - InspectorTest.completeTest();
|
| - }
|
| - }
|
| -
|
| - function dumpHistory(next)
|
| - {
|
| - function result()
|
| - {
|
| - InspectorTest.addResult("History length: " + uiSourceCode.history.length);
|
| - for (var i = 0; i < uiSourceCode.history.length; ++i) {
|
| - InspectorTest.addResult("Item " + i + ":");
|
| - InspectorTest.addResult(uiSourceCode.history[i].content);
|
| - }
|
| - next();
|
| - }
|
| - return result;
|
| - }
|
| -}
|
| -
|
| -</script>
|
| -</head>
|
| -
|
| -<body id="mainBody" onload="runTest()">
|
| -<p>
|
| -Tests resources panel history.
|
| -</p>
|
| -</body>
|
| -</html>
|
|
|