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

Unified Diff: lib/src/prism/tests/languages/markup+javascript+csharp+aspnet/script_feature.test

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 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: lib/src/prism/tests/languages/markup+javascript+csharp+aspnet/script_feature.test
diff --git a/lib/src/prism/tests/languages/markup+javascript+csharp+aspnet/script_feature.test b/lib/src/prism/tests/languages/markup+javascript+csharp+aspnet/script_feature.test
new file mode 100644
index 0000000000000000000000000000000000000000..2be50eb3e6b66c7ffe289b1f49b1c80c3249823b
--- /dev/null
+++ b/lib/src/prism/tests/languages/markup+javascript+csharp+aspnet/script_feature.test
@@ -0,0 +1,57 @@
+<script runat="server">#foo</script>
+<script>/foo/</script>
+
+----------------------------------------------------
+
+[
+ ["tag", [
+ ["tag", [
+ ["punctuation", "<"],
+ "script"
+ ]],
+ ["attr-name", [
+ "runat"
+ ]],
+ ["attr-value", [
+ ["punctuation", "="],
+ ["punctuation", "\""],
+ "server",
+ ["punctuation", "\""]
+ ]],
+ ["punctuation", ">"]
+ ]],
+ ["asp script", [
+ ["preprocessor", "#foo"]
+ ]],
+ ["tag", [
+ ["tag", [
+ ["punctuation", "</"],
+ "script"
+ ]],
+ ["punctuation", ">"]
+ ]],
+
+ ["tag", [
+ ["tag", [
+ ["punctuation", "<"],
+ "script"
+ ]],
+ ["punctuation", ">"]
+ ]],
+ ["script", [
+ ["regex", "/foo/"]
+ ]],
+ ["tag", [
+ ["tag", [
+ ["punctuation", "</"],
+ "script"
+ ]],
+ ["punctuation", ">"]
+ ]]
+]
+
+----------------------------------------------------
+
+Checks for scripts containing C# code.
+Also checks that those don't break normal JS scripts.
+Note: Markup is loaded before Javascript so that scripts are added into grammar.

Powered by Google App Engine
This is Rietveld 408576698