[webkit-changes] cvs commit: WebCore/layout-tests/fast/js array-every-expected.txt array-every.html const-expected.txt const.html

Darin darin at opensource.apple.com
Wed Sep 28 13:40:23 PDT 2005


darin       05/09/28 13:40:22

  Modified:    .        ChangeLog
               layout-tests/fast/js array-every-expected.txt
                        array-every.html const-expected.txt const.html
  Log:
          * layout-tests/fast/js/array-every.html: Fixed test case; one of the tests was using
          the wrong function, so it wasn't testing what it claimed it was.
          * layout-tests/fast/js/array-every-expected.txt: Updated test result; one section now
          has a different result.
  
          * layout-tests/fast/js/const.html: Added a test case that checks that variables after
          the first in a const declaration are also const; this was broken until my recent change
          to the JavaScript grammar.
          * layout-tests/fast/js/const-expected.txt: Updated test results.
  
  Revision  Changes    Path
  1.172     +12 -0     WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.171
  retrieving revision 1.172
  diff -u -r1.171 -r1.172
  --- ChangeLog	28 Sep 2005 05:06:01 -0000	1.171
  +++ ChangeLog	28 Sep 2005 20:40:20 -0000	1.172
  @@ -1,3 +1,15 @@
  +2005-09-26  Darin Adler  <darin at apple.com>
  +
  +        * layout-tests/fast/js/array-every.html: Fixed test case; one of the tests was using
  +        the wrong function, so it wasn't testing what it claimed it was.
  +        * layout-tests/fast/js/array-every-expected.txt: Updated test result; one section now
  +        has a different result.
  +
  +        * layout-tests/fast/js/const.html: Added a test case that checks that variables after
  +        the first in a const declaration are also const; this was broken until my recent change
  +        to the JavaScript grammar.
  +        * layout-tests/fast/js/const-expected.txt: Updated test results.
  +
   2005-09-27  Eric Seidel  <eseidel at apple.com>
   
           Reviewed by mjs.
  
  
  
  1.4       +3 -1      WebCore/layout-tests/fast/js/array-every-expected.txt
  
  Index: array-every-expected.txt
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/js/array-every-expected.txt,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- array-every-expected.txt	16 Jul 2005 05:39:25 -0000	1.3
  +++ array-every-expected.txt	28 Sep 2005 20:40:22 -0000	1.4
  @@ -32,8 +32,10 @@
   false
   
   4.0 Exception Test
  -This test uses a function that throws an exception, and thus halts the execution of every. There should thus be no output.
  +This test uses a function that throws an exception, and thus halts the execution of every. There should be an exception string printed twice.
   
  +exception from function
  +exception from function
   
   5.0 Wrong Type for Callback Test This test sends in incorrect types for the callback parameter of every. An exception should be thrown in each case. There should be 6 type errors (and no crashes!):
   
  
  
  
  1.2       +11 -8     WebCore/layout-tests/fast/js/array-every.html
  
  Index: array-every.html
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/js/array-every.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- array-every.html	30 Jun 2005 01:19:47 -0000	1.1
  +++ array-every.html	28 Sep 2005 20:40:22 -0000	1.2
  @@ -80,15 +80,18 @@
   </script>
   <br/>
   4.0 Exception Test<br/>
  -This test uses a function that throws an exception, and thus halts the execution of every.  There should thus be no output.<br/><br/>
  +This test uses a function that throws an exception, and thus halts the execution of every.  There should be an exception string printed twice.<br/><br/>
   <script>
  -function isBigEnough(element, index, array) {
  -    if(index==1) throw exception();
  +function isBigEnoughAndException(element, index, array) {
  +    if(index==1) throw "exception from function";
       return (element >= 10);
   }
   
  -print([12, 5, 8, 130, 44].every(isBigEnoughAndException));
  -print([12, 54, 18, 130, 44].every(isBigEnoughAndException));
  +try { [12, 5, 8, 130, 44].every(isBigEnoughAndException); }
  +catch (e) { print(e); }
  +
  +try { [12, 54, 18, 130, 44].every(isBigEnoughAndException); }
  +catch (e) { print(e); }
   
   </script>
   <br/>
  @@ -119,14 +122,14 @@
   6.0 Early Abortion ("Short Circuiting")
   This test is nearly identical to 1.0, except that it prints upon every call to the designated callback function.  Since every aborts as soon as it finds one element that does not qualify, the first array should print only twice, and the second all 5 times.<br/><br/>
   <script>
  -function isBigEnough(element, index, array) {
  +function isBigEnoughShortCircuit(element, index, array) {
       print("Testing element "+element+"...");
       return (element >= 10);
   }
   
  -[12, 5, 8, 130, 44].every(isBigEnough);
  +[12, 5, 8, 130, 44].every(isBigEnoughShortCircuit);
   print("Done with first array.");
  -[12, 54, 18, 130, 44].every(isBigEnough);
  +[12, 54, 18, 130, 44].every(isBigEnoughShortCircuit);
   print("Done with second array.");
   </script>
   </body>
  
  
  
  1.2       +2 -1      WebCore/layout-tests/fast/js/const-expected.txt
  
  Index: const-expected.txt
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/js/const-expected.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- const-expected.txt	21 Jun 2005 08:25:26 -0000	1.1
  +++ const-expected.txt	28 Sep 2005 20:40:22 -0000	1.2
  @@ -1,3 +1,4 @@
  -This test checks that const declarations in JavaScript work and are readonly. The text below should say RIGHT.
  +This test checks that const declarations in JavaScript work and are readonly. The text below should say RIGHT twice.
   
   RIGHT
  +RIGHT
  
  
  
  1.2       +12 -1     WebCore/layout-tests/fast/js/const.html
  
  Index: const.html
  ===================================================================
  RCS file: /cvs/root/WebCore/layout-tests/fast/js/const.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- const.html	21 Jun 2005 08:25:26 -0000	1.1
  +++ const.html	28 Sep 2005 20:40:22 -0000	1.2
  @@ -1,5 +1,5 @@
   <div>
  -This test checks that const declarations in JavaScript work and are readonly. The text below should say RIGHT.
  +This test checks that const declarations in JavaScript work and are readonly. The text below should say RIGHT twice.
   </div>
   <br>
   <div>
  @@ -16,4 +16,15 @@
      document.write("EXCEPTION");
   }
   </script>
  +</div>
  +<div>
  +<script>
  +try {
  +    const x = "RIGHT", y = "RIGHT";
  +    y = "WRONG";
  +    document.write(y);
  +} catch (exc) {
  +   document.write("EXCEPTION");
  +}
  +</script>
   </div>
  \ No newline at end of file
  
  
  



More information about the webkit-changes mailing list