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: lib/src/prism/tests/languages/markup+css+wiki/table-tag_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+css+wiki/table-tag_feature.test
diff --git a/lib/src/prism/tests/languages/markup+css+wiki/table-tag_feature.test b/lib/src/prism/tests/languages/markup+css+wiki/table-tag_feature.test
new file mode 100644
index 0000000000000000000000000000000000000000..e3965f96946def5790c880fd6c915619da0b547f
--- /dev/null
+++ b/lib/src/prism/tests/languages/markup+css+wiki/table-tag_feature.test
@@ -0,0 +1,147 @@
+{|
+| Foo
+| Bar
+|-
+| Baz
+| Foobar
+|}
+
+{|
+|Foo
+bar
+
+baz
+|
+''Foobar''
+|}
+
+{|
+| Foo || Bar || Baz
+|-
+| Baz || Bar || Foo
+|}
+
+{|
+! style="text-align:left;"| Foo
+! Bar
+! Baz
+|-
+| foo
+| bar
+| baz
+|}
+
+{|
+! style="color:red;"| Foo !! style="color:blue;"| Bar !! Baz
+|-
+| foo || style="font-weight:bold;"| bar || baz
+|}
+
+----------------------------------------------------
+
+[
+ ["punctuation", "{|"],
+ ["punctuation", "|"], " Foo\r\n",
+ ["punctuation", "|"], " Bar\r\n",
+ ["punctuation", "|-"],
+ ["punctuation", "|"], " Baz\r\n",
+ ["punctuation", "|"], " Foobar\r\n",
+ ["punctuation", "|}"],
+
+ ["punctuation", "{|"],
+ ["punctuation", "|"], "Foo\r\nbar\r\n\r\nbaz\r\n",
+ ["punctuation", "|"],
+ ["emphasis", [["punctuation", "''"], ["italic", "Foobar"], ["punctuation", "''"]]],
+ ["punctuation", "|}"],
+
+ ["punctuation", "{|"],
+ ["punctuation", "|"], " Foo ",
+ ["punctuation", "||"], " Bar ",
+ ["punctuation", "||"], " Baz\r\n",
+ ["punctuation", "|-"],
+ ["punctuation", "|"], " Baz ",
+ ["punctuation", "||"], " Bar ",
+ ["punctuation", "||"], " Foo\r\n",
+ ["punctuation", "|}"],
+
+ ["punctuation", "{|"],
+ ["punctuation", "!"],
+ ["table-tag", [
+ ["style-attr", [
+ ["attr-name", [["attr-name", ["style"]]]],
+ ["punctuation", "=\""],
+ ["attr-value", [
+ ["property", "text-align"],
+ ["punctuation", ":"],
+ "left",
+ ["punctuation", ";"]
+ ]],
+ ["punctuation", "\""]
+ ]],
+ ["table-bar", "|"]
+ ]], " Foo\r\n",
+ ["punctuation", "!"], " Bar\r\n",
+ ["punctuation", "!"], " Baz\r\n",
+ ["punctuation", "|-"],
+ ["punctuation", "|"], " foo\r\n",
+ ["punctuation", "|"], " bar\r\n",
+ ["punctuation", "|"], " baz\r\n",
+ ["punctuation", "|}"],
+
+ ["punctuation", "{|"],
+ ["punctuation", "!"],
+ ["table-tag", [
+ ["style-attr", [
+ ["attr-name", [["attr-name", ["style"]]]],
+ ["punctuation", "=\""],
+ ["attr-value", [
+ ["property", "color"],
+ ["punctuation", ":"],
+ "red",
+ ["punctuation", ";"]
+ ]],
+ ["punctuation", "\""]
+ ]],
+ ["table-bar", "|"]
+ ]], " Foo ",
+ ["punctuation", "!!"],
+ ["table-tag", [
+ ["style-attr", [
+ ["attr-name", [["attr-name", ["style"]]]],
+ ["punctuation", "=\""],
+ ["attr-value", [
+ ["property", "color"],
+ ["punctuation", ":"],
+ "blue",
+ ["punctuation", ";"]
+ ]],
+ ["punctuation", "\""]
+ ]],
+ ["table-bar", "|"]
+ ]], " Bar ",
+ ["punctuation", "!!"], " Baz\r\n",
+ ["punctuation", "|-"],
+ ["punctuation", "|"], " foo ",
+ ["punctuation", "||"],
+ ["table-tag", [
+ ["style-attr", [
+ ["attr-name", [["attr-name", ["style"]]]],
+ ["punctuation", "=\""],
+ ["attr-value", [
+ ["property", "font-weight"],
+ ["punctuation", ":"],
+ "bold",
+ ["punctuation", ";"]
+ ]],
+ ["punctuation", "\""]
+ ]],
+ ["table-bar", "|"]
+ ]], " bar ",
+ ["punctuation", "||"], " baz\r\n",
+ ["punctuation", "|}"]
+]
+
+----------------------------------------------------
+
+Checks for tables and cell attributes.
+Note: Markup is loaded before CSS so that inline styles are added into grammar.

Powered by Google App Engine
This is Rietveld 408576698