Web Inspector: Move PrettyPrinting tests into LayoutTests
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Sep 2015 18:47:45 +0000 (18:47 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Sep 2015 18:47:45 +0000 (18:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=148698

Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

* Tools/PrettyPrinting/index.html:
Modify the relative path to the tests which are now in LayoutTests.

* UserInterface/Test.html:
Load CodeMirror and related resources for Formatting.

LayoutTests:

* inspector/codemirror/resources/prettyprinting/css-rule-tests/*: Renamed from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/*.
* inspector/codemirror/resources/prettyprinting/css-tests/*: Renamed from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/*.
* inspector/codemirror/resources/prettyprinting/javascript-tests/*: Renamed from Source/WebInspectorUI/Tools/PrettyPrinting/js-tests/*.
Move tests from PrettyPrinting tools into LayoutTests.

* inspector/codemirror/prettyprinting-css-expected.txt: Added.
* inspector/codemirror/prettyprinting-css-rules-expected.txt: Added.
* inspector/codemirror/prettyprinting-css-rules.html: Added.
* inspector/codemirror/prettyprinting-css.html: Added.
* inspector/codemirror/prettyprinting-javascript-expected.txt: Added.
* inspector/codemirror/prettyprinting-javascript.html: Added.
Add tests per CodeMirror mode.

* inspector/codemirror/resources/prettyprinting/utilities.js: Added.
(TestPage.registerInitializer):
Shared code between the pretty printing tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189500 268f45cc-cd09-0410-ab3c-d52691b4dbfc

87 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector/codemirror/prettyprinting-css-expected.txt [new file with mode: 0644]
LayoutTests/inspector/codemirror/prettyprinting-css-rules-expected.txt [new file with mode: 0644]
LayoutTests/inspector/codemirror/prettyprinting-css-rules.html [new file with mode: 0644]
LayoutTests/inspector/codemirror/prettyprinting-css.html [new file with mode: 0644]
LayoutTests/inspector/codemirror/prettyprinting-javascript-expected.txt [new file with mode: 0644]
LayoutTests/inspector/codemirror/prettyprinting-javascript.html [new file with mode: 0644]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/add-whitespace-after-colon-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-after-colon-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/add-whitespace-after-colon.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-after-colon.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/add-whitespace-after-comma-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-after-comma-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/add-whitespace-after-comma.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-after-comma.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/add-whitespace-between-rules-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/add-whitespace-between-rules.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-rules.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/add-whitespace-between-values-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-values-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/add-whitespace-between-values.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/add-whitespace-between-values.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/do-not-append-semicolon-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/do-not-append-semicolon-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/do-not-append-semicolon.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/do-not-append-semicolon.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/invalid-property-is-not-removed-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/invalid-property-is-not-removed-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/invalid-property-is-not-removed.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/invalid-property-is-not-removed.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/keep-prefixed-value-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/keep-prefixed-value-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/keep-prefixed-value.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/keep-prefixed-value.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/remove-newline-between-values-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-newline-between-values-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/remove-newline-between-values.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-newline-between-values.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/remove-whitespace-before-colon-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-whitespace-before-colon-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/remove-whitespace-before-colon.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-whitespace-before-colon.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/remove-whitespace-before-comment-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-whitespace-before-comment-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/remove-whitespace-before-comment.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-whitespace-before-comment.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/remove-whitespace-before-invalid-property-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-whitespace-before-invalid-property-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/remove-whitespace-before-invalid-property.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-whitespace-before-invalid-property.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/remove-whitespace-before-prefixed-property-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-whitespace-before-prefixed-property-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/remove-whitespace-before-prefixed-property.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-whitespace-before-prefixed-property.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/remove-whitespace-before-property-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-whitespace-before-property-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/remove-whitespace-before-property.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-whitespace-before-property.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/remove-whitespace-before-semicolon-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-whitespace-before-semicolon-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/remove-whitespace-before-semicolon.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/remove-whitespace-before-semicolon.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-comment-followed-by-comment-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-comment-followed-by-comment-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-comment-followed-by-comment.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-comment-followed-by-comment.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-comment-followed-by-invalid-property-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-comment-followed-by-invalid-property-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-comment-followed-by-invalid-property.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-comment-followed-by-invalid-property.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-comment-followed-by-prefixed-property-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-comment-followed-by-prefixed-property-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-comment-followed-by-prefixed-property.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-comment-followed-by-prefixed-property.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-comment-followed-by-property-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-comment-followed-by-property-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-comment-followed-by-property.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-comment-followed-by-property.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-invalid-property-followed-by-comment-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-invalid-property-followed-by-comment-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-invalid-property-followed-by-comment.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-invalid-property-followed-by-comment.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-invalid-property-followed-by-invalid-property-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-invalid-property-followed-by-invalid-property-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-invalid-property-followed-by-invalid-property.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-invalid-property-followed-by-invalid-property.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-invalid-property-followed-by-prefixed-property-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-invalid-property-followed-by-prefixed-property-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-invalid-property-followed-by-prefixed-property.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-invalid-property-followed-by-prefixed-property.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-invalid-property-followed-by-property-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-invalid-property-followed-by-property-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-invalid-property-followed-by-property.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-invalid-property-followed-by-property.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-property-followed-by-comment-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-property-followed-by-comment-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-property-followed-by-comment.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-property-followed-by-comment.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-property-followed-by-invalid-property-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-property-followed-by-invalid-property-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-property-followed-by-invalid-property.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-property-followed-by-invalid-property.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-property-followed-by-prefixed-property-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-property-followed-by-prefixed-property-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-property-followed-by-prefixed-property.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-property-followed-by-prefixed-property.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-property-followed-by-property-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-property-followed-by-property-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-property-followed-by-property.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-property-followed-by-property.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-property-without-semicolon-followed-by-comment-and-property-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-property-without-semicolon-followed-by-comment-and-property-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-rule-tests/split-property-without-semicolon-followed-by-comment-and-property.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/split-property-without-semicolon-followed-by-comment-and-property.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-tests/basic-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/basic-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-tests/basic.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/basic.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-tests/calc-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/calc-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-tests/calc.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/calc.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-tests/gradient-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/gradient-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-tests/gradient.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/gradient.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-tests/keyframes-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/keyframes-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-tests/keyframes.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/keyframes.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-tests/media-query-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/media-query-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-tests/media-query.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/media-query.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-tests/selectors-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/selectors-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-tests/selectors.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/selectors.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-tests/wrapping-expected.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/wrapping-expected.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/css-tests/wrapping.css [moved from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/wrapping.css with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/javascript-tests/block-comment-expected.js [moved from Source/WebInspectorUI/Tools/PrettyPrinting/js-tests/block-comment-expected.js with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/javascript-tests/block-comment.js [moved from Source/WebInspectorUI/Tools/PrettyPrinting/js-tests/block-comment.js with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/javascript-tests/single-statement-blocks-expected.js [moved from Source/WebInspectorUI/Tools/PrettyPrinting/js-tests/single-statement-blocks-expected.js with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/javascript-tests/single-statement-blocks.js [moved from Source/WebInspectorUI/Tools/PrettyPrinting/js-tests/single-statement-blocks.js with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/javascript-tests/switch-case-default-expected.js [moved from Source/WebInspectorUI/Tools/PrettyPrinting/js-tests/switch-case-default-expected.js with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/javascript-tests/switch-case-default.js [moved from Source/WebInspectorUI/Tools/PrettyPrinting/js-tests/switch-case-default.js with 100% similarity]
LayoutTests/inspector/codemirror/resources/prettyprinting/utilities.js [new file with mode: 0644]
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Tools/PrettyPrinting/index.html
Source/WebInspectorUI/UserInterface/Test.html

index 7124ac7..f4b8c8b 100644 (file)
@@ -1,3 +1,27 @@
+2015-09-08  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Move PrettyPrinting tests into LayoutTests
+        https://bugs.webkit.org/show_bug.cgi?id=148698
+
+        Reviewed by Timothy Hatcher.
+
+        * inspector/codemirror/resources/prettyprinting/css-rule-tests/*: Renamed from Source/WebInspectorUI/Tools/PrettyPrinting/css-rule-tests/*.
+        * inspector/codemirror/resources/prettyprinting/css-tests/*: Renamed from Source/WebInspectorUI/Tools/PrettyPrinting/css-tests/*.
+        * inspector/codemirror/resources/prettyprinting/javascript-tests/*: Renamed from Source/WebInspectorUI/Tools/PrettyPrinting/js-tests/*.
+        Move tests from PrettyPrinting tools into LayoutTests.
+
+        * inspector/codemirror/prettyprinting-css-expected.txt: Added.
+        * inspector/codemirror/prettyprinting-css-rules-expected.txt: Added.
+        * inspector/codemirror/prettyprinting-css-rules.html: Added.
+        * inspector/codemirror/prettyprinting-css.html: Added.
+        * inspector/codemirror/prettyprinting-javascript-expected.txt: Added.
+        * inspector/codemirror/prettyprinting-javascript.html: Added.
+        Add tests per CodeMirror mode.
+
+        * inspector/codemirror/resources/prettyprinting/utilities.js: Added.
+        (TestPage.registerInitializer):
+        Shared code between the pretty printing tests.
+
 2015-09-08  Daniel Bates  <dabates@apple.com>
 
         Mark animations/trigger-container-scroll-boundaries.html as failure on iOS
diff --git a/LayoutTests/inspector/codemirror/prettyprinting-css-expected.txt b/LayoutTests/inspector/codemirror/prettyprinting-css-expected.txt
new file mode 100644 (file)
index 0000000..47e6e65
--- /dev/null
@@ -0,0 +1,25 @@
+Test CSS pretty printing with CodeMirror.
+
+
+== Running test suite: CodeMirror.PrettyPrinting.CSS
+-- Running test case: CodeMirror.PrettyPrinting.CSS.basic.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSS.calc.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSS.gradient.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSS.keyframes.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSS.media-query.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSS.selectors.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSS.wrapping.css
+PASS
+
diff --git a/LayoutTests/inspector/codemirror/prettyprinting-css-rules-expected.txt b/LayoutTests/inspector/codemirror/prettyprinting-css-rules-expected.txt
new file mode 100644 (file)
index 0000000..31c45ac
--- /dev/null
@@ -0,0 +1,88 @@
+Test CSS Rule pretty printing with CodeMirror.
+
+
+== Running test suite: CodeMirror.PrettyPrinting.CSSRules
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.invalid-property-is-not-removed.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.remove-newline-between-values.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.remove-whitespace-before-colon.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.remove-whitespace-before-semicolon.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.remove-whitespace-before-property.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.remove-whitespace-before-prefixed-property.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.remove-whitespace-before-invalid-property.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.remove-whitespace-before-comment.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.split-comment-followed-by-property.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.split-comment-followed-by-prefixed-property.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.split-comment-followed-by-invalid-property.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.split-comment-followed-by-comment.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.split-property-followed-by-property.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.split-property-followed-by-prefixed-property.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.split-property-followed-by-invalid-property.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.split-property-followed-by-comment.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.split-invalid-property-followed-by-property.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.split-invalid-property-followed-by-prefixed-property.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.split-invalid-property-followed-by-invalid-property.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.split-invalid-property-followed-by-comment.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.split-property-without-semicolon-followed-by-comment-and-property.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.add-whitespace-between-values.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.add-whitespace-between-rules.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.add-whitespace-after-colon.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.add-whitespace-after-comma.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.do-not-append-semicolon.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.do-not-add-whitespace-before-prefixed-property-value.css
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.CSSRules.keep-prefixed-value.css
+PASS
+
diff --git a/LayoutTests/inspector/codemirror/prettyprinting-css-rules.html b/LayoutTests/inspector/codemirror/prettyprinting-css-rules.html
new file mode 100644 (file)
index 0000000..3850b9c
--- /dev/null
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
+<script src="resources/prettyprinting/utilities.js"></script>
+<script>
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite("CodeMirror.PrettyPrinting.CSSRules");
+
+    addPrettyPrintingTests(suite, "css-rule", [
+        "resources/prettyprinting/css-rule-tests/invalid-property-is-not-removed.css",
+        "resources/prettyprinting/css-rule-tests/remove-newline-between-values.css",
+        "resources/prettyprinting/css-rule-tests/remove-whitespace-before-colon.css",
+        "resources/prettyprinting/css-rule-tests/remove-whitespace-before-semicolon.css",
+        "resources/prettyprinting/css-rule-tests/remove-whitespace-before-property.css",
+        "resources/prettyprinting/css-rule-tests/remove-whitespace-before-prefixed-property.css",
+        "resources/prettyprinting/css-rule-tests/remove-whitespace-before-invalid-property.css",
+        "resources/prettyprinting/css-rule-tests/remove-whitespace-before-comment.css",
+        "resources/prettyprinting/css-rule-tests/split-comment-followed-by-property.css",
+        "resources/prettyprinting/css-rule-tests/split-comment-followed-by-prefixed-property.css",
+        "resources/prettyprinting/css-rule-tests/split-comment-followed-by-invalid-property.css",
+        "resources/prettyprinting/css-rule-tests/split-comment-followed-by-comment.css",
+        "resources/prettyprinting/css-rule-tests/split-property-followed-by-property.css",
+        "resources/prettyprinting/css-rule-tests/split-property-followed-by-prefixed-property.css",
+        "resources/prettyprinting/css-rule-tests/split-property-followed-by-invalid-property.css",
+        "resources/prettyprinting/css-rule-tests/split-property-followed-by-comment.css",
+        "resources/prettyprinting/css-rule-tests/split-invalid-property-followed-by-property.css",
+        "resources/prettyprinting/css-rule-tests/split-invalid-property-followed-by-prefixed-property.css",
+        "resources/prettyprinting/css-rule-tests/split-invalid-property-followed-by-invalid-property.css",
+        "resources/prettyprinting/css-rule-tests/split-invalid-property-followed-by-comment.css",
+        "resources/prettyprinting/css-rule-tests/split-property-without-semicolon-followed-by-comment-and-property.css",
+        "resources/prettyprinting/css-rule-tests/add-whitespace-between-values.css",
+        "resources/prettyprinting/css-rule-tests/add-whitespace-between-rules.css",
+        "resources/prettyprinting/css-rule-tests/add-whitespace-after-colon.css",
+        "resources/prettyprinting/css-rule-tests/add-whitespace-after-comma.css",
+        "resources/prettyprinting/css-rule-tests/do-not-append-semicolon.css",
+        "resources/prettyprinting/css-rule-tests/do-not-add-whitespace-before-prefixed-property-value.css",
+        "resources/prettyprinting/css-rule-tests/keep-prefixed-value.css",
+    ]);
+
+    suite.runTestCasesAndFinish();
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Test CSS Rule pretty printing with CodeMirror.</p>
+</body>
+</html>
diff --git a/LayoutTests/inspector/codemirror/prettyprinting-css.html b/LayoutTests/inspector/codemirror/prettyprinting-css.html
new file mode 100644 (file)
index 0000000..8b0a695
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
+<script src="resources/prettyprinting/utilities.js"></script>
+<script>
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite("CodeMirror.PrettyPrinting.CSS");
+
+    addPrettyPrintingTests(suite, "text/css", [
+        "resources/prettyprinting/css-tests/basic.css",
+        "resources/prettyprinting/css-tests/calc.css",
+        "resources/prettyprinting/css-tests/gradient.css",
+        "resources/prettyprinting/css-tests/keyframes.css",
+        "resources/prettyprinting/css-tests/media-query.css",
+        "resources/prettyprinting/css-tests/selectors.css",
+        "resources/prettyprinting/css-tests/wrapping.css",
+    ]);
+
+    suite.runTestCasesAndFinish();
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Test CSS pretty printing with CodeMirror.</p>
+</body>
+</html>
diff --git a/LayoutTests/inspector/codemirror/prettyprinting-javascript-expected.txt b/LayoutTests/inspector/codemirror/prettyprinting-javascript-expected.txt
new file mode 100644 (file)
index 0000000..0dc3c2e
--- /dev/null
@@ -0,0 +1,13 @@
+Test JavaScript pretty printing with CodeMirror.
+
+
+== Running test suite: CodeMirror.PrettyPrinting.JavaScript
+-- Running test case: CodeMirror.PrettyPrinting.JavaScript.block-comment.js
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.JavaScript.single-statement-blocks.js
+PASS
+
+-- Running test case: CodeMirror.PrettyPrinting.JavaScript.switch-case-default.js
+PASS
+
diff --git a/LayoutTests/inspector/codemirror/prettyprinting-javascript.html b/LayoutTests/inspector/codemirror/prettyprinting-javascript.html
new file mode 100644 (file)
index 0000000..e7f70fd
--- /dev/null
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../http/tests/inspector/resources/inspector-test.js"></script>
+<script src="resources/prettyprinting/utilities.js"></script>
+<script>
+function test()
+{
+    let suite = InspectorTest.createAsyncSuite("CodeMirror.PrettyPrinting.JavaScript");
+
+    addPrettyPrintingTests(suite, "text/javascript", [
+        "resources/prettyprinting/javascript-tests/block-comment.js",
+        "resources/prettyprinting/javascript-tests/single-statement-blocks.js",
+        "resources/prettyprinting/javascript-tests/switch-case-default.js",
+    ]);
+
+    suite.runTestCasesAndFinish();
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>Test JavaScript pretty printing with CodeMirror.</p>
+</body>
+</html>
diff --git a/LayoutTests/inspector/codemirror/resources/prettyprinting/utilities.js b/LayoutTests/inspector/codemirror/resources/prettyprinting/utilities.js
new file mode 100644 (file)
index 0000000..413c502
--- /dev/null
@@ -0,0 +1,63 @@
+TestPage.registerInitializer(function() {
+    function loadPrettyPrintingTestAndExpectedResults(testURL) {
+        let expectedURL = testURL.replace(/\.([^\.]+)$/, "-expected.$1");
+        return Promise.all([
+            NetworkAgent.loadResource(WebInspector.frameResourceManager.mainFrame.id, testURL),
+            NetworkAgent.loadResource(WebInspector.frameResourceManager.mainFrame.id, expectedURL)
+        ]).then(function(results) {
+            return Promise.resolve({testText: results[0].content, expectedText: results[1].content });
+        });
+    }
+
+    function runPrettyPrintingTest(mode, testName, testURL) {
+        return loadPrettyPrintingTestAndExpectedResults(testURL).then(function(results) {
+            let {testText, expectedText} = results;
+
+            let editor = CodeMirror(document.createElement("div"));
+            editor.setOption("mode", mode);
+            editor.setValue(testText);
+
+            const start = {line: 0, ch: 0};
+            const end = {line: editor.lineCount() - 1};
+            const indentString = "    ";
+            let originalLineEndings = [];
+            let formattedLineEndings = [];
+            let mapping = {original: [0], formatted: [0]};
+            let builder = new WebInspector.FormatterContentBuilder(mapping, originalLineEndings, formattedLineEndings, 0, 0, indentString);
+            let formatter = new WebInspector.Formatter(editor, builder);
+            formatter.format(start, end);
+
+            let pass = builder.formattedContent === expectedText;
+            InspectorTest.log(pass ? "PASS" : "FAIL");
+
+            if (!pass) {
+                InspectorTest.log("Input:");
+                InspectorTest.log("-----------");
+                InspectorTest.log(testText);
+                InspectorTest.log("-----------");
+                InspectorTest.log("Formatted Output: " + builder.formattedContent.length);
+                InspectorTest.log("-----------");
+                InspectorTest.log(builder.formattedContent);
+                InspectorTest.log("-----------");
+                InspectorTest.log("Expected Output: " + expectedText.length);
+                InspectorTest.log("-----------");
+                InspectorTest.log(expectedText);
+                InspectorTest.log("-----------");
+            }
+        });
+    }
+
+    window.addPrettyPrintingTests = function(suite, mode, tests) {
+        let testPageURL = WebInspector.frameResourceManager.mainFrame.mainResource.url;
+        let testPageResourcesURL = testPageURL.substring(0, testPageURL.lastIndexOf("/"));            
+
+        for (let test of tests) {
+            let testName = test.substring(test.lastIndexOf("/") + 1);
+            let testURL = testPageResourcesURL + "/" + test;
+            suite.addTestCase({
+                name: suite.name + "." + testName,
+                test: (resolve, reject) => { runPrettyPrintingTest(mode, testName, testURL).then(resolve).catch(reject); }
+            });
+        }
+    };
+});
index 91766d5..1dd5c9b 100644 (file)
@@ -1,3 +1,16 @@
+2015-09-08  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Move PrettyPrinting tests into LayoutTests
+        https://bugs.webkit.org/show_bug.cgi?id=148698
+
+        Reviewed by Timothy Hatcher.
+
+        * Tools/PrettyPrinting/index.html:
+        Modify the relative path to the tests which are now in LayoutTests.
+
+        * UserInterface/Test.html:
+        Load CodeMirror and related resources for Formatting.
+
 2015-09-06  Andy Estes  <aestes@apple.com>
 
         WebKit.xcworkspace should be be able to build iOS platforms
index 52bb1d3..6398159 100644 (file)
     }
     function runJavaScriptTests(callback) {
         _runTests(callback, [
-            "js-tests/block-comment.js",
-            "js-tests/single-statement-blocks.js",
-            "js-tests/switch-case-default.js",
+            "javascript-tests/block-comment.js",
+            "javascript-tests/single-statement-blocks.js",
+            "javascript-tests/switch-case-default.js",
         ]);
     }
     function runCssRuleTests(callback) {
 
             // Load test and expected results.
             var test = manifest[index];
-            var expected = test.replace(/\.([^\.]+)$/, "-expected.$1");
+            var testURL = "../../../../LayoutTests/inspector/codemirror/resources/prettyprinting/" + test;
+            var expectedURL = testURL.replace(/\.([^\.]+)$/, "-expected.$1");
             var xhr1 = new XMLHttpRequest;
-            xhr1.open("GET", test, false);
+            xhr1.open("GET", testURL, false);
             xhr1.send();
-            var testData = xhr1.responseText;
             var xhr2 = new XMLHttpRequest;
-            xhr2.open("GET", expected, false);
+            xhr2.open("GET", expectedURL, false);
             xhr2.send();
+            var testData = xhr1.responseText;
             var expectedData = xhr2.responseText;
 
             // Run the test.
index cbdefbb..d9cc6af 100644 (file)
     <script src="Base/URLUtilities.js"></script>
     <script src="Base/Utilities.js"></script>
 
+    <script src="External/CodeMirror/codemirror.js"></script>
+    <script src="External/CodeMirror/css.js"></script>
+    <script src="External/CodeMirror/htmlmixed.js"></script>
+    <script src="External/CodeMirror/javascript.js"></script>
     <script src="External/Esprima/esprima.js"></script>
 
     <script src="Protocol/InspectorBackend.js"></script>
     <script src="Controllers/StorageManager.js"></script>
     <script src="Controllers/TimelineManager.js"></script>
 
+    <script src="Controllers/Formatter.js"></script>
+    <script src="Controllers/FormatterContentBuilder.js"></script>
+    <script src="Views/CodeMirrorAdditions.js"></script>
+    <script src="Views/CodeMirrorFormatters.js"></script>
+
     <script type="text/javascript">
         WebInspector.loaded();