Title: [200053] trunk/Tools
Revision
200053
Author
[email protected]
Date
2016-04-25 15:40:24 -0700 (Mon, 25 Apr 2016)

Log Message

Fix issues with content-animation performance tests
https://bugs.webkit.org/show_bug.cgi?id=157001

Reviewed by Sam Weinig.

Add patch content for svg-animation.html, and fix the paths in the patch so
it applies correctly.

Add the patch file to the .plan file.

* Scripts/webkitpy/benchmark_runner/data/patches/ContentAnimation.patch:
* Scripts/webkitpy/benchmark_runner/data/plans/content-animation.plan:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (200052 => 200053)


--- trunk/Tools/ChangeLog	2016-04-25 21:58:11 UTC (rev 200052)
+++ trunk/Tools/ChangeLog	2016-04-25 22:40:24 UTC (rev 200053)
@@ -1,3 +1,18 @@
+2016-04-25  Simon Fraser  <[email protected]>
+
+        Fix issues with content-animation performance tests
+        https://bugs.webkit.org/show_bug.cgi?id=157001
+
+        Reviewed by Sam Weinig.
+
+        Add patch content for svg-animation.html, and fix the paths in the patch so
+        it applies correctly.
+
+        Add the patch file to the .plan file.
+
+        * Scripts/webkitpy/benchmark_runner/data/patches/ContentAnimation.patch:
+        * Scripts/webkitpy/benchmark_runner/data/plans/content-animation.plan:
+
 2016-04-25  Brady Eidson  <[email protected]>
 
         Tweaking IndexedDB watchlist and adding myself to it.

Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/ContentAnimation.patch (200052 => 200053)


--- trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/ContentAnimation.patch	2016-04-25 21:58:11 UTC (rev 200052)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/ContentAnimation.patch	2016-04-25 22:40:24 UTC (rev 200053)
@@ -1,7 +1,7 @@
-diff --git a/PerformanceTests/Animation/css-animation.html b/PerformanceTests/Animation/css-animation.html
+diff --git a/css-animation.html b/css-animation.html
 index adae19cb018ed1ca93fd6b4cda80002348482fc3..8f1e29933faa13586dbf97b7874024854fbf2147 100644
---- a/PerformanceTests/Animation/css-animation.html
-+++ b/PerformanceTests/Animation/css-animation.html
+--- a/css-animation.html
++++ b/css-animation.html
 @@ -167,9 +167,54 @@
          function setupAnimation()
          {
@@ -57,10 +57,10 @@
      </script>
  </head>
  <body>
-diff --git a/PerformanceTests/Animation/raf-animation.html b/PerformanceTests/Animation/raf-animation.html
-index cb11bc1e7412050c132564e1f2dea9f8729871a6..dbf18e72de9880c28d9fbf9fa156b4949bb6a6cf 100644
---- a/PerformanceTests/Animation/raf-animation.html
-+++ b/PerformanceTests/Animation/raf-animation.html
+diff --git a/raf-animation.html b/raf-animation.html
+index 09e72f222fcafdfa054a2d5a37b1dcc9eca096ca..dbf18e72de9880c28d9fbf9fa156b4949bb6a6cf 100644
+--- a/raf-animation.html
++++ b/raf-animation.html
 @@ -195,9 +195,54 @@
          {
              makeParticles();
@@ -75,8 +75,8 @@
 +        {
 +            if (location.hash === '#submit')
 +                submitResults();
-         }
- 
++        }
++
 +        function submitResults()
 +        {
 +            var results = {
@@ -109,8 +109,67 @@
 +                }
 +            }
 +            xhr.send(resultsString);
+         }
+         
+         window.addEventListener('load', setupAnimation, false);
++        window.addEventListener("hashchange", hashChanged, false);
+     </script>
+ </head>
+ <body>
+diff --git a/svg-animation.html b/svg-animation.html
+index c286d50cc7e0e6d64e1b6fbd2beb3642fe90e958..fb21d522ca200021d452595cbfed3db252c80929 100644
+--- a/svg-animation.html
++++ b/svg-animation.html
+@@ -150,9 +150,54 @@
+         function setupAnimation()
+         {
+             makeParticles();
++
++            window.setTimeout(function() {
++                location.hash = 'done';
++            }, 10000)
 +        }
-+        
++
++        function hashChanged()
++        {
++            if (location.hash === '#submit')
++                submitResults();
++        }
++
++        function submitResults()
++        {
++            var results = {
++                'content-animation' : {
++                    'metrics' : {
++                        'FrameRate' : ['Arithmetic']
++                    },
++                    'tests' : {
++                        'svg-animation' : {
++                            'metrics' : {
++                                'FrameRate' : {
++                                    'current' : ['<native_framerate>'] // <native_framerate> is replaced by a framerate computed in native code
++                                }
++                            }
++                        }
++                    }
++                }
++            };
++            var resultsString = JSON.stringify(results);
++            var xhr = new XMLHttpRequest();
++            xhr.open("POST", "/report");
++            xhr.setRequestHeader("Content-type", "application/json");
++            xhr.setRequestHeader("Content-length", resultsString.length);
++            xhr.setRequestHeader("Connection", "close");
++            xhr._onreadystatechange_ = function() {
++                if (xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200) {
++                    closeRequest = new XMLHttpRequest();
++                    closeRequest.open("GET", "/shutdown");
++                    closeRequest.send()
++                }
++            }
++            xhr.send(resultsString);
+         }
+         
          window.addEventListener('load', setupAnimation, false);
 +        window.addEventListener("hashchange", hashChanged, false);
      </script>

Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/content-animation.plan (200052 => 200053)


--- trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/content-animation.plan	2016-04-25 21:58:11 UTC (rev 200052)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/content-animation.plan	2016-04-25 22:40:24 UTC (rev 200053)
@@ -1,10 +1,12 @@
 {
     "timeout": 120,
     "count": 5,
-    "svn_source": "https://svn.webkit.org/repository/webkit/trunk/PerformanceTests/Animation/@r199806",
+    "svn_source": "https://svn.webkit.org/repository/webkit/trunk/PerformanceTests/Animation/@r200049",
+    "benchmark_patch": "data/patches/ContentAnimation.patch",
     "test_files": [
-    	"css-animation.html",
-    	"raf-animation.html"
+        "css-animation.html",
+        "svg-animation.html",
+        "raf-animation.html"
     ],
     "output_file": "css-animation.result",
     "options": {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to