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

Unified Diff: LayoutTests/inspector/elements/styles/styles-live-locations-leak.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-live-locations-leak.html
diff --git a/LayoutTests/inspector/elements/styles/styles-live-locations-leak.html b/LayoutTests/inspector/elements/styles/styles-live-locations-leak.html
deleted file mode 100644
index 040d797f08362781380bc66ebd81e1366365f187..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/elements/styles/styles-live-locations-leak.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<html>
-<head>
-<script src="../../../http/tests/inspector/inspector-test.js"></script>
-<script src="../../../http/tests/inspector/elements-test.js"></script>
-<script src="styles-test.js"></script>
-<style>
-#first {
- color: blue;
-}
-
-#second {
- line-height: 1em;
- border: 1px solid black;
-}
-
-#third {
- margin: 1px 1px 0 0;
- padding: 10px;
- background-color: blue;
- border: 1px solid black;
-}
-</style>
-<script>
-function test()
-{
- var initialLiveLocationsCount;
- InspectorTest.runTestSuite([
- function selectInitialNode(next)
- {
- InspectorTest.selectNodeAndWaitForStylesWithComputed("first", next);
- },
-
- function saveInitialLiveLocationsCount(next)
- {
- initialLiveLocationsCount = countLiveLocations();
- next();
- },
-
- function rebuildStylesSidebarPaneMultipleTimes(next)
- {
- var elementsToSelect = ["second", "third", "second", "first", "third", "first"];
- function loopThroughElements()
- {
- if (!elementsToSelect.length) {
- next();
- return;
- }
- InspectorTest.selectNodeAndWaitForStylesWithComputed(elementsToSelect.shift(), loopThroughElements);
- }
- loopThroughElements();
- },
-
- function compareLiveLocationsCount(next)
- {
- var liveLocationsCount = countLiveLocations();
- if (liveLocationsCount !== initialLiveLocationsCount)
- InspectorTest.addResult(String.sprintf("ERROR: LiveLocations count is growing! Expected: %d found: %d", initialLiveLocationsCount, liveLocationsCount));
- else
- InspectorTest.addResult("SUCCESS: LiveLocations count do not grow.");
- next();
- }
- ]);
-
- function countLiveLocations()
- {
- var locationsCount = 0;
- var targetInfos = WebInspector.cssWorkspaceBinding._modelToTargetInfo.valuesArray();
- for (var targetInfo of targetInfos) {
- var headerInfos = targetInfo._headerInfoById.valuesArray();
- for (var headerInfo of headerInfos)
- locationsCount += headerInfo._locations.size;
- }
- return locationsCount;
- }
-}
-
-</script>
-
-</head>
-
-<body onload="runTest()">
-
-<p>
-Tests that styles sidebar pane does not leak any LiveLocations.
-</p>
-<div id="first">First element to select</div>
-<div id="second">Second element to select</div>
-<div id="third">Second element to select</div>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698