source: tol/TolJava/WebTOLJavaDEMO/web/sh/tests/cases/007_collapse.html @ 9887b93

1941-docker-image-to-testdevel
Last change on this file since 9887b93 was 9887b93, checked in by Humberto Carralero <hacarralero@…>, 15 years ago

Importing TolJava

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@3900 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100644
File size: 1.8 KB
Line 
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>
Note: See TracBrowser for help on using the repository browser.