From b5f3abeea96db8b98df9bbf4c3da7873b8a84e44 Mon Sep 17 00:00:00 2001 From: thomascube Date: Mon, 27 Jul 2009 15:04:35 +0000 Subject: Tagging files for 0.3-rc1 --- tests/mailfunc.php | 119 ------------------------------------------------ tests/modcss.php | 45 ------------------ tests/runtests.sh | 53 --------------------- tests/src/BID-26800.txt | 52 --------------------- tests/src/htmlbody.txt | 51 --------------------- tests/src/htmlxss.txt | 22 --------- tests/src/plainbody.txt | 37 --------------- tests/src/valid.css | 30 ------------ 8 files changed, 409 deletions(-) delete mode 100644 tests/mailfunc.php delete mode 100644 tests/modcss.php delete mode 100755 tests/runtests.sh delete mode 100644 tests/src/BID-26800.txt delete mode 100644 tests/src/htmlbody.txt delete mode 100644 tests/src/htmlxss.txt delete mode 100644 tests/src/plainbody.txt delete mode 100644 tests/src/valid.css (limited to 'tests') diff --git a/tests/mailfunc.php b/tests/mailfunc.php deleted file mode 100644 index ae35c5d77..000000000 --- a/tests/mailfunc.php +++ /dev/null @@ -1,119 +0,0 @@ -UnitTestCase('Mail body rendering tests'); - - // simulate environment to successfully include func.inc - $GLOBALS['RCMAIL'] = $RCMAIL = rcmail::get_instance(); - $GLOBALS['OUTPUT'] = $OUTPUT = $RCMAIL->load_gui(); - $RCMAIL->action = 'spell'; - $IMAP = $RCMAIL->imap; - - require_once 'steps/mail/func.inc'; - - $GLOBALS['EMAIL_ADDRESS_PATTERN'] = $EMAIL_ADDRESS_PATTERN; - } - - /** - * Helper method to create a HTML message part object - */ - function get_html_part($body) - { - $part = new rcube_message_part; - $part->ctype_primary = 'text'; - $part->ctype_secondary = 'html'; - $part->body = file_get_contents(TESTS_DIR . $body); - $part->replaces = array(); - return $part; - } - - /** - * Test sanitization of a "normal" html message - */ - function test_html() - { - $part = $this->get_html_part('src/htmlbody.txt'); - $part->replaces = array('ex1.jpg' => 'part_1.2.jpg', 'ex2.jpg' => 'part_1.2.jpg'); - - // render HTML in normal mode - $html = rcmail_html4inline(rcmail_print_body($part, array('safe' => false)), 'foo'); - - $this->assertPattern('/src="'.$part->replaces['ex1.jpg'].'"/', $html, "Replace reference to inline image"); - $this->assertPattern('#background="./program/blocked.gif"#', $html, "Replace external background image"); - $this->assertNoPattern('/ex3.jpg/', $html, "No references to external images"); - $this->assertNoPattern('/]+>/', $html, "No meta tags allowed"); - $this->assertNoPattern('/ - - -

2 test

-

<div> block

-
valid css
-
-
- -

3 test

-

Inject comment text

-
-
- -

4 test

-

Using reverse solid to directe the codepoint

-
-
- -

5 test

-

Character entity references

-

Character entity references is acceptable in "inline styles"

-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
- - - - diff --git a/tests/src/htmlbody.txt b/tests/src/htmlbody.txt deleted file mode 100644 index a10bfe10e..000000000 --- a/tests/src/htmlbody.txt +++ /dev/null @@ -1,51 +0,0 @@ - - - - -RoundCube Test Message - - - - - - - - - -
- -

This is a HTML message

- -

See nice pictures like the following:

- -
- Example 1 - Example 2 - Example 3 -
- -
-

Subscription form

- - E-Mail:
- - -
- -

To unsubscribe click here or - send a mail to unsubscribe@evilsite.net

- -
- - - \ No newline at end of file diff --git a/tests/src/htmlxss.txt b/tests/src/htmlxss.txt deleted file mode 100644 index f6c43e353..000000000 --- a/tests/src/htmlxss.txt +++ /dev/null @@ -1,22 +0,0 @@ - - - -

- -

mail me! -roundcube.net -roundcube.net (2) - -

- -
Brilliant!
- -
BBBBBB
- -

-Have a nice Christmas time.
-Thomas -

- - - diff --git a/tests/src/plainbody.txt b/tests/src/plainbody.txt deleted file mode 100644 index 7ebfe429b..000000000 --- a/tests/src/plainbody.txt +++ /dev/null @@ -1,37 +0,0 @@ -From: iPhone Developer Program -To: nobody@roundcube.net - -*iPhone Developer Program* - ------------------------------------ -iPhone SDK 2.2.1 is now available -https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/login?appIdKey=3D= -D635F5C417E087A3B9864DAC5D25920C4E9442C9339FA9277951628F0291F620&path=3D//i= -phone/login.action - -Log in to the iPhone Dev Center to download iPhone SDK for iPhone OS 2.2.1.= - Installation of iPhone SDK 2.2.1 is required for development with devices = -updated to iPhone OS 2.2.1. Please view the Read Me before installing the n= -ew version of the iPhone SDK. - -Log in now -https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/login?appIdKey=3D= -D635F5C417E087A3B9864DAC5D25920C4E9442C9339FA9277951628F0291F620&path=3D//i= -phone/login.action - ------------------------------------ -Copyright (c) 2009 Apple Inc. 1 Infinite Loop, MS 303-3DM, Cupertino, CA 95= -014. - -All Rights Reserved -http://www.apple.com/legal/default.html - -Keep Informed -http://www.apple.com/enews/subscribe/ - -Privacy Policy -http://www.apple.com/legal/privacy/ - -My Info -https://myinfo.apple.com/cgi-bin/WebObjects/MyInfo - diff --git a/tests/src/valid.css b/tests/src/valid.css deleted file mode 100644 index 340fa9a87..000000000 --- a/tests/src/valid.css +++ /dev/null @@ -1,30 +0,0 @@ -/** Master style definitions **/ - -body, p, div, h1, h2, h3, textarea { - font-family: "Lucida Grande", Helvetica, sans-serif; - font-size: 8.8pt; - color: #333; -} - -body { - background-color: white; - margin: 0; -} - -h1 { - color: #1F519A; - font-size: 1.7em; - font-weight: normal; - margin-top: 0; - margin-bottom: 1em; -} - -.noscript { - display: none; -} - -.hint, .username { - color: #999; -} - - -- cgit v1.2.3