Title: [138257] trunk/LayoutTests
Revision
138257
Author
commit-qu...@webkit.org
Date
2012-12-20 08:22:37 -0800 (Thu, 20 Dec 2012)

Log Message

2 fast/filesystem test cases ask for more space than the size they request when creating the file system
https://bugs.webkit.org/show_bug.cgi?id=105307

Patch by Lianghui Chen <liac...@rim.com> on 2012-12-20
Reviewed by Yong Li.

The purpose of this patch is to make these 2 test cases conform to the
size limit, so for platform that wants to enforce the size limit they
will not fail due to quota limit.

* fast/filesystem/resources/file-writer-abort-continue.js:
* fast/filesystem/resources/op-get-metadata.js:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (138256 => 138257)


--- trunk/LayoutTests/ChangeLog	2012-12-20 16:12:31 UTC (rev 138256)
+++ trunk/LayoutTests/ChangeLog	2012-12-20 16:22:37 UTC (rev 138257)
@@ -1,3 +1,17 @@
+2012-12-20  Lianghui Chen  <liac...@rim.com>
+
+        2 fast/filesystem test cases ask for more space than the size they request when creating the file system
+        https://bugs.webkit.org/show_bug.cgi?id=105307
+
+        Reviewed by Yong Li.
+
+        The purpose of this patch is to make these 2 test cases conform to the
+        size limit, so for platform that wants to enforce the size limit they
+        will not fail due to quota limit.
+
+        * fast/filesystem/resources/file-writer-abort-continue.js:
+        * fast/filesystem/resources/op-get-metadata.js:
+
 2012-12-20  Kunihiko Sakamoto  <ksakam...@chromium.org>
 
         Fix tests depend on current year

Modified: trunk/LayoutTests/fast/filesystem/resources/file-writer-abort-continue.js (138256 => 138257)


--- trunk/LayoutTests/fast/filesystem/resources/file-writer-abort-continue.js	2012-12-20 16:12:31 UTC (rev 138256)
+++ trunk/LayoutTests/fast/filesystem/resources/file-writer-abort-continue.js	2012-12-20 16:22:37 UTC (rev 138257)
@@ -16,6 +16,12 @@
 var currentTest = 0;
 var blob = getBlob();
 
+// fileSystemOverhead is an estimate of extra size needed to save a full file
+// system, it need to be large enough to avoid test failure due to file system
+// quota limit.
+var fileSystemOverhead = blobSize * 5 / 1000 + 1024;
+var fileSystemSize = blobSize * 2 + fileSystemOverhead;
+
 var methodSet = [
   {  // Setup method set that writes, then aborts that write before completion.
     action : startWrite,
@@ -174,7 +180,7 @@
 }
 
 var jsTestIsAsync = true;
-setupAndRunTest(2*1024*1024, 'file-writer-abort',
+setupAndRunTest(fileSystemSize, 'file-writer-abort',
                 function (fileEntry, fileWriter) {
                     fileEntryForCleanup = fileEntry;
                     writer = fileWriter;

Modified: trunk/LayoutTests/fast/filesystem/resources/op-get-metadata.js (138256 => 138257)


--- trunk/LayoutTests/fast/filesystem/resources/op-get-metadata.js	2012-12-20 16:12:31 UTC (rev 138256)
+++ trunk/LayoutTests/fast/filesystem/resources/op-get-metadata.js	2012-12-20 16:22:37 UTC (rev 138257)
@@ -5,7 +5,7 @@
             {fullPath:'/tmp'},
             {fullPath:'/file1', size:0},
             {fullPath:'/file2', size:10},
-            {fullPath:'/file3', size:100},
+            {fullPath:'/file3', size:90},
         ],
         tests: [
             function(helper) { helper.getMetadata('/'); },
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to