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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-2.html

Issue 2028863002: DevTools: fix css pretty-print. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 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: third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-2.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-2.html b/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-2.html
new file mode 100644
index 0000000000000000000000000000000000000000..eae8f03f9e714f8a9bed886d8899a17582f13a2c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/sources/pretty-print-css-2.html
@@ -0,0 +1,59 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/debugger-test.js"></script>
+<script src="../../http/tests/inspector/sources-test.js"></script>
+<link rel="stylesheet" href="resources/style-formatter-obfuscated.css">
+
+<script>
+
+function test()
+{
+ var testCSSFormatter = InspectorTest.testPrettyPrint.bind(InspectorTest, "text/css");
+
+ InspectorTest.runTestSuite([
+ function testFontFace(next)
+ {
+ var css = "@font-face{font-family:MyHelvetica;src:local('Helvetica Neue Bold'),local('HelveticaNeue-Bold'),url(MgOpenModernaBold.ttf);font-weight:bold;}div{color:red}";
+ var mappingQueries = ["font-face", "red"];
+ testCSSFormatter(css, mappingQueries, next);
+ },
+
+ function testCharsetRule(next)
+ {
+ var css = "@charset 'iso-8859-15';p{margin:0}";
+ var mappingQueries = ["charset", "iso", "margin"];
+ testCSSFormatter(css, mappingQueries, next);
+ },
+
+ function testImportRule(next)
+ {
+ var css = "@import url('bluish.css') projection,tv;span{border:1px solid black}";
+ var mappingQueries = ["import", "bluish", "projection", "span", "border", "black"];
+ testCSSFormatter(css, mappingQueries, next);
+ },
+
+ function testImportWithMediaQueryRule(next)
+ {
+ var css = "@import url('landscape.css') screen and (orientation:landscape);article{background:yellow}";
+ var mappingQueries = ["import", "url", "orientation", "article", "background", "yellow"];
+ testCSSFormatter(css, mappingQueries, next);
+ },
+
+ function testKeyframesRule(next)
+ {
+ var css = "p{animation-duration:3s;}@keyframes slidein{from{margin-left:100%;width:300%;}to{margin-left:0%;width:100%;}}p{animation-name:slidein}";
+ var mappingQueries = ["animation-duration", "3s", "keyframes", "from", "300%", "animation-name"];
+ testCSSFormatter(css, mappingQueries, next);
+ },
+ ]);
+}
+
+</script>
+
+</head>
+
+<body onload="runTest()">
+<p>Verifies CSS pretty-printing functionality.</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698