summaryrefslogtreecommitdiffstats
path: root/webkit/data/test_shell
diff options
context:
space:
mode:
authorinitial.commit <initial.commit@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-27 00:20:51 +0000
committerinitial.commit <initial.commit@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-27 00:20:51 +0000
commitf5b16fed647e941aa66933178da85db2860d639b (patch)
treef00e9856c04aad3b558a140955e7674add33f051 /webkit/data/test_shell
parent920c091ac3ee15079194c82ae8a7a18215f3f23c (diff)
downloadchromium_src-f5b16fed647e941aa66933178da85db2860d639b.zip
chromium_src-f5b16fed647e941aa66933178da85db2860d639b.tar.gz
chromium_src-f5b16fed647e941aa66933178da85db2860d639b.tar.bz2
Add webkit to the repository.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/data/test_shell')
-rw-r--r--webkit/data/test_shell/formsubmit/target_test.html11
-rw-r--r--webkit/data/test_shell/frames/iframe1.html211
-rw-r--r--webkit/data/test_shell/frames/iframe1_files/foo1.htm100
-rw-r--r--webkit/data/test_shell/frames/iframe1_files/foo1_data/vcss.gifbin0 -> 1547 bytes
-rw-r--r--webkit/data/test_shell/frames/iframe1_files/foo1_data/vxhtml10.pngbin0 -> 2414 bytes
-rw-r--r--webkit/data/test_shell/frames/iframe1_files/test.txt151
-rw-r--r--webkit/data/test_shell/frames/iframe1_files/w3c_home.gifbin0 -> 1865 bytes
-rw-r--r--webkit/data/test_shell/frames/iframe1_files/wai.gifbin0 -> 7748 bytes
-rw-r--r--webkit/data/test_shell/iframe_redirect/child.html8
-rw-r--r--webkit/data/test_shell/iframe_redirect/main.html12
-rw-r--r--webkit/data/test_shell/iframes/test1.html6
-rw-r--r--webkit/data/test_shell/iframes/test2.html6
-rw-r--r--webkit/data/test_shell/iframes/testiframe.html17
-rw-r--r--webkit/data/test_shell/iframes/testiframe2.html8
-rw-r--r--webkit/data/test_shell/index.html73
-rw-r--r--webkit/data/test_shell/js/timers.html61
-rw-r--r--webkit/data/test_shell/sort/sort-bubble.js23
-rw-r--r--webkit/data/test_shell/sort/sort-heap.js53
-rw-r--r--webkit/data/test_shell/sort/sort-insertion.js26
-rw-r--r--webkit/data/test_shell/sort/sort-quick.js34
-rw-r--r--webkit/data/test_shell/sort/sort.css53
-rw-r--r--webkit/data/test_shell/sort/sort.html99
-rw-r--r--webkit/data/test_shell/sort/sort.js348
-rw-r--r--webkit/data/test_shell/test.css39
24 files changed, 1339 insertions, 0 deletions
diff --git a/webkit/data/test_shell/formsubmit/target_test.html b/webkit/data/test_shell/formsubmit/target_test.html
new file mode 100644
index 0000000..8c47dfc
--- /dev/null
+++ b/webkit/data/test_shell/formsubmit/target_test.html
@@ -0,0 +1,11 @@
+<html><head></head><body>
+
+<form method="post" enctype="multipart/form-data" action="http://fishy/cgi-bin/echo-all" target="blah">
+ <input name="f" type="text">
+ <input value="Submit" type="submit">
+</form>
+
+<iframe style="border: 1px solid black;" name="blah" src="javascript:'the submission should go here'"></iframe>
+
+
+</body></html> \ No newline at end of file
diff --git a/webkit/data/test_shell/frames/iframe1.html b/webkit/data/test_shell/frames/iframe1.html
new file mode 100644
index 0000000..3c078d3
--- /dev/null
+++ b/webkit/data/test_shell/frames/iframe1.html
@@ -0,0 +1,211 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>Inline Frame Test</title>
+
+
+
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+
+<meta name="description" content="">
+
+<meta name="keywords" content="HTML, web accessibility, user agent, UA, UAWG, WCAG,
+Web Content Accessibility Guidelines, World Wide Web Consortium, W3C, WWW,
+disabilities, disabled, web access">
+
+<meta name="author" content="Gregory J. Rosmaita">
+
+<link rel="stylesheet" type="text/css" href="iframe1_files/test.txt">
+<link rev="made" href="mailto:w3c-wai-ua@w3.org?subject=UAAG%20IFRAME%20Test"></head><body>
+<a id="backtop" name="backtop"></a>
+
+<map id="navbar-top" name="navbar-top" title="Navigation Bar">
+<p id="banner"><a href="http://www.w3.org/" title="World Wide Web Consortium (W3C) Home"><img src="iframe1_files/w3c_home.gif" alt="World Wide Web Consortium (W3C)" height="48" width="72"></a>
+<span class="separator">|</span> <a href="http://www.w3.org/WAI/" rel="in-area" title="Web Accessibility Initiative (WAI) Home Page"><img alt="Web Accessibility Initiative" src="iframe1_files/wai.gif" height="48" width="212"></a>
+<span class="separator">|</span> <a href="http://www.w3.org/WAI/UA/" title="User Agent Accessibility Guidelines Working Group (UAWG)">User Agent Working Group (UAWG)</a>
+</p>
+</map>
+
+<div class="introduction" title="Explanation of the Purpose of This Test Page">
+
+<h1>Access to Content Contained in an Inline Frame (<abbr title="inline frame">IFRAME</abbr>)</h1>
+
+<h2><a name="test-object" id="test-object">What Is Being
+Tested?</a></h2>
+
+<p>
+This page contains an inline frame (<abbr title="inline frame">IFRAME</abbr>), which is used to embed another <acronym title="eXtensible HyperText Markup Language">XHTML</acronym> document
+into this document. If you are using a graphical browser, the inline
+frame should be scrollable. If you are using a frames-incapable browser
+(such as Lynx or NetTamer) or have support for frames turned off, you
+should still be able to <a href="#iframe">review the content contained
+in the IFRAME</a>, either inline (that is, in the body of this
+document), or by following a link.
+</p>
+
+<p>
+This document is part of a suite of pages designed to test the
+implementation of the <acronym title="World Wide Web Consortium">W3C</acronym>'s <a href="http://www.w3.org/TR/uaag10/">User Agent
+Accessibility Guidelines (UAAG)</a>. In particular, this page is
+designed to test implementation of <acronym title="User Agent Accessibility Guidelines">UAAG</acronym> checkpoints
+2.1 and 9.1. Note that the actual text of these checkpoints is
+contained in the <a href="#iframe">inline frame defined for this page</a>.
+</p>
+
+<!-- h2 --><!-- What Should Happen? --><!-- /h2 -->
+
+<!-- p -->
+<!-- You should be able to review the content of the inline frame defined
+for this page, even if your browser does not support inline frames, or
+if you have turned off support for frames. -->
+<!-- /p -->
+
+<!-- CONTINUE WITH: description of test:
+ markup used
+ expected action -->
+
+<!-- the HTML4 attribute &#34; --><!-- a href=""
+title="HTML 4.01 definition of the *** attribtute" --><!-- *** --><!-- /a --><!-- &#34;.
+On this test page, -->
+
+
+<h2><a name="feedback" id="feedback">How to Provide Feedback</a></h2>
+
+<p>
+Please <a href="mailto:w3c-wai-ua@w3.org?subject=UAAG%20IFRAME%20Test" title="send comments and observations about this test page">send comments and observations about this test page</a> to
+&lt;w3c-wai-ua@w3.org&gt;. Your comments will be archived in the
+mailing list's <a href="http://lists.w3.org/Archives/Public/w3c-wai-ua/" title="public hypertext archive for the User Agent mailing list">public hypertext archive</a>. Please make your observations as specific
+and detailed as possible. Be sure to include the following information
+when you report your observations to the User Agent Accessibility
+Guidelines Working Group:
+</p>
+
+<ol>
+ <li>operating system (including version/revision number)</li>
+
+ <li>assistive technology, if any (please include version number)</li>
+
+ <li>user agent name and version (<abbr title="that is" lang="la">i.e.</abbr>
+ <acronym title="Microsoft Internet Explorer">MSIE</acronym>, version
+ 5.00.2920.0000 update versions ;q254902)</li>
+
+ <li>any special settings (<abbr title="that is" lang="la">i.e.</abbr>
+ any changes you or your adaptive equipment made to your user agent's
+ default configuration)
+
+ </li><li><!-- PUT VERBIAGE DESCRIBING LIKELY SCENARIOS HERE -->
+ were you able to access the content contained in the inline frame?</li>
+
+ <li>how did your browser render the content of the <abbr title="inline frame">IFRAME</abbr>? Was the checkpoint text contained in a scrollable
+ sub-window, or was it displayed inline (<abbr title="that is" lang="la">i.e.</abbr>, as if the content obtained from the source of the <abbr title="inline frame">IFRAME</abbr> is part of this document?)</li>
+
+ <li>were you able to expose the content of the inline frame in a new viewport
+ (<abbr title="for example" lang="la">e.g. in a new "window")? if
+ so, how? Please be as specific as possible, listing all keystrokes, mouse
+ clicks, <abbr title="et cetera" lang="la">etc.</abbr></abbr></li>
+</ol>
+
+</div>
+
+<!-- IF ONE PAGE TEST, PLACE TEST OBJECT HERE -->
+<p align="center">
+<a name="iframe" id="iframe"></a>
+
+<iframe name="iframe-test" title="Inline Frame Test" src="iframe1_files/foo1.htm" align="bottom" frameborder="1" height="150" scrolling="auto" width="85%">
+
+&lt;dl class="checkpoint"&gt;
+
+&lt;dt class="checkpoint"&gt;&lt;span class="checkpoint"&gt;&lt;a id="tech-doc-content-access"
+name="tech-doc-content-access"&gt;2.1&lt;/a&gt;&lt;/span&gt; For all format specifications
+that the user agent &lt;a href="http://www.w3.org/TR/UAAG10/#def-implement" rel="glossary"
+title="Definition of implement"&gt;&lt;span class="dfn-instance"&gt;
+implements&lt;/span&gt;&lt;/a&gt;, make &lt;a href="http://www.w3.org/TR/UAAG10/#def-content" rel="glossary"
+title="Definition of Content"&gt;&lt;span class="dfn-instance"&gt;content&lt;/span&gt;&lt;/a&gt;
+available through the rendering processes described by those specifications.
+&lt;span class="priority1"&gt;[Priority&amp;nbsp;1]&lt;/span&gt; Content only.&lt;/dt&gt;
+
+&lt;dd class="checkpoint"&gt;&lt;strong&gt;Note:&lt;/strong&gt; This includes format-defined
+interactions between author preferences and user preferences/capabilities
+(e.g., when to render the "&lt;code&gt;alt&lt;/code&gt;" &lt;a href="http://www.w3.org/TR/UAAG10/#def-attribute"
+rel="glossary" title="Definition of Attribute"&gt;&lt;span class="dfn-instance"&gt;
+attribute&lt;/span&gt;&lt;/a&gt; in HTML &lt;cite&gt;&lt;a href="http://www.w3.org/TR/UAAG10/#ref-HTML4"
+title="Link to reference HTML4"&gt;[HTML4]&lt;/a&gt;&lt;/cite&gt;, the rendering order of
+nested &lt;code&gt;OBJECT&lt;/code&gt; elements in HTML, test attributes in SMIL &lt;cite&gt;&lt;a
+href="http://www.w3.org/TR/UAAG10/#ref-SMIL" title="Link to reference SMIL"&gt;[SMIL]&lt;/a&gt;&lt;/cite&gt;, and the
+cascade in CSS2 &lt;cite&gt;&lt;a href="http://www.w3.org/TR/UAAG10/#ref-CSS2" title="Link to reference CSS2"&gt;
+[CSS2]&lt;/a&gt;&lt;/cite&gt;). If a conforming user agent does not render a content type,
+it should allow the user to choose a way to handle that content (e.g., by
+launching another application, by saving it to disk, etc.). This checkpoint
+does not require that all content be available through each &lt;a
+href="http://www.w3.org/TR/UAAG10/#def-viewport" rel="glossary" title="Definition of viewports"&gt;&lt;span
+class="dfn-instance"&gt;viewport&lt;/span&gt;&lt;/a&gt;.&lt;/dd&gt;
+
+&lt;dd&gt;&lt;span class="noprint"&gt;&lt;a
+href="http://www.w3.org/WAI/UA/UAAG10-TECHS/guidelines.html#tech-doc-content-access"&gt;
+Techniques for checkpoint 2.1&lt;/a&gt;&lt;/span&gt;&lt;/dd&gt;
+
+&lt;dt class="checkpoint"&gt;&lt;span class="checkpoint"&gt;&lt;a id="tech-nav-viewports"
+name="tech-nav-viewports"&gt;9.1&lt;/a&gt;&lt;/span&gt; Allow the user to make the &lt;a
+href="http://www.w3.org/TR/UAAG10/#def-selection" rel="glossary" title="Definition of Selection"&gt;&lt;span
+class="dfn-instance"&gt;selection&lt;/span&gt;&lt;/a&gt; and &lt;a href="http://www.w3.org/TR/UAAG10/#def-focus"
+rel="glossary" title="Definition of Focus"&gt;&lt;span class="dfn-instance"&gt;
+focus&lt;/span&gt;&lt;/a&gt; of each &lt;a href="http://www.w3.org/TR/UAAG10/#def-viewport" rel="glossary"
+title="Definition of viewports"&gt;&lt;span class="dfn-instance"&gt;viewport&lt;/span&gt;&lt;/a&gt;
+(including frames) the &lt;a href="http://www.w3.org/TR/UAAG10/#def-current-selection" rel="glossary"
+title="Definition of current selection"&gt;&lt;span class="dfn-instance"&gt;current
+selection&lt;/span&gt;&lt;/a&gt; and &lt;a href="http://www.w3.org/TR/UAAG10/#def-current-focus" rel="glossary"
+title="Definition of current focus"&gt;&lt;span class="dfn-instance"&gt;current
+focus&lt;/span&gt;&lt;/a&gt;, respectively. &lt;span class="priority1"&gt;
+[Priority&amp;nbsp;1]&lt;/span&gt; User agent only.&lt;/dt&gt;
+
+&lt;dd class="checkpoint"&gt;&lt;strong&gt;Note:&lt;/strong&gt; For example, when all frames of a
+frameset are displayed side-by-side, allow the user (via the keyboard) to move
+the &lt;a href="http://www.w3.org/TR/UAAG10/#def-focus" rel="glossary" title="Definition of Focus"&gt;&lt;span
+class="dfn-instance"&gt;focus&lt;/span&gt;&lt;/a&gt; among them.&lt;/dd&gt;
+
+&lt;dd&gt;&lt;span class="noprint"&gt;&lt;a
+href="http://www.w3.org/WAI/UA/UAAG10-TECHS/guidelines.html#tech-nav-viewports"&gt;
+Techniques for checkpoint 9.1&lt;/a&gt;&lt;/span&gt;&lt;/dd&gt;
+
+&lt;/dl&gt;
+
+</iframe>
+</p>
+
+<hr title="End Test/Begin Terminal Index">
+
+<dl compact="compact">
+<dt class="return1">Terminal Index</dt>
+ <dd class="return2">1) <a href="http://www.hicom.net/%7Eoedipus/wai/ua/tests/index.html">Return to the User Agent Test
+ Suite's Index</a></dd>
+
+ <dd class="return2">2) <a href="http://www.hicom.net/%7Eoedipus/wai/ua/">User Agent Accessibility Guidelines
+ Working Group (UAWG)</a></dd>
+
+ <dd class="return2">3) <a href="mailto:w3c-wai-ua@w3.org?subject=UAAG%20IFRAME%20Test" title="mail comments and observations to the User Agent Working Group">send comments and observations to w3c-wai-ua@w3.org</a></dd>
+</dl>
+
+<hr title="Validation Information">
+
+<p class="validation">
+
+<a href="http://validator.w3.org/check/referer"><img src="foo1_data/vxhtml10.png" alt="W3C&nbsp;Validated&nbsp;XHTML&nbsp;1.0!" style="border: 0pt none ; width: 88px; height: 31px;"></a>
+
+&nbsp;&nbsp;&nbsp;
+
+<a href="http://jigsaw.w3.org/css-validator/validator-uri.html" title="Validate this page's stylesheet, courtesy of the W3C CSS Validation Service"><img style="border: 0pt none ; width: 88px; height: 31px;" src="foo1_data/vcss.gif" alt="W3C&nbsp;Validated&nbsp;CSS!"></a>
+</p>
+
+<hr title="Usage and Copyright Information">
+
+<p class="policyfooter">
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612.html#Copyright">Copyright</a>&nbsp;<abbr title="copyright symbol">©</abbr>&nbsp; 2001 <a href="http://www.w3.org/" title="World Wide Web Consortium"><acronym title="World Wide Web Consortium">W3C</acronym></a> (<a href="http://www.lcs.mit.edu/" title="Massachusetts Institute of Technology"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.inria.fr/" hreflang="fr" title="Institut National de Recherche en Informatique et en Automatique" lang="fr"><acronym title="Institut National de Recherche en Informatique et en Automatique" lang="fr">INRIA</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All
+Rights Reserved. <acronym title="World Wide Web Consortium">W3C</acronym>
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612.html#Legal_Disclaimer">liability,</a>
+<a href="http://www.w3.org/Consortium/Legal/ipr-notice-20000612.html#W3C_Trademarks">trademark</a>, <a href="http://www.w3.org/Consortium/Legal/copyright-documents-19990405.html">document use</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-software-19980720.html">software
+licensing</a> rules apply. Your interactions with this site are in accordance
+with our <a href="http://www.w3.org/Consortium/Legal/privacy-statement-20000612.html#Public">public</a> and <a href="http://www.w3.org/Consortium/Legal/privacy-statement-20000612.html#Members">Member</a> privacy statements.
+</p>
+
+</body></html> \ No newline at end of file
diff --git a/webkit/data/test_shell/frames/iframe1_files/foo1.htm b/webkit/data/test_shell/frames/iframe1_files/foo1.htm
new file mode 100644
index 0000000..0672f83
--- /dev/null
+++ b/webkit/data/test_shell/frames/iframe1_files/foo1.htm
@@ -0,0 +1,100 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>Inline Frame Test</title>
+
+
+
+
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+
+<meta name="description" content="This document contains the text of several
+UAAG checkpoints. It is intended to be displayed as an inline frame.">
+
+<meta name="keywords" content="HTML, web accessibility, user agent, UA, UAWG, WCAG,
+Web Content Accessibility Guidelines, World Wide Web Consortium, W3C, WWW,
+disabilities, disabled, web access">
+
+<meta name="author" content="Gregory J. Rosmaita">
+
+<link rel="stylesheet" type="text/css" href="iframe1_files/test.txt">
+
+<style type="text/css">
+<!--
+.source {
+ margin-right : 2%;
+ margin-left : 2%;
+ border-width : thin;
+ border-style : solid;
+ border-color : black;
+ color : black;
+ background : white;
+ padding : .5em;
+ font-size : 105%;
+ font-weight : bold;
+ }
+
+.indented { margin-left : 5%; margin-right : 5%; }
+ -->
+</style></head><body>
+
+<h1>Pertinent <acronym title="User Agent Accessibility Guidelines">UAAG</acronym> Checkpoints</h1>
+
+<p class="source">
+The source of the checkpoints reproduced in this test document is the
+<a href="http://www.w3.org/WAI/UA/WD-UAAG10-20010411/">11 May 2001
+Working Draft of the User Agent Accessibility Guidelines</a>:
+<br>
+<span class="indented">&lt;http://www.w3.org/WAI/UA/WD-UAAG10-20010411/&gt;</span>
+</p>
+
+<dl class="checkpoint">
+
+<dt class="checkpoint"><span class="checkpoint"><a id="tech-doc-content-access" name="tech-doc-content-access">2.1</a></span> For all format specifications
+that the user agent <a href="http://www.w3.org/TR/UAAG10/#def-implement" rel="glossary" title="Definition of implement"><span class="dfn-instance">
+implements</span></a>, make <a href="http://www.w3.org/TR/UAAG10/#def-content" rel="glossary" title="Definition of Content"><span class="dfn-instance">content</span></a>
+available through the rendering processes described by those specifications.
+<span class="priority1">[Priority&nbsp;1]</span> Content only.</dt>
+
+<dd class="checkpoint"><strong>Note:</strong> This includes format-defined
+interactions between author preferences and user preferences/capabilities
+(e.g., when to render the "<code>alt</code>" <a href="http://www.w3.org/TR/UAAG10/#def-attribute" rel="glossary" title="Definition of Attribute"><span class="dfn-instance">
+attribute</span></a> in HTML <cite><a href="http://www.w3.org/TR/UAAG10/#ref-HTML4" title="Link to reference HTML4">[HTML4]</a></cite>, the rendering order of
+nested <code>OBJECT</code> elements in HTML, test attributes in SMIL <cite><a href="http://www.w3.org/TR/UAAG10/#ref-SMIL" title="Link to reference SMIL">[SMIL]</a></cite>, and the
+cascade in CSS2 <cite><a href="http://www.w3.org/TR/UAAG10/#ref-CSS2" title="Link to reference CSS2">
+[CSS2]</a></cite>). If a conforming user agent does not render a content type,
+it should allow the user to choose a way to handle that content (e.g., by
+launching another application, by saving it to disk, etc.). This checkpoint
+does not require that all content be available through each <a href="http://www.w3.org/TR/UAAG10/#def-viewport" rel="glossary" title="Definition of viewports"><span class="dfn-instance">viewport</span></a>.</dd>
+
+<dd><span class="noprint"><a href="http://www.w3.org/WAI/UA/UAAG10-TECHS/guidelines.html#tech-doc-content-access">
+Techniques for checkpoint 2.1</a></span></dd>
+
+<dt class="checkpoint"><span class="checkpoint"><a id="tech-nav-viewports" name="tech-nav-viewports">9.1</a></span> Allow the user to make the <a href="http://www.w3.org/TR/UAAG10/#def-selection" rel="glossary" title="Definition of Selection"><span class="dfn-instance">selection</span></a> and <a href="http://www.w3.org/TR/UAAG10/#def-focus" rel="glossary" title="Definition of Focus"><span class="dfn-instance">
+focus</span></a> of each <a href="http://www.w3.org/TR/UAAG10/#def-viewport" rel="glossary" title="Definition of viewports"><span class="dfn-instance">viewport</span></a>
+(including frames) the <a href="http://www.w3.org/TR/UAAG10/#def-current-selection" rel="glossary" title="Definition of current selection"><span class="dfn-instance">current
+selection</span></a> and <a href="http://www.w3.org/TR/UAAG10/#def-current-focus" rel="glossary" title="Definition of current focus"><span class="dfn-instance">current
+focus</span></a>, respectively. <span class="priority1">
+[Priority&nbsp;1]</span> User agent only.</dt>
+
+<dd class="checkpoint"><strong>Note:</strong> For example, when all frames of a
+frameset are displayed side-by-side, allow the user (via the keyboard) to move
+the <a href="http://www.w3.org/TR/UAAG10/#def-focus" rel="glossary" title="Definition of Focus"><span class="dfn-instance">focus</span></a> among them.</dd>
+
+<dd><span class="noprint"><a href="http://www.w3.org/WAI/UA/UAAG10-TECHS/guidelines.html#tech-nav-viewports">
+Techniques for checkpoint 9.1</a></span></dd>
+
+</dl>
+
+<hr title="Validation Information">
+
+<p class="validation">
+
+<a href="http://validator.w3.org/check/referer"><img src="foo1_data/vxhtml10.png" alt="W3C&nbsp;Validated&nbsp;XHTML&nbsp;1.0!" style="border: 0pt none ; width: 88px; height: 31px;"></a>
+
+&nbsp;&nbsp;&nbsp;
+
+<a href="http://jigsaw.w3.org/css-validator/validator-uri.html" title="Validate this page's stylesheet, courtesy of the W3C CSS Validation Service"><img style="border: 0pt none ; width: 88px; height: 31px;" src="foo1_data/vcss.gif" alt="W3C&nbsp;Validated&nbsp;CSS!"></a>
+</p>
+
+</body></html> \ No newline at end of file
diff --git a/webkit/data/test_shell/frames/iframe1_files/foo1_data/vcss.gif b/webkit/data/test_shell/frames/iframe1_files/foo1_data/vcss.gif
new file mode 100644
index 0000000..020c75a
--- /dev/null
+++ b/webkit/data/test_shell/frames/iframe1_files/foo1_data/vcss.gif
Binary files differ
diff --git a/webkit/data/test_shell/frames/iframe1_files/foo1_data/vxhtml10.png b/webkit/data/test_shell/frames/iframe1_files/foo1_data/vxhtml10.png
new file mode 100644
index 0000000..2275ee6
--- /dev/null
+++ b/webkit/data/test_shell/frames/iframe1_files/foo1_data/vxhtml10.png
Binary files differ
diff --git a/webkit/data/test_shell/frames/iframe1_files/test.txt b/webkit/data/test_shell/frames/iframe1_files/test.txt
new file mode 100644
index 0000000..7ea493b
--- /dev/null
+++ b/webkit/data/test_shell/frames/iframe1_files/test.txt
@@ -0,0 +1,151 @@
+@media screen {
+body {
+ color : black;
+ background : white;
+ font-family : sans-serif;
+}
+
+.chk-summary { font-weight: bold }
+
+.dfn-instance { color: #00513D;
+ background: white;
+ font-style: italic ;
+}
+
+.indent { margin-left : 5%; }
+
+.introduction {
+ font-size : 105%;
+ margin-right : 2%;
+ margin-left : 2%;
+ border-width : thin;
+ border-style : solid;
+ border-color : black;
+ color : black;
+ background : white;
+ padding : .5em;
+}
+
+.markup-example { margin-left : 5%; }
+
+.nav {
+ margin-right : 10%;
+ margin-left : 10%;
+ font-weight : bold;
+ text-align : center;
+}
+
+.nav-bar-title {
+ text-align : center;
+ font-size : 110%;
+ font-family : sans-serif;
+ font-weight: normal;
+ color: #0050B2;
+ background : white;
+}
+
+.policyfooter { font-size : 80%; }
+
+.new { color:white; background:red; font-weight:bold; font-size:90%; }
+
+.priority1 { color:red; background:white; }
+
+.return1 { font-size : 105%; font-weight : bold; }
+
+.separator { display: none }
+
+.sub-navigation-bar { font-size:90%; font-weight:bold; margin-left:5%; }
+
+.test {
+ border-width : thin;
+ border-style : solid;
+ border-color : black;
+ color : black;
+ background : white;
+ padding : .75em;
+}
+
+.under-construction {
+ font-family : arial, sans-serif;
+ font-weight : bold;
+ font-size : 115%;
+ background : yellow;
+ color : inherit;
+ display : inline;
+ border-width: 2px;
+ border-style: solid;
+ width : 100%;
+ text-align : center;
+}
+
+.valid { font-size:105%; text-align:center; }
+a.link { color : #00008B; background : inherit; }
+a:active { color : red; background : inherit; }
+a:visited { color : purple; background : inherit; }
+a:hover { color : inherit; background : #FFA ; }
+
+dl.checkpoints { margin-left: 2em; margin-right: 2em; }
+
+dt.checkpoint { font-weight: normal; }
+
+dt.toc-intro { font-size : 1.25em; font-family : arial, sans-serif; font-weight : bold; }
+
+em { font-style : italic; }
+
+h1 {
+ text-align : center;
+ font-family : sans-serif;
+ font-weight: normal;
+ color: #0050B2;
+ background : white;
+}
+
+h2,h3 {
+ text-align : left;
+ font-family : sans-serif;
+ font-weight: normal;
+ color: #0050B2;
+ background : white;
+}
+
+h4,h5,h6 { color: #0050B2; background: white; font-weight: normal; }
+
+hr { color : black; background : white; }
+
+ol { counter-reset : item; }
+
+ol.li { display : block; }
+
+ol.li:before { content : counters(item, ".") ; counter-increment: item; }
+
+strong { font-weight : bold; }
+
+span.checkpoint { font-weight: bold; margin-top: .75em; }
+
+.checkpoint-nb { color: maroon; background: white; }
+}
+
+@media print {
+.noprint { display: none }
+}
+
+@media aural {
+.guideline { volume: loud ; pause-before: 20%; elevation: above }
+.markup-example { speak-punctuation: code; }
+
+span.checkpoint { richness: 75; }
+.example { speak-punctuation: code; }
+.off { speak: none; }
+.priority1 { volume: loud; }
+.dfn-instance { stress: 20; pitch: high; }
+
+cite.normref { volume: loud }
+
+h1 { stress: 25; richness: 90; }
+h2 { stress: 20; richness: 90; }
+h3 { stress: 15; richness: 90; }
+h4 { stress: 10; richness: 90; }
+h5 { stress: 7; richness: 90; }
+h6 { stress: 5; richness: 90; }
+
+}
diff --git a/webkit/data/test_shell/frames/iframe1_files/w3c_home.gif b/webkit/data/test_shell/frames/iframe1_files/w3c_home.gif
new file mode 100644
index 0000000..358488e
--- /dev/null
+++ b/webkit/data/test_shell/frames/iframe1_files/w3c_home.gif
Binary files differ
diff --git a/webkit/data/test_shell/frames/iframe1_files/wai.gif b/webkit/data/test_shell/frames/iframe1_files/wai.gif
new file mode 100644
index 0000000..77e5826
--- /dev/null
+++ b/webkit/data/test_shell/frames/iframe1_files/wai.gif
Binary files differ
diff --git a/webkit/data/test_shell/iframe_redirect/child.html b/webkit/data/test_shell/iframe_redirect/child.html
new file mode 100644
index 0000000..2f395bc
--- /dev/null
+++ b/webkit/data/test_shell/iframe_redirect/child.html
@@ -0,0 +1,8 @@
+<html>
+ <body>
+ <script>
+ if (window.layoutTestController)
+ layoutTestController.notifyDone();
+ </script>
+ </body>
+</html>
diff --git a/webkit/data/test_shell/iframe_redirect/main.html b/webkit/data/test_shell/iframe_redirect/main.html
new file mode 100644
index 0000000..9966264
--- /dev/null
+++ b/webkit/data/test_shell/iframe_redirect/main.html
@@ -0,0 +1,12 @@
+<html>
+ <body>
+ <iframe id='ifr'>
+ </iframe>
+ <script>
+ if (window.layoutTestController)
+ layoutTestController.waitUntilDone();
+ var ifr = document.getElementById('ifr');
+ ifr.contentWindow.document.location = "child.html";
+ </script>
+ </body>
+</html>
diff --git a/webkit/data/test_shell/iframes/test1.html b/webkit/data/test_shell/iframes/test1.html
new file mode 100644
index 0000000..056af2a
--- /dev/null
+++ b/webkit/data/test_shell/iframes/test1.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+<iframe style="margin: 2em;" width="650" height="550" src="http://www.hicom.net/~oedipus/wai/ua/tests/iframe1.html"></iframe>
+</body>
+</html>
+
diff --git a/webkit/data/test_shell/iframes/test2.html b/webkit/data/test_shell/iframes/test2.html
new file mode 100644
index 0000000..ef7e61f
--- /dev/null
+++ b/webkit/data/test_shell/iframes/test2.html
@@ -0,0 +1,6 @@
+<html>
+<body>
+<iframe style="margin: 2em;" width="650" height="550" src="https://bugzilla.mozilla.org/query.cgi"></iframe>
+</body>
+</html>
+
diff --git a/webkit/data/test_shell/iframes/testiframe.html b/webkit/data/test_shell/iframes/testiframe.html
new file mode 100644
index 0000000..7987b24
--- /dev/null
+++ b/webkit/data/test_shell/iframes/testiframe.html
@@ -0,0 +1,17 @@
+<HTML>
+<HEAD>
+<TITLE>IFRAME test</TITLE>
+</HEAD>
+<BODY bgcolor=green>
+<iframe
+ style = 'margin: 100px;'
+ src = 'testiframe2.html'
+ width = '300'
+ height = '300'
+ marginwidth = '0'
+ marginheight = '0'
+ frameborder = '0'
+ scrolling = 'no'></iframe>
+</iframe>
+</BODY>
+</HTML>
diff --git a/webkit/data/test_shell/iframes/testiframe2.html b/webkit/data/test_shell/iframes/testiframe2.html
new file mode 100644
index 0000000..f14ad65
--- /dev/null
+++ b/webkit/data/test_shell/iframes/testiframe2.html
@@ -0,0 +1,8 @@
+<HTML>
+<HEAD>
+<TITLE>IFRAME test</TITLE>
+</HEAD>
+<BODY bgcolor=red>
+<h1>Inside the frame</h1>
+</BODY>
+</HTML>
diff --git a/webkit/data/test_shell/index.html b/webkit/data/test_shell/index.html
new file mode 100644
index 0000000..eac2757
--- /dev/null
+++ b/webkit/data/test_shell/index.html
@@ -0,0 +1,73 @@
+<html>
+<head>
+<link rel="stylesheet" href="test.css" type="text/css"/>
+</head>
+
+<body>
+
+<div id="title">
+<img src="http://www.google.com/intl/en/images/logo.gif" alt="Face">
+<div style="font-size: 24px; text-align: center; border: solid blue" contenteditable="true">Chrome Tests</div>
+</div>
+
+<div id="rightcol">
+ <div class="group">
+ <h1 style="background: blue;">Plugin Tests</h1>
+ <li><a href="plugins/embed.htm">Basic Flash Plugin test</a>
+ <li><a href="plugins/embed2.htm">Nested Frame Plugin Test</a>
+ <li><a href="plugins/embed3.htm">Many Windowed Plugins test</a>
+ <li><a href="plugins/embed4.htm">One Flash Plugin test</a>
+ <li><a href="plugins/embed5.htm">Flash using 100% CPU</a>
+ <li><a href="plugins/embedwindowless.htm">Windowless Plugin Test</a>
+ <li><a href="plugins/embedwindowless2.htm">Windowless Plugin Test 2</a>
+ <li><a href="plugins/embedwindowless3.htm">Many Windowless Plugins Test</a>
+ <li><a href="plugins/jsflash.htm">Javascript object</a>
+ <li><a href="plugins/js_call.html">Plugin calling Javascript functions</a>
+ <li><a href="plugins/wmp.html">Windows Media Player</a>
+ </div>
+ <div class="group">
+ <h1 style="background: red;">Scrolling Tests</h1>
+ <li><a href="scrollbar/test.html">Overflow Div scrolling</a>
+ <li><a href="frames/nested_test.html">Nested frames</a>
+ </div>
+ <div class="group">
+ <h1 style="background: #cccc00;">WebKit Tests</h1>
+ <li><a href="../layout_tests">Layout Tests</a>
+ </div>
+</div>
+
+<div id="leftcol">
+ <div class="group">
+ <h1 style="background: green;">External Links</h1>
+ <li><a href="http://www.google.com/">Google</a>
+ <li><i>Do not put non-Google links here since the referrer will leak, and your path may have revealing information.</i>
+ </div>
+
+ <div class="group">
+ <h1>Form Tests</h1>
+ <li><a href="formsubmit/target_test.html">Posting to a target</a>
+ </div>
+
+ <div class="group">
+ <h1 style="background: purple;">JS Tests</h1>
+ <li><a href="js/timers.html">JS Timer speed</a>
+ <li><a href="sort/sort.html">Sorting in Action</a>
+ </div>
+
+ <div class="group">
+ <h1 style="background: #cccc00;">IFrame Tests</h1>
+ <li><a href="iframes/test1.html">IFrame containing w3c page</a>
+ <li><a href="iframes/test2.html">IFrame contining bugzilla</a>
+</div>
+
+<div id="footer">
+<hr>
+<b>What is this page?</b> This is just a collection of links to test cases.
+If you ever find yourself creating a test webpage, add a test
+here. It isn't an automated test, but may be useful later. Try to
+keep the order logical.
+</div>
+
+
+</body>
+</html>
diff --git a/webkit/data/test_shell/js/timers.html b/webkit/data/test_shell/js/timers.html
new file mode 100644
index 0000000..2841e2f
--- /dev/null
+++ b/webkit/data/test_shell/js/timers.html
@@ -0,0 +1,61 @@
+<html>
+<head>
+<script language="javascript">
+var last = new Date(); // The last time we sampled the timer
+var total_value = 0; // The sum of the intervals measured
+var total_count = 0; // The count of the intervals measured
+var last_interval = 1;
+function fire() {
+
+ var current = new Date();
+ var ms = current - last;
+
+ total_value += ms;
+ total_count++;
+
+ // Display the interval output.
+ var output = document.getElementById('output');
+ output.innerHTML = ms + "ms";
+
+ // Display the average output.
+ var average = document.getElementById('average');
+ average.innerHTML = total_value / total_count + "ms";
+
+ // Get the new interval from the input.
+ var input = document.getElementById('input');
+
+ // If the interval has changed, reset our averages.
+ if (input.value != last_interval) {
+ total_value = 0;
+ total_count = 0;
+ }
+ last_interval = input.value;
+
+ last = new Date();
+ setTimeout(fire, last_interval);
+}
+</script>
+</head>
+
+<body onload='setTimeout("fire()", 1)'>
+
+<h1>Test JS setTimeout() speed</h1>
+
+This page tests the frequency of setTimeout() in the browser.
+Javascript applications use setTimeout() as a mechanism to 'yield'
+to the browser so that the browser can repaint. Most browsers
+implement a 15ms setTimeout() minimum. Use this to page to measure
+setTimeout() lag and discover your browser's minimum interval.<P>
+
+<hr>
+
+Desired ms to delay: <input id="input" type="text" value="1"><P>
+
+Measured delay:<br>
+<ul>
+instance: <div id="output"></div>
+average: <div id="average"></div>
+</ul>
+
+</body>
+</html>
diff --git a/webkit/data/test_shell/sort/sort-bubble.js b/webkit/data/test_shell/sort/sort-bubble.js
new file mode 100644
index 0000000..dc084ba
--- /dev/null
+++ b/webkit/data/test_shell/sort/sort-bubble.js
@@ -0,0 +1,23 @@
+// bubble sort
+
+function sort_bubble(sort, x, y) {
+ if (arguments.length == 1) {
+ x = 1; y = 0;
+ }
+ var len = sort.bars.length;
+ if (x < len && y < len) {
+ if (sort.compare(x, y) < 0) {
+ sort.swap(x, y);
+ }
+ y++;
+ if (y == x) {
+ y = 0;
+ x++;
+ }
+ if (x < len) {
+ sort.add_work(function() { sort_bubble(sort, x, y); });
+ return;
+ }
+ }
+}
+
diff --git a/webkit/data/test_shell/sort/sort-heap.js b/webkit/data/test_shell/sort/sort-heap.js
new file mode 100644
index 0000000..6a1bf5d
--- /dev/null
+++ b/webkit/data/test_shell/sort/sort-heap.js
@@ -0,0 +1,53 @@
+// heapsort
+
+function sort_heap(sort, end) {
+ if (arguments.length == 1) {
+ var mid = Math.floor(sort.size/2 - 1);
+ sort.add_work(function() { build_heap(sort, mid); }, "build_heap");
+ } else if (end > 0) {
+ sort.swap(end, 0);
+ end--;
+ sort.add_work(function() { sort_heap(sort, end); }, "sort_heap");
+ sort.add_work(function() { sift_down(sort, 0, end, 0); }, "sift_down");
+ }
+}
+
+function build_heap(sort, start) {
+ if (start >= 0) {
+ sort.add_work(function() { build_heap(sort, start-1); }, "build_heap");
+ sort.add_work(function() { sift_down(sort, start, sort.size-1, start); },
+ "sift_down");
+ } else {
+ sort.add_work(function() { sort_heap(sort, sort.size-1); },
+ "sort_heap");
+ }
+}
+
+function sift_down(sort, start, end, root) {
+ var child = root * 2 + 1;
+ if (child <= end) {
+ if (child < end && sort.compare(child, child + 1) < 0) {
+ child++;
+ }
+ if (sort.compare(root, child) < 0) {
+ sort.swap(root, child);
+ root = child;
+ sort.add_work(function() { sift_down(sort, start, end, root); },
+ "sift_down");
+ }
+ }
+}
+
+function validate_heap(sort) {
+ var i = Math.floor(sort.size/2 - 1);
+ while (i >= 0) {
+ child = i * 2 + 1;
+ if (sort.compare(i, child) < 0)
+ return 0;
+ if (child + 1 < sort.size)
+ if (sort.compare(i, child + 1) < 0)
+ return 0;
+ i--;
+ }
+ return 1;
+}
diff --git a/webkit/data/test_shell/sort/sort-insertion.js b/webkit/data/test_shell/sort/sort-insertion.js
new file mode 100644
index 0000000..188819c
--- /dev/null
+++ b/webkit/data/test_shell/sort/sort-insertion.js
@@ -0,0 +1,26 @@
+// insertion sort
+
+function sort_insertion(sort, x, y) {
+ if (arguments.length == 1 || x == undefined) {
+ x = 1; y = 1;
+ }
+ var len = sort.bars.length;
+ if (x < len && y > 0) {
+ if (sort.compare(y, y - 1) < 0) {
+ sort.swap(y, y - 1);
+ y--;
+ if (y == 0) {
+ x++;
+ y = x;
+ }
+ } else {
+ x++;
+ y = x;
+ }
+ if (x < len) {
+ sort.add_work(function () { sort_insertion(sort, x, y); });
+ return;
+ }
+ }
+}
+
diff --git a/webkit/data/test_shell/sort/sort-quick.js b/webkit/data/test_shell/sort/sort-quick.js
new file mode 100644
index 0000000..40d3804
--- /dev/null
+++ b/webkit/data/test_shell/sort/sort-quick.js
@@ -0,0 +1,34 @@
+// quicksort
+
+function sort_quick(sort, left, right) {
+ if (arguments.length == 1) {
+ left = 0;
+ right = sort.size - 1;
+ }
+ if (left < right) {
+ var pivot = left + Math.floor(Math.random()*(right-left));
+ //var pivot = Math.floor(left + (right-left)/2);
+ partition(sort, left, right, pivot);
+ }
+}
+
+function partition(sort, left, right, pivot) {
+ sort.swap(pivot, right);
+ sort.add_work(function(){partition_step(sort, left, right, pivot, left, left);});
+}
+
+function partition_step(sort, left, right, pivot, i, j) {
+ if (i < right) {
+ if (sort.compare(i, right) <= 0) {
+ sort.swap(i, j);
+ j++;
+ }
+ i++;
+ sort.add_work(function(){partition_step(sort, left, right, pivot, i, j)});
+ } else {
+ sort.swap(j, right);
+ sort.add_work(function(){sort_quick(sort, left, j-1)});
+ sort.add_work(function(){sort_quick(sort, j+1, right)});
+ }
+}
+
diff --git a/webkit/data/test_shell/sort/sort.css b/webkit/data/test_shell/sort/sort.css
new file mode 100644
index 0000000..c344853
--- /dev/null
+++ b/webkit/data/test_shell/sort/sort.css
@@ -0,0 +1,53 @@
+body {
+ font-family: Consolas, monospace;
+ font-size: 12px;
+}
+
+ul.bar {
+ position: relative;
+ width: 900px;
+ height: 200px;
+ background: gray;
+ border: 2px solid silver;
+}
+ul.bar li {
+ position: absolute;
+ bottom: 0px;
+ width: 5px;
+ list-style: none;
+ margin: 0px;
+ padding: 0px;
+ z-index: 2;
+ border: 1px solid black;
+ border-bottom: 0px;
+ background: green;
+}
+
+ul.bar .label {
+ position: absolute;
+ top: 5px;
+ left: 5px;
+ background: none;
+}
+
+li.compare {
+ border: white;
+ width: 10px;
+}
+
+li.compare {
+ background-color: red;
+}
+
+.button {
+ border: 1px dashed silver;
+ padding: 2px;
+ margin: 2px;
+ display: inline;
+}
+
+.button:hover {
+ text-decoration:underline;
+ cursor: pointer;
+ background-color: silver;
+}
diff --git a/webkit/data/test_shell/sort/sort.html b/webkit/data/test_shell/sort/sort.html
new file mode 100644
index 0000000..fe1ab42
--- /dev/null
+++ b/webkit/data/test_shell/sort/sort.html
@@ -0,0 +1,99 @@
+<html>
+<head>
+<title>Sorting in action</title>
+
+<link rel=stylesheet href="sort.css" type="text/css">
+
+<script src="sort.js"></script>
+<script src="sort-bubble.js"></script>
+<script src="sort-insertion.js"></script>
+<script src="sort-quick.js"></script>
+<script src="sort-heap.js"></script>
+
+<script>
+var sorts = new Array();
+sorts.push(new Sort("Bubble", sort_bubble));
+sorts.push(new Sort("Insertion", sort_insertion));
+sorts.push(new Sort("Quick", sort_quick));
+sorts.push(new Sort("Heap", sort_heap));
+
+
+function init() {
+ function starter(sort) {
+ return function(){sort.start();};
+ }
+ for (var i = 0; i < sorts.length; i++) {
+ var sort = sorts[i];
+ sort.init();
+ var graph = document.getElementById(sort.name);
+ graph.onclick = starter(sort);
+ }
+ var inner_loop = document.getElementById("inner_loop");
+ inner_loop.checked = inner_loop_enabled != 0;
+}
+
+function start_all() {
+ for (var i = 0; i < sorts.length; i++) {
+ sorts[i].start();
+ }
+}
+
+function reset_all() {
+ for (var i = 0; i < sorts.length; i++) {
+ sorts[i].reset();
+ }
+}
+
+function change_size(val) {
+ size = val;
+ reset_all();
+}
+
+function enable_inner_loop(enabled) {
+ if (enabled) {
+ inner_loop_enabled = 1;
+ } else {
+ inner_loop_enabled = 0;
+ }
+}
+
+</script>
+</head>
+<body onload="init();">
+
+
+<div id="sort_container" style="border: 0px solid black; margin: 0px">
+<div>
+<div class="button" onclick="start_all();">Start All</div>
+<div class="button" onclick="reset_all();">Reset All</div>
+...or click on each algorithm to start separately
+<div style="float:right">
+<b>Size</b><input onchange="change_size(this.value);" id="size" value=300 size=3>
+<b>Inner Loop</b><input id="inner_loop" type="checkbox" onchange="enable_inner_loop(this.checked);" id="inner loop">
+</div>
+</div>
+
+<div>
+<ul id="Heap" class="bar">
+</ul>
+</div>
+
+<div>
+<ul id="Quick" class="bar">
+</ul>
+</div>
+
+<div>
+<ul id="Bubble" class="bar">
+</ul>
+</div>
+
+<div>
+<ul id="Insertion" class="bar">
+</ul>
+</div>
+
+</div>
+
+</body>
+</html>
diff --git a/webkit/data/test_shell/sort/sort.js b/webkit/data/test_shell/sort/sort.js
new file mode 100644
index 0000000..d879718
--- /dev/null
+++ b/webkit/data/test_shell/sort/sort.js
@@ -0,0 +1,348 @@
+// sort object
+
+var manual = 0; // single stepping
+var interval_time = 0; // setTimeout interval
+var inner_loop_enabled = 1; // should the stepper iterate a little during each step
+
+// number of elements
+var size = 300;
+var query = window.location.search.substring(1);
+var params = query.split('&');
+for (var i = 0; i < params.length; i++) {
+ var pos = params[i].indexOf('=');
+ var key = params[i].substring(0, pos);
+ var val = params[i].substring(pos+1);
+ if (key == "size") {
+ var sz = parseInt(val);
+ size = Math.max(sz, 3);
+ size = Math.min(1000, size);
+ }
+}
+
+var log;
+function log(msg) {
+ if (window.console != undefined) {
+ window.console.log(msg);
+ }
+}
+
+function Sort(name, func) {
+ this.name = name;
+ this.func = func;
+ this.size = size;
+ this.compare_x = null;
+ this.compare_y = null;
+ this.compares = 0;
+ this.swap_x = null;
+ this.swap_y = null;
+ this.swaps = 0;
+ this.start_time = 0;
+ this.stop_time = 0;
+ this.work_queue = new Array();
+ this.timer = 0;
+ this.last_time = 0;
+ this.num_iterations = 0;
+ this.num_jobs = 0;
+ this.overhead_total = 0;
+ this.overhead_min = 1000000;
+ this.overhead_max = 0;
+ this.processing_total = 0;
+ this.processing_min = 1000000;
+ this.processing_max = 0;
+ this.step_min = 1000000;
+ this.step_max = 0;
+
+ this.setup();
+}
+
+Sort.prototype.setup = function() {
+ this.size = size;
+ this.bars = new Array(this.size);
+ this.numbers = new Array(this.size);
+ for (i = 0; i < this.size; i++) {
+ this.numbers[i] = i + 1;
+ }
+ for (i = 0; i < this.size; i++) {
+ var r = Math.floor(Math.random() * this.numbers.length);
+ if (i != r) {
+ var tmp = this.numbers[i];
+ this.numbers[i] = this.numbers[r];
+ this.numbers[r] = tmp;
+ }
+ }
+}
+
+Sort.prototype.status = function(str) {
+ var label = document.getElementById(this.name + "_label");
+ label.innerHTML = "<b>" + this.name + " Sort</b><br />" + str;
+}
+
+Sort.prototype.stepper = function() {
+ if (!manual) {
+ var sort = this;
+ this.timer = setTimeout(function(){sort.stepper();},interval_time);
+ }
+ var t = new Date();
+ var overhead = t - this.last_time;
+ this.overhead_total += overhead;
+ this.overhead_min = Math.min(this.overhead_min, overhead);
+ this.overhead_max = Math.max(this.overhead_max, overhead);
+ this.last_time = t;
+
+ var elapsed = t - this.start_time;
+ var avg =
+ Math.floor((elapsed - this.processing_total) / this.num_iterations);
+ this.status("Overhead: " + avg + "ms");
+
+ var ops = 0;
+ for (;;) {
+ var count = this.work_queue.length;
+ if (count > 0) {
+ var func = this.work_queue.pop();
+ if (func.status != undefined) {
+ //this.status(func.status);
+ }
+ ops++;
+ this.num_jobs++;
+ func();
+ } else {
+ break;
+ }
+ if (manual || inner_loop_enabled == 0) {
+ break;
+ }
+ t = new Date();
+ // If any measurable time has passed, we're good.
+ // Since the Date has a resolution of 15ms on Windows
+ // there's no way to differentiate accurately for anything
+ // less than that. We don't want to process for longer than
+ // the timer interval anyway (which is about 10ms), so this
+ // is fine.
+ // NOTE: on non-windows platforms, this actually does matter since
+ // their timer resolution is higher
+ // TODO(erikkay): make this a parameter
+ if (t - this.last_time > 10) {
+ break;
+ }
+ }
+ var processing = t - this.last_time;
+ this.processing_min = Math.min(this.processing_min, processing);
+ this.processing_max = Math.max(this.processing_max, processing);
+ this.processing_total += processing;
+ var step_time = processing + overhead;
+ this.step_min = Math.min(this.step_min, step_time);
+ this.step_max = Math.max(this.processing_max, step_time);
+ this.num_iterations++;
+ this.last_time = new Date();
+
+ if (ops == 0) {
+ this.finished();
+ }
+}
+
+Sort.prototype.add_work = function(work, name) {
+ if (name != undefined) {
+ work.status = name;
+ }
+ this.work_queue.push(work);
+}
+
+Sort.prototype.init = function() {
+ this.print();
+ this.status("");
+}
+
+Sort.prototype.reset = function() {
+ this.stop();
+ this.start_time = 0;
+ this.stop_time = 0;
+ this.setup();
+ this.print();
+}
+
+Sort.prototype.start = function() {
+ if (this.start_time > 0) {
+ if (this.stop_time > 0) {
+ this.shuffle();
+ this.start_time = 0;
+ this.stop_time = 0;
+ this.status("");
+ return;
+ } else if (manual) {
+ this.stepper();
+ return;
+ } else {
+ this.finished();
+ return;
+ }
+ }
+ if (!manual) {
+ var t = this;
+ this.timer = setTimeout(function(){t.stepper();},interval_time);
+ }
+ this.compares = 0;
+ this.swaps = 0;
+ this.start_time = (new Date()).getTime();
+ this.last_time = this.start_time;
+ this.num_jobs = 0;
+ this.stop_time = 0;
+ this.overhead_total = 0;
+ this.overhead_min = 1000000;
+ this.overhead_max = 0;
+ this.processing_total = 0;
+ this.processing_min = 1000000;
+ this.processing_max = 0;
+ this.num_iterations = 0;
+ this.func(this);
+}
+
+Sort.prototype.cleanup = function() {
+ if (this.compare_x) {
+ this.compare_x.style.borderColor = "black";
+ this.compare_y.style.borderColor = "black";
+ }
+ if (this.swap_x) {
+ this.swap_x.style.backgroundColor = "green";
+ this.swap_y.style.backgroundColor = "green";
+ }
+ this.work_queue = new Array();
+}
+
+Sort.prototype.stop = function() {
+ if (this.timer != 0) {
+ clearTimeout(this.timer);
+ this.timer = 0;
+ }
+ this.cleanup();
+}
+
+Sort.prototype.finished = function(err) {
+ this.stop();
+
+ this.stop_time = (new Date()).getTime();
+
+ var total = (this.stop_time - this.start_time);
+ if (err == null) {
+ var step_avg = Math.floor(total / this.num_iterations);
+ var overhead = total - this.processing_total;
+ var overhead_avg = Math.floor(overhead / this.num_iterations);
+ var processing_avg = Math.floor(this.processing_total / this.num_iterations);
+ var table = "<table><tr><td>Times(ms)</td><td>Total</td><td>Avg</td><td>Max</td></tr>"
+ + "<tr><td>Total</td><td>" + total + "</td><td>" + step_avg + "</td><td>" + this.step_max + "</tr>"
+ + "<tr><td>Work</td><td>" + this.processing_total + "</td><td>" + processing_avg + "</td><td>" + this.processing_max + "</tr>"
+ + "<tr><td>Overhead</td><td>" + overhead + "</td><td>" + overhead_avg + "</td><td>" + this.overhead_max + "</tr>"
+ + "</table>";
+ this.status(table);
+ } else {
+ this.status(err);
+ log("error: " + err);
+ }
+ log("finished in: " + total);
+}
+
+Sort.prototype.shuffle = function() {
+ for (i = 0; i < this.size; i++) {
+ var r = Math.floor(Math.random() * this.size);
+ if (i != r) {
+ this.swap(i,r);
+ }
+ }
+ this.cleanup();
+}
+
+Sort.prototype.print = function() {
+ var graph = document.getElementById(this.name);
+ if (graph == undefined) {
+ alert("can't find " + this.name);
+ }
+ var text = "<div id='" + this.name + "_label' class='label'>" + this.name + " Sort</div>";
+ var len = this.numbers.length;
+ var height_multiple = (graph.clientHeight-20) / len;
+ var width = Math.max(1,Math.floor((graph.clientWidth-10) / len));
+ if (width < 3) {
+ border = 0;
+ } else {
+ border = 1;
+ }
+ var left_offset = Math.round((graph.clientWidth - (width*len))/2);
+ for (i = 0; i < len; i++) {
+ var val = this.numbers[i];
+ var height = Math.max(1, Math.floor(val * height_multiple));
+ var left = left_offset + i * width;
+ text += "<li class='bar' style='border: " + border + "px solid black; height:" + height + "px; left:" + left + "; width:" + width + "' id='" + this.name + val + "' value='" + val + "'></li>";
+ }
+ graph.innerHTML = text;
+ var nodes = document.getElementsByTagName("li");
+ var j = 0;
+ for (i = 0; i < nodes.length; i++) {
+ var name = nodes[i].id;
+ if (name.indexOf(this.name) == 0) {
+ this.bars[j] = nodes[i];
+ j++;
+ }
+ }
+}
+
+Sort.prototype.compare = function(x, y) {
+ var bx = this.bars[x];
+ var by = this.bars[y];
+ //log("compare " + x + "(" + bx.value + ")," + y + "(" + by.value + ")");
+ if (this.compare_x != bx) {
+ if (this.compare_x) {
+ this.compare_x.style.borderColor="black";
+ }
+ bx.style.borderColor="yellow";
+ this.compare_x = bx;
+ }
+ if (this.compare_y != by) {
+ if (this.compare_y) {
+ this.compare_y.style.borderColor="black";
+ }
+ by.style.borderColor="white";
+ this.compare_y = by;
+ }
+ this.compares++;
+ return bx.value - by.value;
+}
+
+Sort.prototype.swap = function(x, y) {
+ var bx = this.bars[x];
+ var by = this.bars[y];
+ //log("swap " + x + "(" + bx.value + ")," + y + "(" + by.value + ")");
+ if (this.swap_x != x) {
+ if (this.swap_x) {
+ this.swap_x.style.backgroundColor="green";
+ }
+ bx.style.backgroundColor="blue";
+ this.swap_x = bx;
+ }
+ if (this.swap_y != y) {
+ if (this.swap_y) {
+ this.swap_y.style.backgroundColor="green";
+ }
+ by.style.backgroundColor="red";
+ this.swap_y = by;
+ }
+ var tmp = bx.style.left;
+ bx.style.left = by.style.left;
+ by.style.left = tmp;
+ this.bars[x] = by;
+ this.bars[y] = bx;
+ this.swaps++;
+}
+
+Sort.prototype.insert = function(from, to) {
+ var bf = this.bars[from];
+ if (from > to) {
+ for (i = from; i > to; i--) {
+ var b1 = this.bars[i];
+ var b2 = this.bars[i-1];
+ b2.style.left = b1.style.left;
+ this.bars[i] = b2;
+ }
+ bf.style.left = this.bars[to].style.left;
+ this.bars[to] = bf;
+ } else {
+ // TODO
+ }
+}
diff --git a/webkit/data/test_shell/test.css b/webkit/data/test_shell/test.css
new file mode 100644
index 0000000..1cbd20b
--- /dev/null
+++ b/webkit/data/test_shell/test.css
@@ -0,0 +1,39 @@
+div.group {
+ width : 250px;
+}
+
+div.group h1 {
+ font-family: sans-serif;
+ font-size : 16px;
+ color : white;
+ background : red;
+}
+
+div.title {
+ font-family: sans-serif;
+ font-size : 24px;
+}
+
+div.description {
+ font-family: sans-serif;
+}
+
+#title {
+ height: 160px;
+}
+
+#leftcol {
+ width:50%;
+}
+
+#rightcol {
+ float: right;
+ width:50%;
+}
+
+#footer {
+ font-size: 12px;
+ position: absolute;
+ bottom: 0;
+}
+