diff options
Diffstat (limited to 'WebKitTools/iExploder')
-rw-r--r-- | WebKitTools/iExploder/CHANGELOG.txt | 328 | ||||
-rw-r--r-- | WebKitTools/iExploder/LICENSE.txt | 20 | ||||
-rw-r--r-- | WebKitTools/iExploder/README.txt | 149 | ||||
-rw-r--r-- | WebKitTools/iExploder/htdocs/config.rb | 6 | ||||
-rw-r--r-- | WebKitTools/iExploder/htdocs/cssproperties.in | 348 | ||||
-rw-r--r-- | WebKitTools/iExploder/htdocs/cssvalues.in | 339 | ||||
-rw-r--r-- | WebKitTools/iExploder/htdocs/htmlattrs.in | 259 | ||||
-rw-r--r-- | WebKitTools/iExploder/htdocs/htmltags.in | 128 | ||||
-rw-r--r-- | WebKitTools/iExploder/htdocs/htmlvalues.in | 35 | ||||
-rwxr-xr-x | WebKitTools/iExploder/htdocs/iexploder.cgi | 45 | ||||
-rw-r--r-- | WebKitTools/iExploder/htdocs/iexploder.rb | 337 | ||||
-rw-r--r-- | WebKitTools/iExploder/htdocs/index.html | 34 | ||||
-rwxr-xr-x | WebKitTools/iExploder/htdocs/webserver.rb | 75 | ||||
-rwxr-xr-x | WebKitTools/iExploder/tools/lasthit.rb | 53 | ||||
-rwxr-xr-x | WebKitTools/iExploder/tools/osx_last_crash.rb | 48 | ||||
-rwxr-xr-x | WebKitTools/iExploder/tools/showtest.rb | 43 |
16 files changed, 2247 insertions, 0 deletions
diff --git a/WebKitTools/iExploder/CHANGELOG.txt b/WebKitTools/iExploder/CHANGELOG.txt new file mode 100644 index 0000000..a9d5060 --- /dev/null +++ b/WebKitTools/iExploder/CHANGELOG.txt @@ -0,0 +1,328 @@ +------------------------------------------------------------------------ +r618 | thomas | 2006-04-21 09:55:51 -0400 (Fri, 21 Apr 2006) | 1 line +Changed paths: + M /iexploder/README.txt + M /iexploder/htdocs/iexploder.cgi + M /iexploder/htdocs/iexploder.rb + M /iexploder/htdocs/webserver.rb + +1.3.2.. minor adjustment to title and where gets set +------------------------------------------------------------------------ +r617 | thomas | 2006-04-19 17:14:26 -0400 (Wed, 19 Apr 2006) | 1 line +Changed paths: + A /iexploder/testcases/safari/2500_163-Safari-2.0.3_Mac_OS_X-Crash.html + +Add h4+pre+cite+nolayer+code crash for Safari 2.0.3 +------------------------------------------------------------------------ +r616 | thomas | 2006-04-19 17:01:48 -0400 (Wed, 19 Apr 2006) | 1 line +Changed paths: + A /iexploder/tools/showtest.rb + +showtest.rb: easily download a testcase +------------------------------------------------------------------------ +r615 | thomas | 2006-04-19 16:07:13 -0400 (Wed, 19 Apr 2006) | 1 line +Changed paths: + M /iexploder/htdocs/iexploder.rb + +Remove stopping debug message +------------------------------------------------------------------------ +r614 | thomas | 2006-04-19 16:02:48 -0400 (Wed, 19 Apr 2006) | 1 line +Changed paths: + M /iexploder/README.txt + M /iexploder/htdocs/iexploder.rb + +New subtest algorithm: double the tag count each iteration +------------------------------------------------------------------------ +r613 | thomas | 2006-04-19 15:05:30 -0400 (Wed, 19 Apr 2006) | 1 line +Changed paths: + M /iexploder/htdocs/cssproperties.in + +remove IE dupes: text-overflow and word-wrap +------------------------------------------------------------------------ +r612 | thomas | 2006-04-19 12:48:07 -0400 (Wed, 19 Apr 2006) | 1 line +Changed paths: + M /iexploder/README.txt + M /iexploder/htdocs/config.rb + M /iexploder/htdocs/iexploder.rb + +Add some benchmark/performance info.. set MAX_TAGS default to 96 +------------------------------------------------------------------------ +r611 | thomas | 2006-04-19 10:22:33 -0400 (Wed, 19 Apr 2006) | 1 line +Changed paths: + M /iexploder/htdocs/iexploder.cgi + M /iexploder/htdocs/iexploder.rb + M /iexploder/htdocs/webserver.rb + +Add stop parameter, fix port assignment issue, fix indentation +------------------------------------------------------------------------ +r610 | thomas | 2006-04-19 10:22:06 -0400 (Wed, 19 Apr 2006) | 1 line +Changed paths: + M /iexploder/README.txt + +1.3.0 +------------------------------------------------------------------------ +r609 | thomas | 2006-04-18 22:46:35 -0400 (Tue, 18 Apr 2006) | 1 line +Changed paths: + A /iexploder/testcases/safari/16170_44-Safari-Nightly-420+-2006-r13911-2006-04-18.html + +applet+param Hashmap crash in Safari +------------------------------------------------------------------------ +r608 | thomas | 2006-04-18 22:07:45 -0400 (Tue, 18 Apr 2006) | 1 line +Changed paths: + M /iexploder/htdocs/iexploder.cgi + M /iexploder/htdocs/webserver.rb + +1.3.0 +------------------------------------------------------------------------ +r607 | thomas | 2006-04-18 22:05:47 -0400 (Tue, 18 Apr 2006) | 1 line +Changed paths: + M /iexploder/README.txt + M /iexploder/htdocs/webserver.rb + M /iexploder/tools/osx_last_crash.rb + +commit osx_last_crash minutes->days change, document that you can pass a new port number to the webserver.rb program +------------------------------------------------------------------------ +r606 | thomas | 2006-04-18 22:02:16 -0400 (Tue, 18 Apr 2006) | 1 line +Changed paths: + A /iexploder/testcases/safari/2969_421-Safari-2.0.3_Mac_OS_X-Crash.html + A /iexploder/testcases/safari/5763_181-Safari-Nightly-420+-2006-r13911-2006-04-18.html + +Add more Safari crashes to the testcases list +------------------------------------------------------------------------ +r605 | thomas | 2006-04-18 19:05:46 -0400 (Tue, 18 Apr 2006) | 1 line +Changed paths: + M /iexploder/README.txt + M /iexploder/htdocs/config.rb + M /iexploder/htdocs/iexploder.cgi + M /iexploder/htdocs/iexploder.rb + M /iexploder/htdocs/webserver.rb + +Greatly improve subtests. Not only do we iterate around each tag, but we steadily increase the amount of tags we input as well +------------------------------------------------------------------------ +r604 | thomas | 2006-04-18 17:04:17 -0400 (Tue, 18 Apr 2006) | 1 line +Changed paths: + M /iexploder/README.txt + M /iexploder/htdocs/config.rb + +1.3b1.. also, raise max tags to 48 now that we have fixed subtest bugs +------------------------------------------------------------------------ +r603 | thomas | 2006-04-18 16:59:20 -0400 (Tue, 18 Apr 2006) | 1 line +Changed paths: + M /iexploder/htdocs/iexploder.cgi + M /iexploder/htdocs/iexploder.rb + A /iexploder/htdocs/webserver.rb + +New Webrick based option for standalone hosting +------------------------------------------------------------------------ +r602 | thomas | 2006-04-18 16:18:35 -0400 (Tue, 18 Apr 2006) | 1 line +Changed paths: + A /iexploder/htdocs/config.rb + M /iexploder/htdocs/cssproperties.in + M /iexploder/htdocs/iexploder.cgi + A /iexploder/htdocs/iexploder.rb + +Split iexploder.cgi into iexploder.rb and config.rb +------------------------------------------------------------------------ +r601 | thomas | 2006-04-18 13:36:25 -0400 (Tue, 18 Apr 2006) | 1 line +Changed paths: + M /iexploder/htdocs/cssvalues.in + +Add items from WebKit/WebCore/css/CSSValueKeywords.in +------------------------------------------------------------------------ +r600 | thomas | 2006-04-18 13:32:45 -0400 (Tue, 18 Apr 2006) | 1 line +Changed paths: + A /iexploder/testcases/opera/4750_Opera_8.5.4_Mac_OS_X-Crash.html + +Add odd new crash from Opera 8.5.4 for Mac +------------------------------------------------------------------------ +r599 | thomas | 2006-04-18 13:10:15 -0400 (Tue, 18 Apr 2006) | 1 line +Changed paths: + A /iexploder/testcases/safari/7483_Safari-Nightly-420+-2006-r13911-2006-04-18.html + +Add new Safari test case +------------------------------------------------------------------------ +r598 | thomas | 2006-04-18 12:25:39 -0400 (Tue, 18 Apr 2006) | 1 line +Changed paths: + M /iexploder/LICENSE.txt + M /iexploder/README.txt + M /iexploder/htdocs/htmlattrs.in + M /iexploder/htdocs/htmltags.in + M /iexploder/htdocs/iexploder.cgi + +iExploder 1.3: sync with modern rendering kits +------------------------------------------------------------------------ +r597 | thomas | 2006-04-18 12:25:18 -0400 (Tue, 18 Apr 2006) | 1 line +Changed paths: + A /iexploder/testcases/firefox/354_1-Firefox-1.5.0.1_Solaris-Crash.html + A /iexploder/testcases/firefox/44_9-Firefox-1.5.0.1_Solaris-Crash.html + A /iexploder/testcases/internet_explorer/8386_11-Internet-Explorer-6.0_WinXP-DoS.html (from /iexploder/testcases/safari/8386_11-Internet-Explorer-6.0_WinXP-DoS.html:596) + A /iexploder/testcases/safari/218-Safari-2.0.3_Mac_OS_X-Crash.html + D /iexploder/testcases/safari/8386_11-Internet-Explorer-6.0_WinXP-DoS.html + +New testcases +------------------------------------------------------------------------ +r596 | thomas | 2006-04-18 12:23:48 -0400 (Tue, 18 Apr 2006) | 1 line +Changed paths: + D /iexploder/testcases/119_4-Safari-Nightly-420+-2005-10-21-Crash.html + D /iexploder/testcases/165367_15-FireFox-1.4.1-Crash.html + D /iexploder/testcases/2009-iCab-3.0.1-Mac_OS_X-Crash.html + D /iexploder/testcases/2289-iCab-3.0.1-Crash.html + D /iexploder/testcases/25057-OmniWeb-5.1.1-Crash.html + D /iexploder/testcases/2624-Opera-8.5-Mac_OS_X-Crash.html + D /iexploder/testcases/502701_7-FireFox-1.4.1-Crash.html + D /iexploder/testcases/60253-OmniWeb-5.1.1-Crash.html + D /iexploder/testcases/6134_19-Safari-2.0.1-412.5-Crash.html + D /iexploder/testcases/8386_11-Internet-Explorer-6.0_WinXP-DoS.html + A /iexploder/testcases/firefox + A /iexploder/testcases/firefox/165367_15-Firefox-1.4.1-Crash.html (from /iexploder/testcases/165367_15-FireFox-1.4.1-Crash.html:595) + A /iexploder/testcases/firefox/502701_7-Firefox-1.4.1-Crash.html (from /iexploder/testcases/502701_7-FireFox-1.4.1-Crash.html:595) + A /iexploder/testcases/icab + A /iexploder/testcases/icab/2009-iCab-3.0.1-Mac_OS_X-Crash.html (from /iexploder/testcases/2009-iCab-3.0.1-Mac_OS_X-Crash.html:595) + A /iexploder/testcases/icab/2289-iCab-3.0.1-Crash.html (from /iexploder/testcases/2289-iCab-3.0.1-Crash.html:595) + A /iexploder/testcases/internet_explorer + A /iexploder/testcases/omniweb + A /iexploder/testcases/omniweb/25057-OmniWeb-5.1.1-Crash.html (from /iexploder/testcases/25057-OmniWeb-5.1.1-Crash.html:595) + A /iexploder/testcases/omniweb/60253-OmniWeb-5.1.1-Crash.html (from /iexploder/testcases/60253-OmniWeb-5.1.1-Crash.html:595) + A /iexploder/testcases/opera + A /iexploder/testcases/opera/2624-Opera-8.5-Mac_OS_X-Crash.html (from /iexploder/testcases/2624-Opera-8.5-Mac_OS_X-Crash.html:595) + A /iexploder/testcases/safari + A /iexploder/testcases/safari/119_4-Safari-Nightly-420+-2005-10-21-Crash.html (from /iexploder/testcases/119_4-Safari-Nightly-420+-2005-10-21-Crash.html:595) + A /iexploder/testcases/safari/6134_19-Safari-2.0.1-412.5-Crash.html (from /iexploder/testcases/6134_19-Safari-2.0.1-412.5-Crash.html:595) + A /iexploder/testcases/safari/8386_11-Internet-Explorer-6.0_WinXP-DoS.html (from /iexploder/testcases/8386_11-Internet-Explorer-6.0_WinXP-DoS.html:595) + +Reshuffle testcases +------------------------------------------------------------------------ +r521 | thomas | 2005-11-03 22:01:43 -0500 (Thu, 03 Nov 2005) | 1 line +Changed paths: + A /iexploder/testcases/2289-iCab-3.0.1-Crash.html + A /iexploder/testcases/60253-OmniWeb-5.1.1-Crash.html + +add some test cases +------------------------------------------------------------------------ +r520 | thomas | 2005-11-03 22:01:19 -0500 (Thu, 03 Nov 2005) | 1 line +Changed paths: + M /iexploder/htdocs/iexploder.cgi + +Add some cute tabs +------------------------------------------------------------------------ +r508 | thomas | 2005-10-21 15:34:38 -0400 (Fri, 21 Oct 2005) | 1 line +Changed paths: + A /iexploder/testcases/165367_15-FireFox-1.4.1-Crash.html (from /iexploder/testcases/165367_15-FireFox-1.4.1-Mac_OS_X-Crash.html:505) + D /iexploder/testcases/165367_15-FireFox-1.4.1-Mac_OS_X-Crash.html + +Crash is not OSX specific +------------------------------------------------------------------------ +r507 | thomas | 2005-10-21 14:59:41 -0400 (Fri, 21 Oct 2005) | 1 line +Changed paths: + M /iexploder/README.txt + +Mention the fact that testcases may not be portable across installations +------------------------------------------------------------------------ +r506 | thomas | 2005-10-21 14:45:48 -0400 (Fri, 21 Oct 2005) | 1 line +Changed paths: + M /iexploder/htdocs/index.html + +Fix lookup html code +------------------------------------------------------------------------ +r505 | thomas | 2005-10-21 14:22:10 -0400 (Fri, 21 Oct 2005) | 1 line +Changed paths: + A /iexploder/testcases/165367_15-FireFox-1.4.1-Mac_OS_X-Crash.html + +QuickDraw crash for Mac OS X +------------------------------------------------------------------------ +r504 | thomas | 2005-10-21 14:14:34 -0400 (Fri, 21 Oct 2005) | 1 line +Changed paths: + A /iexploder/testcases/25057-OmniWeb-5.1.1-Crash.html + +New crash +------------------------------------------------------------------------ +r503 | thomas | 2005-10-21 14:06:45 -0400 (Fri, 21 Oct 2005) | 1 line +Changed paths: + A /iexploder/testcases/8386_11-Internet-Explorer-6.0_WinXP-DoS.html + +IE DoS +------------------------------------------------------------------------ +r502 | thomas | 2005-10-21 13:24:02 -0400 (Fri, 21 Oct 2005) | 1 line +Changed paths: + M /iexploder/README.txt + M /iexploder/htdocs/cssvalues.in + M /iexploder/htdocs/iexploder.cgi + M /iexploder/htdocs/index.html + D /iexploder/testcases/100482.html + D /iexploder/testcases/103399-nscssvaluelist.html + A /iexploder/testcases/119_4-Safari-Nightly-420+-2005-10-21-Crash.html + A /iexploder/testcases/2009-iCab-3.0.1-Mac_OS_X-Crash.html + A /iexploder/testcases/2624-Opera-8.5-Mac_OS_X-Crash.html + A /iexploder/testcases/502701_7-FireFox-1.4.1-Crash.html + A /iexploder/testcases/6134_19-Safari-2.0.1-412.5-Crash.html + D /iexploder/testcases/firefox-caption-iframe-table-47179.html + D /iexploder/testcases/firefox-caption-marquee-27473.html + D /iexploder/testcases/firefox-caption-marquee-66937.html + D /iexploder/testcases/firefox-isindex-18149.html + D /iexploder/testcases/firefox-visibility-caption-111895.html + +1.2 Update, mostly documentation and test cases +------------------------------------------------------------------------ +r501 | thomas | 2005-10-21 11:41:39 -0400 (Fri, 21 Oct 2005) | 1 line +Changed paths: + M /iexploder/tools/osx_last_crash.rb + +back to days, filter out synergy +------------------------------------------------------------------------ +r500 | thomas | 2005-10-21 11:25:28 -0400 (Fri, 21 Oct 2005) | 1 line +Changed paths: + M /iexploder/htdocs/cssvalues.in + M /iexploder/htdocs/iexploder.cgi + M /iexploder/tools/lasthit.rb + +1.2: We now use javascript reloads after 1 second in case the meta breaks (IE) +------------------------------------------------------------------------ +r499 | thomas | 2005-10-21 08:51:07 -0400 (Fri, 21 Oct 2005) | 1 line +Changed paths: + M /iexploder/htdocs/iexploder.cgi + +1.1: Fix up our subtest model +------------------------------------------------------------------------ +r498 | thomas | 2005-10-20 21:55:59 -0400 (Thu, 20 Oct 2005) | 1 line +Changed paths: + M /iexploder/htdocs/iexploder.cgi + +Support for subtests, and compatibility with mod_ruby +------------------------------------------------------------------------ +r497 | thomas | 2005-10-20 20:48:59 -0400 (Thu, 20 Oct 2005) | 1 line +Changed paths: + M /iexploder/htdocs/cssproperties.in + M /iexploder/htdocs/cssvalues.in + M /iexploder/htdocs/htmlattrs.in + M /iexploder/htdocs/htmlvalues.in + M /iexploder/htdocs/iexploder.cgi + +update to v1.0 +------------------------------------------------------------------------ +r455 | tstrombe | 2005-02-28 08:13:25 -0500 (Mon, 28 Feb 2005) | 1 line +Changed paths: + A /iexploder + A /iexploder/LICENSE.txt + A /iexploder/README.txt + A /iexploder/htdocs + A /iexploder/htdocs/cssproperties.in + A /iexploder/htdocs/cssvalues.in + A /iexploder/htdocs/htmlattrs.in + A /iexploder/htdocs/htmltags.in + A /iexploder/htdocs/htmlvalues.in + A /iexploder/htdocs/iexploder.cgi + A /iexploder/htdocs/index.html + A /iexploder/testcases + A /iexploder/testcases/100482.html + A /iexploder/testcases/103399-nscssvaluelist.html + A /iexploder/testcases/firefox-caption-iframe-table-47179.html + A /iexploder/testcases/firefox-caption-marquee-27473.html + A /iexploder/testcases/firefox-caption-marquee-66937.html + A /iexploder/testcases/firefox-isindex-18149.html + A /iexploder/testcases/firefox-visibility-caption-111895.html + A /iexploder/tools + A /iexploder/tools/lasthit.rb + A /iexploder/tools/osx_last_crash.rb + +iexploder software +------------------------------------------------------------------------ diff --git a/WebKitTools/iExploder/LICENSE.txt b/WebKitTools/iExploder/LICENSE.txt new file mode 100644 index 0000000..5199718 --- /dev/null +++ b/WebKitTools/iExploder/LICENSE.txt @@ -0,0 +1,20 @@ +# +# Copyright (c) 2005 Thomas Stromberg <thomas%stromberg.org> +# +# This software is provided 'as-is', without any express or implied warranty. +# In no event will the authors be held liable for any damages arising from the +# use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software in a +# product, an acknowledgment in the product documentation would be appreciated +# but is not required. +# +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# +# 3. This notice may not be removed or altered from any source distribution. diff --git a/WebKitTools/iExploder/README.txt b/WebKitTools/iExploder/README.txt new file mode 100644 index 0000000..a941697 --- /dev/null +++ b/WebKitTools/iExploder/README.txt @@ -0,0 +1,149 @@ +iExploder 1.3.2 +=============== + +Welcome to iExploder. a highly inefficient, but fairly effective web +browser tester. The code still has a lot of work to be done, but it's +definitely usable. Here are some notable features: + +* Tests all common HTML and CSS tags and attributes, as parsed from +the KHTML, WebKit and Mozilla source trees, as well as tags for +Internet Explorer from MSDN. This also includes a few Javascript hooks. +* Numeric, and String overflow and formatting tests +* Sequential and Randomized Test Case Generation +* Test Case Lookups +* Subtest generation + + +Installation (Standalone) +------------------------- +Make sure you have Ruby installed (comes with Mac OS X, most Linux +distributions). See http://www.ruby-lang.org/ if you do not. + +If you do not already have a webserver setup, you can use the server +built into iexploder. Simply go into the htdocs directory and type: + +% ruby webserver.rb + +A webserver will then start on port 2000 with the iexploder form. If +port 2000 is not preferable, you can pass it another port on the command +line: + +% ruby webserver.rb 2001 + +Please note that lasthit.rb does not currently work with the logs output +from this method. I recommend using a seperate instance/port number +for each browser you test simultaneous using this method. + + +Installation (External Webserver) +--------------------------------- +If you wish to use an external webserver (required for lasthit.rb use), +you may do so. IExploder has been tested with apache. + +Copy the contents of the htdocs/ folder to any directory served +by your webserver. Make sure that directory can execute CGI scripts. If +performance seems to be low, please try using mod_ruby. + + +FAQ: +---- +1) Are the tests always the same? + + The test cases should always be the same on a single installation, but not +necessarily on different installations of iExploder. Random generator seeds +may differ between operating systems and platforms. If you alter the tag and +property counts in config.rb, it will change the test cases as well. + + +2) How do I look up the last successful test for a client? + +Use tools/lasthit.rb. When I get a crash, I usually do something like: + + % tail -15000 /var/log/apache2/access_log | ./lasthit.rb + +Letting you know how many tests and what the last test id was for each +client tested. You can then try to repeat the test, or go through the +subtests to see if you can repeat the crash. + + +3) How do subtests work? + +If you see a crash on a particular test, and would like to determine the exact +line that is crashing it, you can use subtests. To do so, go back to the test +submission form, and start the test from the number that a crash was indicated +on. Instead of leaving the "subtest" field blank, set it to 1. This will rotate +through each subtest for a particular test. + +Each subtest will rotate through a tag offset and a number of tags to +garble, which should help you isolate the instance. The number of tags +used doubles each cycle. Here is an idea of how many subtests to expect +based on your $HTML_MAX_TAGS settings: + +tags subtests +---------------- +32 138 +48 236 +64 332 +96 558 +128 782 + +Most of the time you will be able to replicate a crash within the first +$HTML_MAX_TAGS subtests, but sometimes crashes are due to a combination +of corrupted tags. + + +4) How come I can't seem to repeat the crash? + + Many browser crashes are race conditions that are not easy to repeat. Some +crashes only happen when going from test 4 -> test 5 -> test 6. If you can't +repeat the crash through subtests or a lookup of the failing test, try going +back a few tests. + +That said, some crashes are due to race conditions that are very difficult +to replicate. + + +5) Why did you write this? + + I wanted to make sure that FireFox had as many bugs fixed in it as possible +before the 1.0 release. After 1.0 came out, I kept improving it. + + +6) Why does Internet Explorer run the tests so slowly? + + <META> refresh tags are very fragile in Internet Explorer, and can be easily +be rendered useless by other tags on the page. If this happens, a javascript +refresh will execute after a 1 second delay. + + + +7) How do I change the number of tags iExploder tests per page? + +See config.rb. I personally recommend 32-128 HTML tags per page. While this +seems to be a lot to go through when designing a test case, that's why the +subtest engine was made. Different web browsers will have different +performance characteristics when it comes to the number of tags per page. + +Here are the results with Firefox 2.0b1 (Bon Echo) and the iExploder +built-in webserver running tests 1-250. + +tags seconds pages/second tags/second +----------------------------------------- +32 60 4.0 131 +48 85 2.9 141 +64 95 2.6 168 +96 120 2.1 200 *DEFAULT* +128 140 1.8 228 +196 228 1.1 210 +256 308 0.8 207 + +If you find pages/second to be more important than tags/second, I would +change $HTML_MAX_TAGS to 32. Do keep in mind that large tag counts mean +longer subtest generation periods. + + +8) What other performance enhancements can I make? + +* Before using iExploder, reset your browser history +* Minimize your browser while iExploder is running +* If using Apache, make use of mod_ruby diff --git a/WebKitTools/iExploder/htdocs/config.rb b/WebKitTools/iExploder/htdocs/config.rb new file mode 100644 index 0000000..d9e7e1b --- /dev/null +++ b/WebKitTools/iExploder/htdocs/config.rb @@ -0,0 +1,6 @@ +# Configuration for iExploder.. not generally tuned. + +$HTML_MAX_TAGS = 96; +$HTML_MAX_ATTRS = 4; +$CSS_MAX_PROPS = 5; + diff --git a/WebKitTools/iExploder/htdocs/cssproperties.in b/WebKitTools/iExploder/htdocs/cssproperties.in new file mode 100644 index 0000000..2eb9e7a --- /dev/null +++ b/WebKitTools/iExploder/htdocs/cssproperties.in @@ -0,0 +1,348 @@ +# From WebKit svn r24249 (WebCore/css/CSSPropertyNames.in) +-webkit-appearance +-webkit-background-clip +-webkit-background-composite +-webkit-background-origin +-webkit-background-size +-webkit-binding +-webkit-border-bottom-left-radius +-webkit-border-bottom-right-radius +-webkit-border-fit +-webkit-border-horizontal-spacing +-webkit-border-image +-webkit-border-radius +-webkit-border-top-left-radius +-webkit-border-top-right-radius +-webkit-border-vertical-spacing +-webkit-box-align +-webkit-box-direction +-webkit-box-flex +-webkit-box-flex-group +-webkit-box-lines +-webkit-box-ordinal-group +-webkit-box-orient +-webkit-box-pack +-webkit-box-shadow +-webkit-box-sizing +-webkit-column-break-after +-webkit-column-break-before +-webkit-column-break-inside +-webkit-column-count +-webkit-column-gap +-webkit-column-rule +-webkit-column-rule-color +-webkit-column-rule-style +-webkit-column-rule-width +-webkit-column-width +-webkit-columns +-webkit-dashboard-region +-webkit-font-size-delta +-webkit-highlight +-webkit-line-break +-webkit-line-clamp +-webkit-margin-bottom-collapse +-webkit-margin-collapse +-webkit-margin-start +-webkit-margin-top-collapse +-webkit-marquee +-webkit-marquee-direction +-webkit-marquee-increment +-webkit-marquee-repetition +-webkit-marquee-speed +-webkit-marquee-style +-webkit-match-nearest-mail-blockquote-color +-webkit-nbsp-mode +-webkit-padding-start +-webkit-rtl-ordering +-webkit-text-decorations-in-effect +-webkit-text-fill-color +-webkit-text-security +-webkit-text-size-adjust +-webkit-text-stroke +-webkit-text-stroke-color +-webkit-text-stroke-width +-webkit-user-drag +-webkit-user-modify +-webkit-user-select +background +background-attachment +background-color +background-image +background-position +background-position-x +background-position-y +background-repeat +border +border-bottom +border-bottom-color +border-bottom-style +border-bottom-width +border-collapse +border-color +border-left +border-left-color +border-left-style +border-left-width +border-right +border-right-color +border-right-style +border-right-width +border-spacing +border-style +border-top +border-top-color +border-top-style +border-top-width +border-width +bottom +caption-side +clear +clip +color +content +counter-increment +counter-reset +cursor +direction +display +empty-cells +float +font +font-family +font-size +font-stretch +font-style +font-variant +font-weight +height +left +letter-spacing +line-height +list-style +list-style-image +list-style-position +list-style-type +margin +margin-bottom +margin-left +margin-right +margin-top +max-height +max-width +min-height +min-width +opacity +orphans +outline +outline-color +outline-offset +outline-style +outline-width +overflow +overflow-x +overflow-y +padding +padding-bottom +padding-left +padding-right +padding-top +page +page-break-after +page-break-before +page-break-inside +position +quotes +resize +right +scrollbar-3dlight-color +scrollbar-arrow-color +scrollbar-darkshadow-color +scrollbar-face-color +scrollbar-highlight-color +scrollbar-shadow-color +scrollbar-track-color +size +table-layout +text-align +text-decoration +text-indent +text-line-through +text-line-through-color +text-line-through-mode +text-line-through-style +text-line-through-width +text-overflow +text-overline +text-overline-color +text-overline-mode +text-overline-style +text-overline-width +text-shadow +text-transform +text-underline +text-underline-color +text-underline-mode +text-underline-style +text-underline-width +top +unicode-bidi +vertical-align +visibility +white-space +widows +width +word-break +word-spacing +word-wrap +z-index + +# CSS3 properties - http://www.css3.info/preview/ +background-clip +background-origin +border-image +border-radius +box-shadow +box-sizing +column-count +column-gap +column-min-width +column-rule +column-rule-color +column-rule-style +column-rule-width +column-space-distribution +column-span +column-width +column-width-policy + +# All of the following are from khtml's cssproperties.in as of 19oct2004, but are no longer in WebKit +-khtml-border-horizontal-spacing +-khtml-border-vertical-spacing +-khtml-flow-mode +-khtml-marquee +-khtml-marquee-direction +-khtml-marquee-increment +-khtml-marquee-repetition +-khtml-marquee-speed +-khtml-marquee-style +-khtml-text-decoration-color +-khtml-user-input +scrollbar-base-color + +# Internet Explorer 6.0 - http://msdn.microsoft.com/workshop/author/css/reference/attributes.asp +filter:progid: +filter: +ime-mode +layout-flow +layout-grid +layout-grid-char +layout-grid-line +layout-grid-mode +layout-grid-type +line-break +overflow-x +overflow-y +pagebreakafter +pagebreakbefore +ruby-align +ruby-overhang +ruby-position +text-autospace +text-justify +text-kashida-space +text-underline-position +word-break +writing-mode +zoom + +# from http://msdn.microsoft.com/library/default.asp?url=/workshop/author/filter/reference/reference.asp +filter:progid:DXImageTransform.Microsoft.AlphaImageLoader( +filter:progid:DXImageTransform.Microsoft.Blur( +filter:progid:DXImageTransform.Microsoft.MotionBlur( +filter:progid:DXImageTransform.Microsoft.Gradient( +filter:progid:DXImageTransform.Microsoft.Pixelate( + +# From Mozilla Firefox CVS on 2006-04-15 (layout/style/nsCSSPropList.h) +# grep "^CSS_PROP" nsCSSPropList.h | grep -v "_SVG" |cut -d, -f1 | cut -d\( -f2 | sort +++ /tmp/moz Tue Apr 18 13:45:30 2006 +-moz-appearance +-moz-background-clip +-moz-background-inline-policy +-moz-background-origin +-moz-binding +-moz-border-bottom-colors +-moz-border-left-colors +-moz-border-radius +-moz-border-radius-bottomleft +-moz-border-radius-bottomright +-moz-border-radius-topleft +-moz-border-radius-topright +-moz-border-right-colors +-moz-border-top-colors +-moz-box-align +-moz-box-direction +-moz-box-flex +-moz-box-ordinal-group +-moz-box-orient +-moz-box-pack +-moz-box-sizing +-moz-column-count +-moz-column-gap +-moz-column-width +-moz-float-edge +-moz-force-broken-image-icon +-moz-image-region +-moz-margin-end +-moz-margin-start +-moz-outline-radius +-moz-outline-radius-bottomleft +-moz-outline-radius-bottomright +-moz-outline-radius-topleft +-moz-outline-radius-topright +-moz-padding-end +-moz-padding-start +-moz-user-focus +-moz-user-input +-moz-user-modify +-moz-user-select +-x-background-x-position +-x-background-y-position +azimuth +cue +cue-after +cue-before +elevation +font-size-adjust +margin-end-value +margin-left-ltr-source +margin-left-rtl-source +margin-left-value +margin-right-ltr-source +margin-right-rtl-source +margin-right-value +margin-start-value +marker +marker-offset +marks +padding-end-value +padding-left-ltr-source +padding-left-rtl-source +padding-left-value +padding-right-ltr-source +padding-right-rtl-source +padding-right-value +padding-start-value +pause +pause-after +pause-before +pitch +pitch-range +richness +speak +speak-header +speak-numeral +speak-punctuation +speech-rate +stress +voice-family +volume diff --git a/WebKitTools/iExploder/htdocs/cssvalues.in b/WebKitTools/iExploder/htdocs/cssvalues.in new file mode 100644 index 0000000..c19f78f --- /dev/null +++ b/WebKitTools/iExploder/htdocs/cssvalues.in @@ -0,0 +1,339 @@ +"Trebuchet MS",Verdana, Arial, Helvetica, sans-serif +#339933 !important !important !important +#9999999999999999999999999999999999999999999 +-5, -5, -5 +-9999% +-999999999999999999999999999% +-999999999999999999999999999em +-999999999999999999999999999px +-9999em +-9999px +-webkit-activelink +-webkit-auto +-webkit-baseline-middle +-webkit-body +-webkit-box +-webkit-center +-webkit-focus-ring-color +-webkit-inline-box +-webkit-left +-webkit-link +-webkit-marquee +-webkit-nowrap +-webkit-overlay +-webkit-right +-webkit-text +-webkit-xxx-large +0 +0 auto +0 fixed +2% +90000000000000000000000000000000000000000000% +9999999999999999999999 +99999999999999999999999999999999999999 auto +99999999999999999999999999999999999999999999px +999999px solid #fff +above +absolute +activeborder +activecaption +after-white-space +ahead +alternate +always +appworkspace +aqua +armenian +attr("ATTRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") +auto +avoid +background +backwards +baseline +below +bidi-override +black +blink +block +block clear +block width +block-axis +blue +bold +bolder +border +border-box +both +bottom +break-word +button +button-bevel +buttonface +buttonhighlight +buttonshadow +buttontext +capitalize +caption +captiontext +caret +center +checkbox +circle +cjk-ideographic +clip +clip:rect(-0px -2000000px -200000px -0px) +clip:rect(0px 2000000px 200000px 0px) +close-quote +collapse +compact +condensed +content +content-box +continuous +crop +cross +crosshair +cursive +dashed +decimal +decimal-leading-zero +default +disc +discard +dot-dash +dot-dot-dash +dotted +double +down +e-resize +element +ellipsis +embed +end +expanded +extra-condensed +extra-expanded +fantasy +fast +fixed +forwards +fuchsia +georgian +gray +graytext +green +grey +groove +hand +hebrew +help +helvetica, arial, Courier New, Courier, Mono, Blah, Blah, Blah +hidden +hide +higher +highlight +highlighttext +hiragana +hiragana-iroha +horizontal +icon +ignore +inactiveborder +inactivecaption +inactivecaptiontext +infinite +infobackground +infotext +inherit +initial +inline +inline-axis +inline-block +inline-table +inset +inside +intrinsic +invert +italic +justify +katakana +katakana-iroha +landscape +large +larger +left +level +lighter +lime +line-through +list-item +listbox +listitem +logical +loud +lower +lower-alpha +lower-greek +lower-latin +lower-roman +lowercase +ltr +marker +maroon +match +medium +menu +menulist +menulist-button +menulist-text +menulist-textfield +menutext +message-box +middle +min-intrinsic +mix +monospace +move +multiple +n-resize +narrower +navy +ne-resize +no-close +no-close-quote +no-open-quote +no-repeat +none +normal +normal !important +nowrap +nw-resize +oblique +olive +once +open-quote +orange +outset +outside +overline +padding +pointer +portrait +pre +pre-line +pre-wrap +purple +push-button +radio +read-only +read-write +read-write-plaintext-only +red +relative +repeat +repeat-x +repeat-y +reverse +rgb(9999999999, 999999999, 9999999999999) +ridge +right +round +rtl +run-in +s-resize +sans-serif +scroll +scrollbar +scrollbarbutton-down +scrollbarbutton-left +scrollbarbutton-right +scrollbarbutton-up +scrollbargripper-horizontal +scrollbargripper-vertical +scrollbarthumb-horizontal +scrollbarthumb-vertical +scrollbartrack-horizontal +scrollbartrack-vertical +se-resize +searchfield +searchfield-close +searchfield-results +semi-condensed +semi-expanded +separate +serif +show +silver +single +skip-white-space +slide +slider-horizontal +slider-vertical +sliderthumb-horizontal +sliderthumb-vertical +slow +small +small-caps +small-caption +smaller +solid +space +square +square-button +start +static +status-bar +stretch +sub +super +sw-resize +table +table-caption +table-cell +table-column +table-column-group +table-footer-group +table-header-group +table-row +table-row-group +teal +text +text-bottom +text-top +textfield +thick +thick dashed yellow +thick dotted blue +thin +threeddarkshadow +threedface +threedhighlight +threedlightshadow +threedshadow +top +transparent +ultra-condensed +ultra-expanded +underline +unfurl +up +upper-alpha +upper-latin +upper-roman +uppercase +vertical +visible +visual +w-resize +wait +wave +white +wider +window +windowframe +windowtext +x-large +x-small +xx-large +xx-small +yellow diff --git a/WebKitTools/iExploder/htdocs/htmlattrs.in b/WebKitTools/iExploder/htdocs/htmlattrs.in new file mode 100644 index 0000000..ad92384 --- /dev/null +++ b/WebKitTools/iExploder/htdocs/htmlattrs.in @@ -0,0 +1,259 @@ +# the following come from WebCore 2006-04-15 (WebKit/WebCore/html/HTMLNames.h) + +abbr +accept +accept_charset +accesskey +action +align +alink +alt +archive +autocomplete +autosave +axis +background +behavior +bgcolor +bgproperties +border +bordercolor +cellborder +cellpadding +cellspacing +challenge +char +charoff +charset +checked +cite +class +classid +clear +code +codebase +codetype +color +cols +colspan +compact +composite +content +contenteditable +coords +data +datetime +declare +defer +dir +direction +disabled +enctype +face +for +frame +frameborder +headers +height +hidden +href +hreflang +hspace +http_equiv +id +incremental +ismap +keytype +label +lang +language +left +leftmargin +link +longdesc +loop +marginheight +marginwidth +max +maxlength +mayscript +media +method +min +multiple +name +nohref +noresize +noshade +nowrap +object +onabort +onbeforecopy +onbeforecut +onbeforepaste +onbeforeunload +onblur +onchange +onclick +oncontextmenu +oncopy +oncut +ondblclick +ondrag +ondragend +ondragenter +ondragleave +ondragover +ondragstart +ondrop +onerror +onfocus +oninput +onkeydown +onkeypress +onkeyup +onload +onmousedown +onmousemove +onmouseout +onmouseover +onmouseup +onmousewheel +onpaste +onreset +onresize +onscroll +onsearch +onselect +onselectstart +onsubmit +onunload +pagex +pagey +placeholder +plain +pluginpage +pluginspage +pluginurl +precision +profile +prompt +readonly +rel +results +rev +rows +rowspan +rules +scheme +scope +scrollamount +scrolldelay +scrolling +selected +shape +size +span +src +standby +start +style +summary +tabindex +tableborder +target +text +title +top +topmargin +truespeed +type +usemap +valign +value +valuetype +version +vlink +vspace +width +wrap + +# was in khtml in 2004, but is no longer in WebCore +accept-charset +html +http-equiv +nosave +oversrc +unknown +visibility +z-index + +# From Mozilla CVS 2006-04-15 (mozilla/layout/style/xbl-marquee) +bounce +finish +onbounce +onfinish +onstart + + +# IE specific, from msdn.microsoft.com/workshop/author/dhtml/reference/properties +acceptcharset +allowtransparency +balance +choff +datafld +dataformatas +datapagesize +datasrc +dynsrc +framespacing +galleryimg +hidefocus +methods +scroll +units +urn +volume + +# From Mozilla CVS 2006-04-15 (mozilla/content/base/src/nsGkAtomList.h) +# To get these, I used: +# ggrep -r "Get.*Attr" * | perl -ne 'if (/nsHTMLAtoms::(\w+)/) { \ +# system("grep \\($1, content/base/src/nsGkAtomList.h"); }' \ +# | cut -d\" -f2 | sort -u +autocheck +base +bottommargin +event +font-weight +handler +layout +observer +ping +point-size +rightmargin +variable + +# events from Mozilla CVS 2006-04-15 (mozilla/content/base/src/nsGkAtomList.h) +# cat nsGkAtomList.h | grep GK_ATOM | cut -d\" -f2 | egrep "^on[a-z]+" +onzoom +onunderflow +ontext +onset +onpopupshown +onpopupshowing +onpopuphiding +onpopuphidden +onpaint +onpageshow +onpagehide +onoverflowchanged +onoverflow +onget +ondraggesture +ondragexit +ondragdrop +oncompositionstart +oncompositionend +oncommandupdate +oncommand +onclose diff --git a/WebKitTools/iExploder/htdocs/htmltags.in b/WebKitTools/iExploder/htdocs/htmltags.in new file mode 100644 index 0000000..acac8f3 --- /dev/null +++ b/WebKitTools/iExploder/htdocs/htmltags.in @@ -0,0 +1,128 @@ +# The following come from khtml's htmltags.in from 19oct2004 +# From WebCore svn tree, 2006-04-18 (WebKit/WebCore/html/HTMLNames.h) + +a +abbr +acronym +address +applet +area +b +base +basefont +bdo +big +blockquote +body +br +button +canvas +caption +center +cite +code +col +colgroup +dd +del +dfn +dir +div +dl +dt +em +embed +fieldset +font +form +frame +frameset +h1 +h2 +h3 +h4 +h5 +h6 +head +hr +html +i +iframe +image +img +input +ins +isindex +kbd +keygen +label +layer +legend +li +link +listing +map +marquee +menu +meta +nobr +noembed +noframes +nolayer +noscript +object +ol +optgroup +option +p +param +plaintext +pre +q +s +samp +script +select +small +span +strike +strong +style +sub +sup +table +tbody +td +textarea +tfoot +th +thead +title +tr +tt +u +ul +var +wbr +xmp + +# This was in khtml in 10-2004 +ilayer + +# Additions from Mozilla CVS, 2006-04-18. +# mozilla/parser/htmlparser/public/nsHTMLTagList.h +bgsound +blink +multicol +spacer + +# The following tags used to be in Mozilla in 10-2004, now removed +counter +endnote +parsererror +server +sound +sourcetext + +# From Internet Explorer - http://msdn.microsoft.com/workshop/author/html/reference/elements.asp +xml diff --git a/WebKitTools/iExploder/htdocs/htmlvalues.in b/WebKitTools/iExploder/htdocs/htmlvalues.in new file mode 100644 index 0000000..d54984f --- /dev/null +++ b/WebKitTools/iExploder/htdocs/htmlvalues.in @@ -0,0 +1,35 @@ +# Many of the following are from mangleme.cgi.c's make_up_value() function +# +* +_blank +_parent +_self +_top +about: +about:plugins +file: +http: +jar: +javascript: +left +top +%n%n%n%n%n +ftp: +right +wysiwyg: +bottom +none +ldap: +%i %i +999999999,9999999,999999999,9999999,999999999,9999999,999999999,9999999,9 +999999999,9999999,9 +999999999,9999999 +true +false +_SEARCH +javascript +off +on +vbscript +password +image diff --git a/WebKitTools/iExploder/htdocs/iexploder.cgi b/WebKitTools/iExploder/htdocs/iexploder.cgi new file mode 100755 index 0000000..89e099c --- /dev/null +++ b/WebKitTools/iExploder/htdocs/iexploder.cgi @@ -0,0 +1,45 @@ +#!/usr/bin/ruby +# iExploder - Generates bad HTML files to perform QA for web browsers. +# Developed for the Mozilla Foundation. +##################### +# +# Copyright (c) 2006 Thomas Stromberg <thomas%stromberg.org> +# +# This software is provided 'as-is', without any express or implied warranty. +# In no event will the authors be held liable for any damages arising from the +# use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software in a +# product, an acknowledgment in the product documentation would be appreciated +# but is not required. +# +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# +# 3. This notice may not be removed or altered from any source distribution. + +require 'cgi'; +require 'iexploder'; +require 'config'; + +### THE INTERACTION ################################## +ie = IExploder.new($HTML_MAX_TAGS, $HTML_MAX_ATTRS, $CSS_MAX_PROPS) +ie.readTagFiles() + +cgi = CGI.new("html4"); +ie.url=ENV['SCRIPT_NAME'] || '?' +ie.test_num = cgi.params['test'][0].to_i +ie.subtest_num = cgi.params['subtest'][0].to_i || 0 +ie.random_mode = cgi.params['random'][0] +ie.lookup_mode = cgi.params['lookup'][0] +ie.stop_num = cgi.params['stop'][0].to_i || 0 +ie.setRandomSeed + +cgi.out('type' => 'text/html') do + ie.buildPage() +end diff --git a/WebKitTools/iExploder/htdocs/iexploder.rb b/WebKitTools/iExploder/htdocs/iexploder.rb new file mode 100644 index 0000000..eee3e38 --- /dev/null +++ b/WebKitTools/iExploder/htdocs/iexploder.rb @@ -0,0 +1,337 @@ +# iExploder - Generates bad HTML files to perform QA for web browsers. +# Developed for the Mozilla Foundation. +##################### +# +# Copyright (c) 2006 Thomas Stromberg <thomas%stromberg.org> +# +# This software is provided 'as-is', without any express or implied warranty. +# In no event will the authors be held liable for any damages arising from the +# use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software in a +# product, an acknowledgment in the product documentation would be appreciated +# but is not required. +# +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# +# 3. This notice may not be removed or altered from any source distribution. + +$VERSION="1.3.2" + +class IExploder + attr_accessor :test_num, :subtest_num, :lookup_mode, :random_mode, :url + attr_accessor :offset, :lines, :stop_num + + def initialize(max_tags, max_attrs, max_props) + @htmlMaxTags = max_tags + @htmlMaxAttrs = max_attrs + @cssMaxProps = max_props + @mangledTagTotal = 0 + @stop_num = 0 + end + + def setRandomSeed + if @test_num > 0 + srand(@test_num) + else + srand + end + end + + + def readTagFiles + # These if statements are so that mod_ruby doesn't have to reload the files + # each time + + if (! @cssTags) + @cssTags = readTagFile('cssproperties.in'); + end + + if (! @htmlTags) + @htmlTags = readTagFile('htmltags.in'); + end + if (! @htmlAttr) + @htmlAttr = readTagFile('htmlattrs.in'); + end + + if (! @htmlValues) + @htmlValues = readTagFile('htmlvalues.in'); + end + + if (! @cssValues) + @cssValues = readTagFile('cssvalues.in'); + end + + end + + + def readTagFile(filename) + list = Array.new + File.new(filename).readlines.each { |line| + line.chop! + + # Don't include comments. + if (line !~ /^# /) && (line.length > 0) + list << line + end + } + return list + end + + # based on make_up_value, essentially. + def inventValue + value = rand(19); + case value + when 1..3 then return (@htmlValues[rand(@htmlValues.length)]) + when 4..5 then return (@htmlValues[rand(@htmlValues.length)] + inventValue()) + when 6 then return (@htmlValues[rand(@htmlValues.length)] + "//" + inventValue()) + when 7 then return '' + # this may return negative argument? + when 8..10 then return rand(255).chr * (rand(256)+8) + when 11 then return rand(255).chr * (rand(2048)+8) + when 12 then return "#" + rand(999999).to_s + when 13 then return rand(999999).to_s + "%" + when 14..15 then return "&" + rand(999999).to_s + ";" + # filters + when 16 then + return inventValue() + "=" + inventValue() + + # this my return undefined method + for nil:NilClass + when 17 then return inventValue() + "," + inventValue() + else + if rand(5) > 3 + return "-" + rand(999999).to_s + else + return rand(999999).to_s + end + end + end + + # based on make_up_value, essentially. + def inventCssValue(tag) + value = rand(23); + case value + when 1..10 then return @cssValues[rand(@cssValues.length)] + when 11 then return '' + when 12 then return rand(255).chr * (rand(8192)+8) + when 13 + length = rand(1024) + 8 + return (rand(255).chr * length) + " " + (rand(255).chr * length) + " " + (rand(255).chr * length) + when 14 then return (rand(255).chr * (rand(1024)+3)) + "px" + when 15 then return (rand(255).chr * (rand(1024)+3)) + "em" + when 16 then return "url(" + inventValue() + ")" + when 17..18 then return "#" + rand(999999999).to_s + when 19 then return "-" + rand(99999999).to_s + else return rand(99999999).to_s; + end + end + + + def mangleTag(tag) + @mangledTagTotal += 1 + out = '' + + # 20% chance of closing a tag instead of opening it. This + # still counts against @mangledTagTotal, however. + if rand(10) > 8 + out = "</" + tag + ">" + return out + end + + # we're opening it. + out = "<" + tag + + # forgot the space between the tag and the attributes + if rand(15) > 1 + out << ' ' + end + + attrNum = rand(@htmlMaxAttrs) + 1 + + 1.upto(attrNum) { + attr = @htmlAttr[rand(@htmlAttr.length)] + + out << attr + + # 7.5% of the time we skip the = sign. Don't prefix it + # if the attribute ends with a ( however. + + + if rand(15) > 1 + out << '=' + end + + # sometimes quote it, sometimes not. I doubt the importance + # of this test, but mangleme-1.2 added it, and adding more + # random-ness never hurt anything but time. I'll do it less often. + quote = rand(2) + if (quote > 1) + out << "\"" + end + + out << inventValue() + + # end the quote when you are done + if (quote > 1) + out << "\" " + end + + # 5% chance we skip the space at the end of the name + if rand(20) > 1 + out << ' ' + end + + } + + # CSS styles! + if rand(4) > 1 + out << " style=\"" + 1.upto(rand(@cssMaxProps)+1) { + out << @cssTags[rand(@cssTags.length)] + + # very small chance we let the tag run on. + if rand(50) > 1 + out << ": " + end + + out << inventCssValue(tag) + # we almost always put the ; there. + if rand(50) > 1 + out << '; ' + end + } + out << "\"" + end + + out << ">\n" + + # support our local troops! + if (@subtest_num > 0) && filterSubTest() + if tag =~ /html|body|head/ + return '<' + tag + '>' + else + return "<x-#@mangledTagTotal>\n" + end + else + return out + end + end + #end + + def filterSubTest() + result = 1 + if (@mangledTagTotal >= @offset) && (@mangledTagTotal < (@offset + @lines)) + result = nil + end + return result + end + + def nextTestNum() + if random_mode + n = rand(99999999) + else + if @test_num + n = @test_num + 1 + else + n = 1 + end + end + return n + end + + # If we are at line 30 with 8 extra lines, there is no point to try line 31 + # with 8 lines as well.. skip back to 1 and bump up the line count. + def nextSubTestNum() + if (@offset + @lines) > @htmlMaxTags + nextNum = ((@lines * 2 -1)) * @htmlMaxTags + else + nextNum = @subtest_num + 1 + end + return nextNum + end + + + def buildPage + if (! @test_num) || (@test_num < 1) + @test_num = 1 + end + next_num=nextTestNum() + @lines = @subtest_num.div(@htmlMaxTags) + 1 + @offset = @subtest_num.modulo(@htmlMaxTags) + + # building the HTML + bodyText = mangleTag('html') + bodyText << "\n<head>\n" + + # Only do redirects if lookup=1 has not been specified. + if (! @lookup_mode) && (@lines <= @htmlMaxTags) && (@stop_num != @test_num) + newpage = @url + "?" + if @subtest_num > 0 + newpage << "test=" << @test_num.to_s << "&subtest=" << nextSubTestNum().to_s + else + newpage << "test=" << next_num.to_s + end + + if @random_mode + newpage << "&random=1" + end + + if @stop_num > 0 + newpage << "&stop=" << @stop_num.to_s + end + + bodyText << "\t<META HTTP-EQUIV=\"Refresh\" content=\"0;URL=#{newpage}\">\n" + # use both techniques, because you never know how you might be corrupting yourself. + bodyText << "\t<script language=\"javascript\">setTimeout('window.location=\"#{newpage}\"', 1000);</script>\n" + end + + bodyText << "\t" << mangleTag('meta') + bodyText << "\t" << mangleTag('meta') + bodyText << "\t" << mangleTag('link') + + bodyText << "\t<title>[#@test_num] iExploder #{$VERSION} - #{inventValue()}</title>\n" + bodyText << "</head>\n\n" + + # What tags will we be messing with ###################### + tagList = [ 'body'] + + # we already have 5 tags? + 1.upto(@htmlMaxTags - 5 ) { tagList << @htmlTags[rand(@htmlTags.length)] } + + tagList.each { |tag| + bodyText << mangleTag(tag) + bodyText << inventValue() + "\n" + } + bodyText << "</body>\n</html>" + end +end + + + +if $0 == __FILE__ + max=ARGV[0].to_i + puts "testing #{max} tags" + test = IExploder.new(max, 5, 5) + test.readTagFiles() + test.test_num=1 + test.subtest_num=1 + counter=0 + test.lines=0 + + while test.lines < max + test.lines = test.subtest_num.div(max) + 1 + test.offset = test.subtest_num.modulo(max) + test.subtest_num=test.nextSubTestNum + counter = counter + 1 + puts "[#{counter}] subtest #{test.subtest_num} is #{test.lines} lines with #{test.offset} offset" + end + + puts "for #{max} tests, you will have #{counter} iterations until #{test.subtest_num}" +end + diff --git a/WebKitTools/iExploder/htdocs/index.html b/WebKitTools/iExploder/htdocs/index.html new file mode 100644 index 0000000..849bc6b --- /dev/null +++ b/WebKitTools/iExploder/htdocs/index.html @@ -0,0 +1,34 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <title>iExploder 1.3.2</title> +</head> +<body> +<h2>iExploder: Web Browser Quality Assurance Tester</h2> +<small>Written by <a href="http://toadstool.se/">Thomas Strömberg</a> for the +<a href="http://www.mozilla.org/firefox/">Mozilla FireFox</a> project</small> + + +<ul> + <li><a href="iexploder.cgi">Start test sequence from the beginning!</a></li> + <li><a href="iexploder.cgi?random=1">Start test sequence in random</a></li> + <li>Start testing from a test number: + <form method="get" action="iexploder.cgi" name="test"> + Test: <input size="9" name="test" value="1"> Subtest: <input size="2" name="subtest" value=""> + <input value="Start" type="submit"> + </form> + </li> + + <li>Lookup a single test number: + <form method="get" action="iexploder.cgi" name="test"> + <input type="hidden" name="lookup" value="1"> + Test: <input size="9" name="test" value="1"> Subtest: <input size="2" name="subtest" value=""> + <input value="Lookup" type="submit"></form> + </li> +</ul> + +If your browser crashes, please contact thomas%stromberg.org! + +</body> +</html> + diff --git a/WebKitTools/iExploder/htdocs/webserver.rb b/WebKitTools/iExploder/htdocs/webserver.rb new file mode 100755 index 0000000..5176172 --- /dev/null +++ b/WebKitTools/iExploder/htdocs/webserver.rb @@ -0,0 +1,75 @@ +#!/usr/bin/ruby +# iExploder - Generates bad HTML files to perform QA for web browsers. +# Developed for the Mozilla Foundation. +##################### +# +# Copyright (c) 2006 Thomas Stromberg <thomas%stromberg.org> +# +# This software is provided 'as-is', without any express or implied warranty. +# In no event will the authors be held liable for any damages arising from the +# use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software in a +# product, an acknowledgment in the product documentation would be appreciated +# but is not required. +# +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# +# 3. This notice may not be removed or altered from any source distribution. + +require 'webrick' +require 'iexploder'; +require 'config'; + +include WEBrick +### THE INTERACTION ################################## +$ie_preload = IExploder.new($HTML_MAX_TAGS, $HTML_MAX_ATTRS, $CSS_MAX_PROPS) +$ie_preload.readTagFiles() +$ie_preload.url='/iexploder.cgi' + +if ARGV[0] + port = ARGV[0].to_i +else + port = 2000 +end + +puts "* iExploder #{$VERSION} will be available at http://localhost:#{port}" +puts "* Max Tags: #$HTML_MAX_TAGS Max Attrs: #$HTML_MAX_ATTRS Max Props: #$CSS_MAX_PROPS" +puts + +s = HTTPServer.new( :Port => port ) +class IEServlet < HTTPServlet::AbstractServlet + def do_GET(req, res) + ie = $ie_preload.dup + ie.test_num = req.query['test'].to_i + ie.subtest_num = req.query['subtest'].to_i || 0 + ie.random_mode = req.query['random'] + ie.lookup_mode = req.query['lookup'] + ie.stop_num = req.query['stop'].to_i + ie.setRandomSeed + + res['Content-Type'] = 'text/html' + res.body = ie.buildPage() + end +end + +class IEForm < HTTPServlet::AbstractServlet + def do_GET(req, res) + res['Content-Type'] = 'text/html' + res.body = File.open("index.html").readlines.join("\n") + end +end + + + +s.mount("/iexploder.cgi", IEServlet) +s.mount("/", IEForm) +trap("INT") { s.shutdown } + +s.start diff --git a/WebKitTools/iExploder/tools/lasthit.rb b/WebKitTools/iExploder/tools/lasthit.rb new file mode 100755 index 0000000..b569deb --- /dev/null +++ b/WebKitTools/iExploder/tools/lasthit.rb @@ -0,0 +1,53 @@ +#!/usr/bin/ruby +# lasthit, part of iExploder +# +# Shows statistics about recent agents that have tested with iExploder. +# It takes all or part of an apache logfile via stdin, and outputs a list +# of all the agents who tested within that section, what their last test +# was, and how many tests they have done. + +# The usefulness is finding out where a browser crashed. + + +hostHash = Hash.new + +if (ARGV[0]) + file = File.open(ARGV[0]) +else + file = $stdin +end + +file.readlines.each { |line| + if (line =~ /^(.*?) .*iexploder.*?test=(\d+).* HTTP.* \"(.*?)\"$/) + host = $1 + testnum = $2 + agent = $3 + if (! hostHash[host]) + hostHash[host] = Hash.new + end + if (! hostHash[host][agent]) + hostHash[host][agent] = Hash.new + hostHash[host][agent]['total'] = 0 + end + + hostHash[host][agent]['last'] = testnum + if line =~ /subtest=(\d+)/ + hostHash[host][agent]['subtest'] = $1 + else + hostHash[host][agent]['subtest'] = '' + end + hostHash[host][agent]['total'] = hostHash[host][agent]['total'] + 1 + end +} + +printf("%14.14s | %8.8s | %3.3s | %8.8s | %s\n", + "IP", "Test", "SubTest", "Total", "Agent") +puts "---------------------------------------------------------------------------" +hostHash.each_key { |host| + + hostHash[host].each_key { |agent| + printf("%14.14s | %8.8s | %3.3s | %8.8s | %s\n", + host, hostHash[host][agent]['last'], hostHash[host][agent]['subtest'], hostHash[host][agent]['total'], agent); + } +} + diff --git a/WebKitTools/iExploder/tools/osx_last_crash.rb b/WebKitTools/iExploder/tools/osx_last_crash.rb new file mode 100755 index 0000000..5b62c6d --- /dev/null +++ b/WebKitTools/iExploder/tools/osx_last_crash.rb @@ -0,0 +1,48 @@ +#!/usr/bin/ruby +# Gives you information about the most recent crash for each application +# that has crashed within the last 2 days + +$LogDir=ENV['HOME'] + '/Library/Logs/CrashReporter' +$Days=1 +$StackCount=5 + +files=`find #$LogDir -mtime -#$Days -type f | grep -v synergy` +files.each { |filename| + filename.chop! + record = 0 + date='' + stackTrace = [] + + File.open(filename).readlines.each { |line| + #puts line + + if line =~ /^Date.*(200.*)/ + date = $1 + end + + if line =~ /^Thread \d+ Crashed/ + record = 1 + # reset the stack trace + stackTrace = [] + end + + if record + stackTrace << line + record = record + 1 + + # stop recording after $StackCount lines + if record > ($StackCount + 2) + record = nil + end + end + } + + puts File.basename(filename) + " - " + date + puts "===================================================" + stackTrace.each { |line| + puts line + } + puts "" +} + + diff --git a/WebKitTools/iExploder/tools/showtest.rb b/WebKitTools/iExploder/tools/showtest.rb new file mode 100755 index 0000000..af6b101 --- /dev/null +++ b/WebKitTools/iExploder/tools/showtest.rb @@ -0,0 +1,43 @@ +#!/usr/bin/ruby +# showtest.rb - simple CLI interface to grab a testcase +##################### +# +# Copyright (c) 2006 Thomas Stromberg <thomas%stromberg.org> +# +# This software is provided 'as-is', without any express or implied warranty. +# In no event will the authors be held liable for any damages arising from the +# use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software in a +# product, an acknowledgment in the product documentation would be appreciated +# but is not required. +# +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# +# 3. This notice may not be removed or altered from any source distribution. + +Dir.chdir('../htdocs') +require 'iexploder'; +require 'config'; + +### THE INTERACTION ################################## +ie = IExploder.new($HTML_MAX_TAGS, $HTML_MAX_ATTRS, $CSS_MAX_PROPS) +ie.readTagFiles() + +if ! ARGV[0] + puts "syntax: showtest.rb [test#] [subtest#]" + exit +end + +ie.test_num = ARGV[0].to_i +ie.subtest_num = ARGV[1].to_i || 0 +ie.lookup_mode = 1 +ie.setRandomSeed + +puts ie.buildPage() |