Title: [127100] trunk/LayoutTests
Revision
127100
Author
[email protected]
Date
2012-08-29 22:08:52 -0700 (Wed, 29 Aug 2012)

Log Message

security/crypto-random-values-limits.html test the exact value that causes us to throw
https://bugs.webkit.org/show_bug.cgi?id=95403

Reviewed by Eric Seidel.

As requested by Darin Adler, this patch makes us test the exact length
threshold at which we start throwing an exception. This value is
defined in the spec, and we want to make sure we hit it exactly.

* security/crypto-random-values-limits-expected.txt:
* security/crypto-random-values-limits.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (127099 => 127100)


--- trunk/LayoutTests/ChangeLog	2012-08-30 05:03:21 UTC (rev 127099)
+++ trunk/LayoutTests/ChangeLog	2012-08-30 05:08:52 UTC (rev 127100)
@@ -1,3 +1,17 @@
+2012-08-29  Adam Barth  <[email protected]>
+
+        security/crypto-random-values-limits.html test the exact value that causes us to throw
+        https://bugs.webkit.org/show_bug.cgi?id=95403
+
+        Reviewed by Eric Seidel.
+
+        As requested by Darin Adler, this patch makes us test the exact length
+        threshold at which we start throwing an exception. This value is
+        defined in the spec, and we want to make sure we hit it exactly.
+
+        * security/crypto-random-values-limits-expected.txt:
+        * security/crypto-random-values-limits.html:
+
 2012-08-29  Csaba Osztrogonác  <[email protected]>
 
         [Qt][WK1] New test css3/filters/null-effect-check.html added in r126927 fails

Modified: trunk/LayoutTests/security/crypto-random-values-limits-expected.txt (127099 => 127100)


--- trunk/LayoutTests/security/crypto-random-values-limits-expected.txt	2012-08-30 05:03:21 UTC (rev 127099)
+++ trunk/LayoutTests/security/crypto-random-values-limits-expected.txt	2012-08-30 05:08:52 UTC (rev 127100)
@@ -5,7 +5,8 @@
 
 PASS 'crypto' in window is true
 PASS 'getRandomValues' in window.crypto is true
-PASS crypto.getRandomValues(largeArray) threw exception Error: QUOTA_EXCEEDED_ERR: DOM Exception 22.
+PASS crypto.getRandomValues(almostTooLargeArray) did not throw exception.
+PASS crypto.getRandomValues(tooLargeArray) threw exception Error: QUOTA_EXCEEDED_ERR: DOM Exception 22.
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/security/crypto-random-values-limits.html (127099 => 127100)


--- trunk/LayoutTests/security/crypto-random-values-limits.html	2012-08-30 05:03:21 UTC (rev 127099)
+++ trunk/LayoutTests/security/crypto-random-values-limits.html	2012-08-30 05:08:52 UTC (rev 127100)
@@ -17,9 +17,11 @@
 shouldBe("'getRandomValues' in window.crypto", "true");
 
 try {
-    var largeArray = new Uint8Array(66000);
+    var almostTooLargeArray = new Uint8Array(65536);
+    var tooLargeArray = new Uint8Array(65537);
 
-    shouldThrow("crypto.getRandomValues(largeArray)");
+    shouldNotThrow("crypto.getRandomValues(almostTooLargeArray)");
+    shouldThrow("crypto.getRandomValues(tooLargeArray)");
 } catch(ex) {
     debug(ex);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to