<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[24834] trunk/LayoutTests</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/24834">24834</a></dd>
<dt>Author</dt> <dd>weinig</dd>
<dt>Date</dt> <dd>2007-08-02 17:24:05 -0700 (Thu, 02 Aug 2007)</dd>
</dl>

<h3>Log Message</h3>
<pre>        Reviewed by Kevin McCullough.

        Change test to use shared shouldBe function to
        show failures more clearly. 

        * fast/dom/Window/window-resize-expected.txt:
        * fast/dom/Window/window-resize.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomWindowwindowresizeexpectedtxt">trunk/LayoutTests/fast/dom/Window/window-resize-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomWindowwindowresizehtml">trunk/LayoutTests/fast/dom/Window/window-resize.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (24833 => 24834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2007-08-02 23:54:15 UTC (rev 24833)
+++ trunk/LayoutTests/ChangeLog        2007-08-03 00:24:05 UTC (rev 24834)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2007-08-02  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        Reviewed by Kevin McCullough.
+
+        Change test to use shared shouldBe function to
+        show failures more clearly. 
+
+        * fast/dom/Window/window-resize-expected.txt:
+        * fast/dom/Window/window-resize.html:
+
</ins><span class="cx"> 2007-08-02  Antti Koivisto  &lt;antti@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Reviewed by Darin.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowwindowresizeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Window/window-resize-expected.txt (24833 => 24834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/window-resize-expected.txt        2007-08-02 23:54:15 UTC (rev 24833)
+++ trunk/LayoutTests/fast/dom/Window/window-resize-expected.txt        2007-08-03 00:24:05 UTC (rev 24834)
</span><span class="lines">@@ -1,28 +1,91 @@
</span><del>-This test makes sure that we have similar behavior as other browsers when resizing and moving a window outside of the screen. This test will fail in some dimentions when run manually because of inconsistencies of when the window can and cannot go behind the doc.
</del><ins>+This test makes sure that we have similar behavior as other browsers when resizing and moving a window outside of the screen. This test will fail in some dimensions when run manually because of inconsistencies of when the window can and cannot go behind the doc.
</ins><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASSED: resizeTo: Too Big
-PASSED: resizeTo: Too Small
-PASSED: resizeBy: Too Small
-PASSED: resizeBy: Too Big
-PASSED: moveTo: Top Left
-PASSED: moveTo: Top
-PASSED: moveTo: Top Right
-PASSED: moveTo: Right
-PASSED: moveTo: Bottom Right
-PASSED: moveTo: Bottom
-PASSED: moveTo: Bottom Left
-PASSED: moveTo: Left
-PASSED: moveBy: Top Left
-PASSED: moveBy: Top
-PASSED: moveBy: Top Right
-PASSED: moveBy: Right
-PASSED: moveBy: Bottom Right
-PASSED: moveBy: Bottom
-PASSED: moveBy: Bottom Left
-PASSED: moveBy: Left
</del><ins>+
+window.resizeTo Tests
+
+Testing - resizeTo: Too Big
+PASS window.outerWidth is screen.width
+
+Testing - resizeTo: Too Small
+PASS window.outerWidth is 100
+
+window.resizeBy Tests
+
+Testing - resizeBy: Too Small
+PASS window.outerWidth is 100
+
+Testing - resizeBy: Too Big
+PASS window.outerWidth is screen.width
+
+window.moveTo Tests
+
+Testing - moveTo: Top Left
+PASS window.screenY is 0
+PASS window.screenX is screen.availLeft
+
+Testing - moveTo: Top
+PASS window.screenY is 0
+PASS window.screenX is screen.availLeft
+
+Testing - moveTo: Top Right
+PASS window.screenY is 0
+PASS window.outerWidth is screen.width
+
+Testing - moveTo: Right
+PASS window.screenY is 0
+PASS window.outerWidth is screen.width
+
+Testing - moveTo: Bottom Right
+PASS window.outerHeight is screen.height
+PASS window.outerWidth is screen.width
+
+Testing - moveTo: Bottom
+PASS window.outerHeight is screen.height
+PASS window.screenX is 0
+
+Testing - moveTo: Bottom Left
+PASS window.outerHeight is screen.height
+PASS window.screenX is 0
+
+Testing - moveTo: Left
+PASS window.screenY is 0
+PASS window.screenX is 0
+
+window.moveBy Tests
+
+Testing - moveBy: Top Left
+PASS window.screenY is 0
+PASS window.screenX is 0
+
+Testing - moveBy: Top
+PASS window.screenY is 0
+PASS window.screenX is 0
+
+Testing - moveBy: Top Right
+PASS window.screenY is 0
+PASS window.outerWidth is screen.width
+
+Testing - moveBy: Right
+PASS window.screenY is 0
+PASS window.outerWidth is screen.width
+
+Testing - moveBy: Bottom Right
+PASS window.outerHeight is screen.height
+PASS window.outerWidth is screen.width
+
+Testing - moveBy: Bottom
+PASS window.outerHeight is screen.height
+
+Testing - moveBy: Bottom Left
+PASS window.outerHeight is screen.height
+PASS window.screenX is 0
+
+Testing - moveBy: Left
+PASS window.screenX is screen.availLeft
+
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomWindowwindowresizehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Window/window-resize.html (24833 => 24834)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Window/window-resize.html        2007-08-02 23:54:15 UTC (rev 24833)
+++ trunk/LayoutTests/fast/dom/Window/window-resize.html        2007-08-03 00:24:05 UTC (rev 24834)
</span><span class="lines">@@ -1,7 +1,8 @@
</span><span class="cx"> &lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;script src=&quot;../../js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</del><ins>+    &lt;link rel=&quot;stylesheet&quot; href=&quot;../../js/resources/js-test-style.css&quot;&gt;
+    &lt;script src=&quot;../../js/resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;p id=&quot;description&quot;&gt;&lt;/p&gt;
</span><span class="lines">@@ -14,7 +15,7 @@
</span><span class="cx"> 
</span><span class="cx">     description(&quot;This test makes sure that we have similar behavior as other\
</span><span class="cx">     browsers when resizing and moving a window outside of the screen.  This test\
</span><del>-    will fail in some dimentions when run manually because of inconsistencies of\
</del><ins>+    will fail in some dimensions when run manually because of inconsistencies of\
</ins><span class="cx">     when the window can and cannot go behind the doc.&quot;);
</span><span class="cx">     
</span><span class="cx">     var result;
</span><span class="lines">@@ -23,210 +24,276 @@
</span><span class="cx">     var y;
</span><span class="cx"> 
</span><span class="cx">     // resizeTo /////////////////////////
</span><ins>+    debug('');
+    debug('window.resizeTo Tests');
+    debug('');
</ins><span class="cx"> 
</span><del>-    testName = &quot;resizeTo: Too Big&quot;;
</del><span class="cx">     x = screen.width*2;
</span><span class="cx">     y = screen.height*2;
</span><span class="cx">     window.resizeTo(x, y);
</span><del>-    result = window.outerWidth == screen.width;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
-    
-    testName = &quot;resizeTo: Too Small&quot;;
</del><ins>+    debug(&quot;Testing - resizeTo: Too Big&quot;);
+    shouldBe('window.outerWidth', 'screen.width');
+
+    debug('');
+
</ins><span class="cx">     x = 50;
</span><span class="cx">     y = 50;
</span><span class="cx">     window.resizeTo(x, y);
</span><del>-    result = window.outerWidth == 100;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - resizeTo: Too Small&quot;);
+    shouldBe('window.outerWidth', '100');
</ins><span class="cx"> 
</span><span class="cx">     // resizeBy /////////////////////////
</span><ins>+    debug('');
+    debug('window.resizeBy Tests');
+    debug('');
</ins><span class="cx"> 
</span><del>-    testName = &quot;resizeBy: Too Small&quot;;
</del><span class="cx">     x = -100;
</span><span class="cx">     y = -100;
</span><span class="cx">     window.resizeBy(x, y);
</span><del>-    result = window.outerWidth == 100;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - resizeBy: Too Small&quot;);
+    shouldBe('window.outerWidth', '100');
</ins><span class="cx"> 
</span><del>-    testName = &quot;resizeBy: Too Big&quot;;
</del><ins>+    debug('');
+
</ins><span class="cx">     x = screen.width*2;
</span><span class="cx">     y = screen.height*2;
</span><span class="cx">     window.resizeBy(x, y);
</span><del>-    result = window.outerWidth == screen.width;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - resizeBy: Too Big&quot;);
+    shouldBe('window.outerWidth', 'screen.width');
</ins><span class="cx"> 
</span><span class="cx">     window.moveTo(0,0);
</span><span class="cx">     window.resizeTo(screen.width, screen.height);
</span><span class="cx"> 
</span><span class="cx">     // moveTo /////////////////////////
</span><ins>+    debug('');
+    debug('window.moveTo Tests');
+    debug('');
</ins><span class="cx"> 
</span><del>-    testName = &quot;moveTo: Top Left&quot;;
</del><span class="cx">     x = -100;
</span><span class="cx">     y = -100;
</span><span class="cx">     window.moveTo(x, y);
</span><del>-    if (window.layoutTestController)
-        result = window.screenY == 0 &amp;&amp; window.screenX == screen.availLeft;
-    else
-        result = window.screenY == screen.availTop &amp;&amp; window.screenX == screen.availLeft;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - moveTo: Top Left&quot;);
+    if (window.layoutTestController) {
+        shouldBe('window.screenY', '0');
+        shouldBe('window.screenX', 'screen.availLeft');
+    } else {
+        shouldBe('window.screenY', 'screen.availTop');
+        shouldBe('window.screenX', 'screen.availLeft');
+    }
</ins><span class="cx"> 
</span><ins>+    debug('');
</ins><span class="cx"> 
</span><del>-    testName = &quot;moveTo: Top&quot;;
</del><span class="cx">     x = 0;
</span><span class="cx">     y = -100;
</span><span class="cx">     window.moveTo(x, y);
</span><del>-    if (window.layoutTestController)
-        result = window.screenY ==  0 &amp;&amp; window.screenX == screen.availLeft;
-    else
-        result = window.screenY ==  screen.availTop &amp;&amp; window.screenX == screen.availLeft;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - moveTo: Top&quot;);
+    if (window.layoutTestController) {
+        shouldBe('window.screenY', '0');
+        shouldBe('window.screenX', 'screen.availLeft');
+    } else {
+        shouldBe('window.screenY', 'screen.availTop');
+        shouldBe('window.screenX', 'screen.availLeft');
+    }
</ins><span class="cx"> 
</span><del>-    testName = &quot;moveTo: Top Right&quot;;
</del><ins>+    debug('');
+
</ins><span class="cx">     x = 100;
</span><span class="cx">     y = -100;
</span><span class="cx">     window.moveTo(x, y);
</span><del>-    if (window.layoutTestController)
-        result = window.screenY == 0 &amp;&amp; window.outerWidth == screen.width;
-    else
-        result = window.screenY == screen.availTop &amp;&amp; window.outerWidth == screen.width;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
-    
-    testName = &quot;moveTo: Right&quot;;
</del><ins>+    debug(&quot;Testing - moveTo: Top Right&quot;);
+    if (window.layoutTestController) {
+        shouldBe('window.screenY', '0');
+        shouldBe('window.outerWidth', 'screen.width');
+    } else {
+        shouldBe('window.screenY', 'screen.availTop');
+        shouldBe('window.outerWidth', 'screen.width');
+    }
+
+    debug('');
+
</ins><span class="cx">     x = 100;
</span><span class="cx">     y = 0;
</span><span class="cx">     window.moveTo(x, y);
</span><del>-    if (window.layoutTestController)
-        result = window.screenY == 0 &amp;&amp; window.outerWidth == screen.width;
-    else
-        result = window.screenY == screen.availTop &amp;&amp; window.outerWidth == screen.width;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - moveTo: Right&quot;);
+    if (window.layoutTestController) {
+        shouldBe('window.screenY', '0');
+        shouldBe('window.outerWidth', 'screen.width');
+    } else {
+        shouldBe('window.screenY', 'screen.availTop');
+        shouldBe('window.outerWidth', 'screen.width');
+    }
</ins><span class="cx"> 
</span><del>-    testName = &quot;moveTo: Bottom Right&quot;;
</del><ins>+    debug('');
+
</ins><span class="cx">     x = 100;
</span><span class="cx">     y = 100;
</span><span class="cx">     window.moveTo(x, y);
</span><del>-    if (window.layoutTestController)
-        result = window.outerHeight == screen.height &amp;&amp; window.outerWidth == screen.width;
-    else
-        result = window.outerHeight == screen.availHeight &amp;&amp; window.outerWidth == screen.width;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - moveTo: Bottom Right&quot;);
+    if (window.layoutTestController) {
+        shouldBe('window.outerHeight', 'screen.height');
+        shouldBe('window.outerWidth', 'screen.width');
+    } else {
+        shouldBe('window.outerHeight', 'screen.availHeight');
+        shouldBe('window.outerWidth', 'screen.width');
+    }
</ins><span class="cx"> 
</span><del>-    testName = &quot;moveTo: Bottom&quot;;
</del><ins>+    debug('');
+
</ins><span class="cx">     x = 0;
</span><span class="cx">     y = 100;
</span><span class="cx">     window.moveTo(x, y);
</span><del>-    if (window.layoutTestController)
-        result = window.outerHeight == screen.height &amp;&amp; window.screenX == 0;
-    else
-        result = window.outerHeight == screen.availHeight &amp;&amp; window.screenX == screen.availLeft;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - moveTo: Bottom&quot;);
+    if (window.layoutTestController) {
+        shouldBe('window.outerHeight', 'screen.height');
+        shouldBe('window.screenX', '0');
+    } else {
+        shouldBe('window.outerHeight', 'screen.availHeight');
+        shouldBe('window.screenX', 'screen.availLeft');
+    }
</ins><span class="cx"> 
</span><del>-    testName = &quot;moveTo: Bottom Left&quot;;
</del><ins>+    debug('');
+
</ins><span class="cx">     x = -100;
</span><span class="cx">     y = 100;
</span><span class="cx">     window.moveTo(x, y);
</span><del>-    if (window.layoutTestController)
-        result = window.outerHeight == screen.height &amp;&amp; window.screenX == 0;
-    else
-        result = window.outerHeight == screen.availHeight &amp;&amp; window.screenX == screen.availLeft;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - moveTo: Bottom Left&quot;);
+    if (window.layoutTestController) {
+        shouldBe('window.outerHeight', 'screen.height');
+        shouldBe('window.screenX', '0');
+    } else {
+        shouldBe('window.outerHeight', 'screen.availHeight');
+        shouldBe('window.screenX', 'screen.availLeft');
+    }
</ins><span class="cx"> 
</span><del>-    testName = &quot;moveTo: Left&quot;;
</del><ins>+    debug('');
+
</ins><span class="cx">     x = -100;
</span><span class="cx">     y = 0;
</span><span class="cx">     window.moveTo(x, y);
</span><del>-    if (window.layoutTestController)
-        result = window.screenY == 0 &amp;&amp; window.screenX == 0;
-    else
-        result = window.screenY == screen.availTop &amp;&amp; window.screenX == screen.availLeft;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - moveTo: Left&quot;);
+    if (window.layoutTestController) {
+        shouldBe('window.screenY', '0');
+        shouldBe('window.screenX', '0');
+    } else {
+        shouldBe('window.screenY', 'screen.availTop');
+        shouldBe('window.screenX', 'screen.availLeft');
+    }
</ins><span class="cx"> 
</span><span class="cx">     window.moveTo(0,0);
</span><span class="cx">     window.resizeTo(screen.width, screen.height);
</span><span class="cx"> 
</span><span class="cx">     // moveBy /////////////////////////
</span><del>- 
-     testName = &quot;moveBy: Top Left&quot;;
</del><ins>+    debug('');
+    debug('window.moveBy Tests');
+    debug('');
+
</ins><span class="cx">     x = -100;
</span><span class="cx">     y = -100;
</span><span class="cx">     window.moveBy(x, y);
</span><del>-    if (window.layoutTestController)
-        result = window.screenY == 0 &amp;&amp; window.screenX == 0;
-    else
-        result = window.screenY == screen.availTop &amp;&amp; window.screenX == screen.availLeft;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - moveBy: Top Left&quot;);
+    if (window.layoutTestController) {
+        shouldBe('window.screenY', '0');
+        shouldBe('window.screenX', '0');
+    } else {
+        shouldBe('window.screenY', 'screen.availTop');
+        shouldBe('window.screenX', 'screen.availLeft');
+    }
</ins><span class="cx"> 
</span><del>-    testName = &quot;moveBy: Top&quot;;
</del><ins>+    debug('');
+
</ins><span class="cx">     x = 0;
</span><span class="cx">     y = -100;
</span><span class="cx">     window.moveBy(x, y);
</span><del>-    if (window.layoutTestController)
-        result = window.screenY == 0 &amp;&amp; window.screenX == 0;
-    else
-        result = window.screenY == screen.availTop &amp;&amp; window.screenX == screen.availLeft;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - moveBy: Top&quot;);
+    if (window.layoutTestController) {
+        shouldBe('window.screenY', '0');
+        shouldBe('window.screenX', '0');
+    } else {
+        shouldBe('window.screenY', 'screen.availTop');
+        shouldBe('window.screenX', 'screen.availLeft');
+    }
</ins><span class="cx"> 
</span><del>-    testName = &quot;moveBy: Top Right&quot;;
</del><ins>+    debug('');
+
</ins><span class="cx">     x = 100;
</span><span class="cx">     y = -100;
</span><span class="cx">     window.moveBy(x, y);
</span><del>-    if (window.layoutTestController)
-        result = window.screenY == 0 &amp;&amp; window.outerWidth == screen.width;
-    else
-        result = window.screenY == screen.availTop &amp;&amp; window.outerWidth == screen.width;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
-    
-    testName = &quot;moveBy: Right&quot;;
</del><ins>+    debug(&quot;Testing - moveBy: Top Right&quot;);
+    if (window.layoutTestController) {
+        shouldBe('window.screenY', '0');
+        shouldBe('window.outerWidth', 'screen.width');
+    } else {
+        shouldBe('window.screenY', 'screen.availTop');
+        shouldBe('window.outerWidth', 'screen.width');
+    }
+
+    debug('');
+
</ins><span class="cx">     x = 100;
</span><span class="cx">     y = 0;
</span><span class="cx">     window.moveBy(x, y);
</span><del>-    if (window.layoutTestController)
-        result = window.screenY == 0 &amp;&amp; window.outerWidth == screen.width;
-    else    
-        result = window.screenY == screen.availTop &amp;&amp; window.outerWidth == screen.width;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - moveBy: Right&quot;);
+    if (window.layoutTestController) {
+        shouldBe('window.screenY', '0');
+        shouldBe('window.outerWidth', 'screen.width');
+    } else {
+        shouldBe('window.screenY', 'screen.availTop');
+        shouldBe('window.outerWidth', 'screen.width');
+    }
</ins><span class="cx"> 
</span><del>-    testName = &quot;moveBy: Bottom Right&quot;;
</del><ins>+    debug('');
+
</ins><span class="cx">     x = 100;
</span><span class="cx">     y = 100;
</span><span class="cx">     window.moveBy(x, y);
</span><del>-    if (window.layoutTestController)
-        result = window.outerHeight == screen.height &amp;&amp; window.outerWidth == screen.width;
-    else
-        result = window.outerHeight == screen.availHeight &amp;&amp; window.outerWidth == screen.width;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - moveBy: Bottom Right&quot;);
+    if (window.layoutTestController) {
+        shouldBe('window.outerHeight', 'screen.height');
+        shouldBe('window.outerWidth', 'screen.width');
+    } else {
+        shouldBe('window.outerHeight', 'screen.availHeight');
+        shouldBe('window.outerWidth', 'screen.width');
+    }
</ins><span class="cx"> 
</span><del>-    testName = &quot;moveBy: Bottom&quot;;
</del><ins>+    debug('');
+
</ins><span class="cx">     x = 0;
</span><span class="cx">     y = 100;
</span><span class="cx">     window.moveBy(x, y);
</span><ins>+    debug(&quot;Testing - moveBy: Bottom&quot;);
</ins><span class="cx">     if (window.layoutTestController)
</span><del>-        result = window.outerHeight == screen.height;
</del><ins>+        shouldBe('window.outerHeight', 'screen.height');
</ins><span class="cx">     else
</span><del>-        result = window.outerHeight == screen.availHeight;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+        shouldBe('window.outerHeight', 'screen.availHeight');
</ins><span class="cx"> 
</span><del>-    testName = &quot;moveBy: Bottom Left&quot;;
</del><ins>+    debug('');
+
</ins><span class="cx">     x = -1000;
</span><span class="cx">     y = 100;
</span><span class="cx">     window.moveBy(x, y);
</span><del>-    if (window.layoutTestController)
-        result = window.outerHeight == screen.height &amp;&amp; window.screenX == 0;
-    else
-        result = window.outerHeight == screen.availHeight &amp;&amp; window.screenX == screen.availLeft;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);
</del><ins>+    debug(&quot;Testing - moveBy: Bottom Left&quot;);
+    if (window.layoutTestController) {
+        shouldBe('window.outerHeight', 'screen.height');
+        shouldBe('window.screenX', '0');
+    } else {
+        shouldBe('window.outerHeight', 'screen.availHeight');
+        shouldBe('window.screenX', 'screen.availLeft');
+    }
</ins><span class="cx"> 
</span><del>-    testName = &quot;moveBy: Left&quot;;
</del><ins>+    debug('');
+
</ins><span class="cx">     x = -100;
</span><span class="cx">     y = 0;
</span><span class="cx">     window.moveBy(x, y);
</span><del>-    result = window.screenX == screen.availLeft;
-    debug((result ? &quot;PASSED: &quot; : &quot;Test FAILED: &quot;) + testName);

</del><ins>+    debug(&quot;Testing - moveBy: Left&quot;);
+    shouldBe('window.screenX', 'screen.availLeft');
+
+    debug('');
+
</ins><span class="cx">     window.moveTo(0,0);
</span><span class="cx">     window.resizeTo(800,600);
</span><del>- 
</del><ins>+
</ins><span class="cx">     var successfullyParsed = true;
</span><del>-
</del><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../js/resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span></span></pre>
</div>
</div>

</body>
</html>