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

Unified Diff: LayoutTests/inspector/elements/styles/cached-sync-computed-styles.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/cached-sync-computed-styles.html
diff --git a/LayoutTests/inspector/elements/styles/cached-sync-computed-styles.html b/LayoutTests/inspector/elements/styles/cached-sync-computed-styles.html
deleted file mode 100644
index d305b6c51b15a023afa38e1f9aa1811df4d6bcd1..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/elements/styles/cached-sync-computed-styles.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<html>
-<head>
-<style id="style">
-#inspected {
- background-color: green;
-}
-</style>
-<script src="../../../http/tests/inspector/inspector-test.js"></script>
-<script src="../../../http/tests/inspector/elements-test.js"></script>
-<script>
-
-function updateStyle()
-{
- document.getElementById("style").textContent = "#inspected { color: red }";
-}
-
-function test()
-{
- InspectorTest.nodeWithId("inspected", step1);
- var backendCallCount = 0;
- var nodeId;
-
- function onBackendCall(domain, method, params)
- {
- if (method === "CSS.getComputedStyleForNode" && params.nodeId === nodeId)
- ++backendCallCount;
- }
-
- function step1(node)
- {
- var callsLeft = 2;
- nodeId = node.id;
- InspectorTest.addSniffer(InspectorBackend.connection(), "_wrapCallbackAndSendMessageObject", onBackendCall, true);
- InspectorTest.cssModel.getComputedStyleAsync(nodeId, styleCallback);
- InspectorTest.cssModel.getComputedStyleAsync(nodeId, styleCallback);
- function styleCallback()
- {
- if (--callsLeft)
- return;
- InspectorTest.addResult("# of backend calls sent [2 requests]: " + backendCallCount);
- InspectorTest.evaluateInPage("updateStyle()", step2);
- }
- }
-
- function step2()
- {
- InspectorTest.cssModel.getComputedStyleAsync(nodeId, callback);
- function callback()
- {
- InspectorTest.addResult("# of backend calls sent [style update + another request]: " + backendCallCount);
- InspectorTest.completeTest();
- }
- }
-}
-</script>
-</head>
-
-<body onload="runTest()">
-<p>
-Tests that computed styles are cached across synchronous requests.
-</p>
-
-<div>
- <div id="inspected">Test</div>
-</div>
-
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698