aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinweiClarkChao <[email protected]>2014-08-22 17:23:02 +0800
committerJinwei Zhao <[email protected]>2017-01-13 15:07:42 +0800
commit80255411ee7040e0cebbf6b05d2ce323f6f2596e (patch)
tree295b0ef6c85e7cb091b63719ab041596879690fa /Back/Blocks/syntax/tests/cases/007_collapse.html
parent13be3d058713e1467ffc573a90cc694b80526135 (diff)
downloadjinwei.me-80255411ee7040e0cebbf6b05d2ce323f6f2596e.tar.gz
backup
Diffstat (limited to 'Back/Blocks/syntax/tests/cases/007_collapse.html')
-rw-r--r--Back/Blocks/syntax/tests/cases/007_collapse.html60
1 files changed, 60 insertions, 0 deletions
diff --git a/Back/Blocks/syntax/tests/cases/007_collapse.html b/Back/Blocks/syntax/tests/cases/007_collapse.html
new file mode 100644
index 0000000..2643bb5
--- /dev/null
+++ b/Back/Blocks/syntax/tests/cases/007_collapse.html
@@ -0,0 +1,60 @@
1<pre id="sh_007_collapse_a" class="brush: groovy; collapse: true" title="This is a title for collapsed block">
2 /**
3 * Returns an Image object that can then be painted on the screen.
4 * The url argument must specify an absolute {@link URL}. The name
5 * argument is a specifier that is relative to the url argument.
6 *
7 * @param url an absolute URL giving the base location of the image
8 * @param name the location of the image, relative to the url argument
9 * @return the image at the specified URL
10 * @see Image
11 */
12</pre>
13
14<pre id="sh_007_collapse_b" class="brush: groovy; collapse: true">
15 /**
16 * Returns an Image object that can then be painted on the screen.
17 * The url argument must specify an absolute {@link URL}. The name
18 * argument is a specifier that is relative to the url argument.
19 *
20 * @param url an absolute URL giving the base location of the image
21 * @param name the location of the image, relative to the url argument
22 * @return the image at the specified URL
23 * @see Image
24 */
25</pre>
26
27<script type="text/javascript">
28queue(function()
29{
30 var $sh;
31
32 module('007_collapse');
33
34 test('collapsed block with title', function()
35 {
36 $sh = $('#sh_007_collapse_a');
37
38 ok_sh($sh);
39 ok_toolbar($sh);
40 ok_collapsed($sh);
41
42 var $title = $sh.find('.toolbar a.toolbar_item.command_expandSource');
43 ok($title.length == 1, 'Expand present');
44 equal($title.text(), 'This is a title for collapsed block', 'Expand text');
45 });
46
47 test('collapsed block without title', function()
48 {
49 $sh = $('#sh_007_collapse_b');
50
51 ok_sh($sh);
52 ok_toolbar($sh);
53 ok_collapsed($sh);
54
55 var $title = $sh.find('.toolbar a.toolbar_item.command_expandSource');
56 ok($title.length == 1, 'Expand present');
57 equal($title.text(), SyntaxHighlighter.config.strings.expandSource, 'Expand text');
58 });
59});
60</script>
Powered by cgit v1.2.3 (git 2.41.0)