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

Unified Diff: LayoutTests/inspector/elements/styles/dynamic-style-tag.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/dynamic-style-tag.html
diff --git a/LayoutTests/inspector/elements/styles/dynamic-style-tag.html b/LayoutTests/inspector/elements/styles/dynamic-style-tag.html
deleted file mode 100644
index 67d5f0c22395b9b33b74ad6968a950d97d43609a..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/elements/styles/dynamic-style-tag.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<html>
-<head>
-<script src="../../../http/tests/inspector/inspector-test.js"></script>
-<script src="../../../http/tests/inspector/elements-test.js"></script>
-<style>
-/* comment */.inline-style-added-by-parser {
- color: red;
-}
-</style>
-<style>
-.inline-style-added-by-parser-with-source-url {
- color: green;
-}
-/*# sourceURL=inlineStyleAddedByParser.css*/
-</style>
-<script>
-document.write("<style>\n.inline-style-added-by-parser-in-document-write {\n color: blue;\n}\n</style>");
-document.write("<style>\n.inline-style-added-by-document-write-with-source-url {\n color: yellow;\n}\n/*# sourceURL=inlineStyleAddedByDocumentWrite.css*/\n</style>");
-addStyleElement(".inline-style-created-by-script {\n color: orange;\n}");
-addStyleElement(".inline-style-created-by-script-with-source-url {\n color: grey;\n}\n/*# sourceURL=inlineStyleCreatedByScript.css*/");
-
-function addStyleElement(styleContent)
-{
- var styleElement = document.createElement("style");
- styleElement.textContent = styleContent;
- document.head.appendChild(styleElement);
-}
-
-function test()
-{
- InspectorTest.selectNodeAndWaitForStyles("inspected", step1);
-
- function step1()
- {
- var styleSheets = InspectorTest.cssModel.allStyleSheets();
- styleSheets.sort();
- for (var i = 0; i < styleSheets.length; ++i)
- InspectorTest.CSSAgent.getStyleSheetText(styleSheets[i].id, dumpStyleSheet.bind(null, styleSheets[i], i === styleSheets.length - 1));
- }
-
- function dumpStyleSheet(header, isLast, error, content, callback)
- {
- InspectorTest.addResult("Stylesheet added:");
- InspectorTest.addResult(" - isInline: " + header.isInline);
- InspectorTest.addResult(" - sourceURL: " + header.sourceURL.substring(header.sourceURL.lastIndexOf("/") + 1));
- InspectorTest.addResult(" - hasSourceURL: " + header.hasSourceURL);
- InspectorTest.addResult(" - contents: " + content);
- if (isLast) {
- InspectorTest.dumpSelectedElementStyles(true, false, true);
- InspectorTest.completeTest();
- }
- }
-}
-</script>
-</head>
-<body onload="runTest()">
-<p>Tests that different types of inline styles are correctly disambiguated and their sourceURL is correct.
-<div id="inspected" style="color:red" class="inline-style-added-by-parser inline-style-added-by-parser-with-source-url inline-style-added-by-parser-in-document-write inline-style-added-by-document-write-with-source-url inline-style-created-by-script inline-style-created-by-script-with-source-url"></div>
-</body>
-</html>
-

Powered by Google App Engine
This is Rietveld 408576698