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

Unified Diff: LayoutTests/inspector/elements/styles/styles-source-offsets.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/styles/styles-source-offsets.html
diff --git a/LayoutTests/inspector/elements/styles/styles-source-offsets.html b/LayoutTests/inspector/elements/styles/styles-source-offsets.html
deleted file mode 100644
index 86f2d210f79f41e944a8e3c1bb20e67edbff5260..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/elements/styles/styles-source-offsets.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<html>
-<head>
-
-<link rel="stylesheet" href="resources/styles-source-offsets.css">
-
-<script src="../../../http/tests/inspector/inspector-test.js"></script>
-<script src="../../../http/tests/inspector/elements-test.js"></script>
-<script>
-
-function test()
-{
- function dumpStyleData(ruleOrStyle)
- {
- var isRule = !!(ruleOrStyle.style);
- var style;
- var header = "";
- if (isRule) {
- if (ruleOrStyle.origin !== "regular")
- return;
- style = ruleOrStyle.style;
- var selectorRanges = [];
- var selectors = ruleOrStyle.selectorList.selectors;
- var firstRange = selectors[0].range;
- var lastRange = selectors[selectors.length - 1].range;
- var range = { startLine: firstRange.startLine, startColumn: firstRange.startColumn, endLine: lastRange.endLine, endColumn: lastRange.endColumn };
- header = ruleOrStyle.selectorList.text + ": " + (range ? InspectorTest.rangeText(range) : "");
- } else {
- style = ruleOrStyle;
- header = "element.style:";
- }
- InspectorTest.addResult(header + " " + InspectorTest.rangeText(style.range));
- var allProperties = style.cssProperties;
- for (var i = 0; i < allProperties.length; ++i) {
- var property = allProperties[i];
- if (!property.range)
- continue;
- InspectorTest.addResult("['" + property.name + "':'" + property.value + "'" + (property.important ? " !important" : "") + (("parsedOk" in property) ? " non-parsed" : "") +"] @" + InspectorTest.rangeText(property.range));
- }
- }
-
- InspectorTest.selectNodeWithId("mainBody", step1);
-
- var resultStyles = {};
-
- function inlineCallback(error, inlineStyle)
- {
- if (error) {
- InspectorTest.addResult("error: " + error);
- InspectorTest.completeTest();
- return;
- }
-
- resultStyles.inlineStyle = inlineStyle;
- }
-
- function matchedCallback(error, matchedCSSRules)
- {
- if (error) {
- InspectorTest.addResult("error: " + error);
- InspectorTest.completeTest();
- return;
- }
- resultStyles.matchedCSSRules = matchedCSSRules;
- step2();
- }
-
- function step1(node)
- {
- InspectorTest.CSSAgent.getInlineStylesForNode(node.id, inlineCallback);
- InspectorTest.CSSAgent.getMatchedStylesForNode(node.id, matchedCallback);
- }
-
- function step2()
- {
- var matchedCSSRules = resultStyles.matchedCSSRules;
- for (var i = 0; i < matchedCSSRules.length; ++i)
- dumpStyleData(matchedCSSRules[i].rule);
- dumpStyleData(resultStyles.inlineStyle);
- InspectorTest.completeTest();
- }
-}
-
-</script>
-
-<style>
-
-body.mainpage {
- text-decoration: none; /* at least one valid property is necessary for WebCore to match a rule */
- badproperty: 1badvalue1;
-}
-
-</style>
-</head>
-
-<body id="mainBody" class="main1 main2 mainpage" onload="runTest()" style="font-weight: normal; width: 80%">
-<p>
-Tests that proper data and start/end offset positions are reported for CSS style declarations and properties.
-</p>
-
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698