Bug 159246 - ES6SampleBench should have a harness
Summary: ES6SampleBench should have a harness
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-28 21:44 PDT by Filip Pizlo
Modified: 2016-06-28 22:56 PDT (History)
4 users (show)

See Also:


Attachments
the patch (33.42 KB, patch)
2016-06-28 21:50 PDT, Filip Pizlo
sbarati: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2016-06-28 21:44:56 PDT
Patch forthcoming.
Comment 1 Filip Pizlo 2016-06-28 21:50:25 PDT
Created attachment 282318 [details]
the patch
Comment 2 Saam Barati 2016-06-28 22:06:53 PDT
Comment on attachment 282318 [details]
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=282318&action=review

> PerformanceTests/ES6SampleBench/driver.js:152
> +            magicFrame.contentDocument.write(
> +                "<!DOCTYPE html><head><title>benchmark payload</title></head><body><script>\n" +
> +                "window.onerror = top." + this._key + ".reportError;\n" +
> +                "function reportResult()\n" +
> +                "{\n" +
> +                "    var driver = top." + this._key + ";\n" +
> +                "    driver.reportResult.apply(driver, arguments);\n" +
> +                "}\n" +
> +                "</script>\n" +
> +                this._benchmark.code + "</body></html>");

Nit: This would be easier to read as a template literal
Comment 3 Filip Pizlo 2016-06-28 22:54:54 PDT
(In reply to comment #2)
> Comment on attachment 282318 [details]
> the patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=282318&action=review
> 
> > PerformanceTests/ES6SampleBench/driver.js:152
> > +            magicFrame.contentDocument.write(
> > +                "<!DOCTYPE html><head><title>benchmark payload</title></head><body><script>\n" +
> > +                "window.onerror = top." + this._key + ".reportError;\n" +
> > +                "function reportResult()\n" +
> > +                "{\n" +
> > +                "    var driver = top." + this._key + ";\n" +
> > +                "    driver.reportResult.apply(driver, arguments);\n" +
> > +                "}\n" +
> > +                "</script>\n" +
> > +                this._benchmark.code + "</body></html>");
> 
> Nit: This would be easier to read as a template literal

Good idea!  Fixed.
Comment 4 Filip Pizlo 2016-06-28 22:56:19 PDT
Landed in https://trac.webkit.org/changeset/202613