Fix orange from bug 630117. a=bustage
☠☠ backed out by 298c555d0c6e ☠ ☠
authorJonas Sicking <jonas@sicking.cc>
Tue, 01 Feb 2011 16:19:22 -0800
changeset 61761 808970eca6d5530ee7d0e83288e29b53de8845b1
parent 61760 9797baa9246d12c9c7e96627dd0494c15abcc5db
child 61762 298c555d0c6e0151db9ce00c15a5d766ab044d67
push idunknown
push userunknown
push dateunknown
reviewersbustage
bugs630117
milestone2.0b11pre
Fix orange from bug 630117. a=bustage
content/canvas/test/webgl/conformance/array-unit-tests.html
--- a/content/canvas/test/webgl/conformance/array-unit-tests.html
+++ b/content/canvas/test/webgl/conformance/array-unit-tests.html
@@ -313,42 +313,42 @@ function negativeTestSetFromArray(type, 
     fail(e);
   }
 }
 
 function testSlice(type, name) {
   running('test ' + name + ' Slice');
   try {
     var array = new type([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
-    var slice = array.slice(0, 5);
+    var slice = array.subset(0, 5);
     assertEq('slice.length', 5, slice.length);
     for (var i = 0; i < 5; i++) {
       assertEq('Element ' + i, i, slice[i]);
     }
-    slice = array.slice(4, 10);
+    slice = array.subset(4, 10);
     assertEq('slice.length', 6, slice.length);
     for (var i = 0; i < 6; i++) {
       assertEq('Element ' + i, 4 + i, slice[i]);
     }
     pass();
   } catch (e) {
     fail(e);
   }
 }
 
 function negativeTestSlice(type, name) {
   running('negativeTest ' + name + ' Slice');
   try {
     var array = new type([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
-    slice = array.slice(5, 11);
+    slice = array.subset(5, 11);
     if (slice.length != 5) {
       fail();
       return;
     }
-    slice = array.slice(10, 10);
+    slice = array.subset(10, 10);
     if (slice.length != 0) {
       fail();
       return;
     }
     pass();
   } catch (e) {
     fail(e);
   }
@@ -482,23 +482,23 @@ function testSlicingWithOutOfRangeValues
         var buffer = new ArrayBuffer(32);
         array = new type(buffer);
         typeSize = sz;
         shouldBe("array.length", "32 / typeSize");
         try {
             shouldBe("array.slice(4, 0x3FFFFFFF).length", "(32 / typeSize) - 4");
             shouldBe("array.slice(4, -2147483648).length", "0");
             // Test slice() against overflows.
-            array = array.slice(2);
+            array = array.subset(2);
             if (sz > 1) {
                 // Full byte offset is +1 larger than the maximum unsigned long int.
-                // Make sure slice() still handles it correctly.  Otherwise overflow would happen and
+                // Make sure subset() still handles it correctly.  Otherwise overflow would happen and
                 // offset would be 0, and array.length array.length would incorrectly be 1.
                 var start = 4294967296 / sz - 2;
-                array = array.slice(start, start + 1);
+                array = array.subset(start, start + 1);
                 shouldBe("array.length", "0");
             }
         } catch (e) {
             testFailed("Slicing of " + name + " threw exception");
         }
     } catch (e) {
         testFailed("Exception: " + e);
     }
@@ -507,20 +507,20 @@ function testSlicingWithOutOfRangeValues
 function testSlicingWithDefaultValues(type, name, sz) {
     debug("Testing slicing with default inputs of " + name);
     try {
         var buffer = new ArrayBuffer(32);
         array = new type(buffer);
         typeSize = sz;
         shouldBe("array.length", "32 / typeSize");
         try {
-            shouldBe("array.slice(0).length", "(32 / typeSize)");
-            shouldBe("array.slice(2).length", "(32 / typeSize) - 2");
-            shouldBe("array.slice(-2).length", "2");
-            shouldBe("array.slice(-2147483648).length", "(32 / typeSize)");
+            shouldBe("array.subset(0).length", "(32 / typeSize)");
+            shouldBe("array.subset(2).length", "(32 / typeSize) - 2");
+            shouldBe("array.subset(-2).length", "2");
+            shouldBe("array.subset(-2147483648).length", "(32 / typeSize)");
         } catch (e) {
             testFailed("Slicing of " + name + " threw exception");
         }
     } catch (e) {
         testFailed("Exception: " + e);
     }
 }