[Performance tests] Interactive/SelectAll.html throws an exception
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Nov 2013 15:28:47 +0000 (15:28 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Nov 2013 15:28:47 +0000 (15:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=124495

Reviewed by Antti Koivisto

Return a boolean indicating whether more values are needed or not in
PerfTestRunner.measureValueAsync so that runTest can terminate gracefully.

* Interactive/SelectAll.html:
(runTest): Don't schedule a timer for runTest if we've got enough values.
* resources/runner.js:
(PerfTestRunner.measureValueAsync): Returns true iff more values are needed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159421 268f45cc-cd09-0410-ab3c-d52691b4dbfc

PerformanceTests/ChangeLog
PerformanceTests/Interactive/SelectAll.html
PerformanceTests/resources/runner.js

index 7d423b9..66a4165 100644 (file)
@@ -1,3 +1,18 @@
+2013-11-18  Ryosuke Niwa  <rniwa@webkit.org>
+
+        [Performance tests] Interactive/SelectAll.html throws an exception
+        https://bugs.webkit.org/show_bug.cgi?id=124495
+
+        Reviewed by Antti Koivisto
+
+        Return a boolean indicating whether more values are needed or not in
+        PerfTestRunner.measureValueAsync so that runTest can terminate gracefully.
+
+        * Interactive/SelectAll.html:
+        (runTest): Don't schedule a timer for runTest if we've got enough values.
+        * resources/runner.js:
+        (PerfTestRunner.measureValueAsync): Returns true iff more values are needed.
+
 2013-11-13  Antti Koivisto  <antti@apple.com>
 
         This was supposed to test overflow-wrap:break-word instead of word-break:break-all.
index 1e89ab9..3d6d7ec 100644 (file)
@@ -22,10 +22,11 @@ function runTest() {
         iframe.contentDocument.execCommand('SelectAll');
         iframe.contentDocument.body.offsetTop;
         setTimeout(function () {
-            PerfTestRunner.measureValueAsync(PerfTestRunner.now() - startTime);
+            if (!PerfTestRunner.measureValueAsync(PerfTestRunner.now() - startTime))
+                return;
             PerfTestRunner.gc();
             setTimeout(runTest, 0);
-        }, 0);        
+        }, 0);
     }, 0);
 }
 
index 576f1d1..c7aa116 100755 (executable)
@@ -236,11 +236,15 @@ if (window.testRunner) {
             ignoreWarmUpAndLog(measuredValue);
         } catch (exception) {
             logFatalError("Got an exception while logging the result with name=" + exception.name + ", message=" + exception.message);
-            return;
+            return false;
         }
 
-        if (completedIterations >= iterationCount)
+        if (completedIterations >= iterationCount) {
             finish();
+            return false;
+        }
+
+        return true;
     }
 
     PerfTestRunner.measureTime = function (test) {