Changeset 221206 in webkit


Ignore:
Timestamp:
Aug 25, 2017 2:59:29 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Speedometer: Restructure Ember example
https://bugs.webkit.org/show_bug.cgi?id=175926

Patch by Mathias Bynens <mathias@qiwi.be> on 2017-08-25
Reviewed by Ryosuke Niwa.

This patch removes an unused stylesheet from the output, and gets rid of the unneeded intermediate source folder.

  • Speedometer/resources/tests.js: Update path to Ember benchmark.
  • Speedometer/resources/todomvc/architecture-examples/emberjs/source/*: Moved to ../.
  • Speedometer/resources/todomvc/architecture-examples/emberjs/app/index.html: Removed stylesheet reference.
  • Speedometer/resources/todomvc/architecture-examples/emberjs/app/styles/.gitkeep: Added.
  • Speedometer/resources/todomvc/architecture-examples/emberjs/dist/*: Regenerated per build instructions.
Location:
trunk/PerformanceTests
Files:
16 added
5 deleted
5 edited
45 copied

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r221205 r221206  
     12017-08-25  Mathias Bynens  <mathias@qiwi.be>
     2
     3        Speedometer: Restructure Ember example
     4        https://bugs.webkit.org/show_bug.cgi?id=175926
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        This patch removes an unused stylesheet from the output, and gets rid of the unneeded intermediate `source` folder.
     9
     10        * Speedometer/resources/tests.js: Update path to Ember benchmark.
     11        * Speedometer/resources/todomvc/architecture-examples/emberjs/source/*: Moved to `../`.
     12        * Speedometer/resources/todomvc/architecture-examples/emberjs/app/index.html: Removed stylesheet reference.
     13        * Speedometer/resources/todomvc/architecture-examples/emberjs/app/styles/.gitkeep: Added.
     14        * Speedometer/resources/todomvc/architecture-examples/emberjs/dist/*: Regenerated per build instructions.
     15
    1162017-08-24  Ryosuke Niwa  <rniwa@webkit.org>
    217
  • trunk/PerformanceTests/Speedometer/resources/tests.js

    r221205 r221206  
    167167Suites.push({
    168168    name: 'EmberJS-TodoMVC',
    169     url: 'todomvc/architecture-examples/emberjs/index.html',
     169    url: 'todomvc/architecture-examples/emberjs/dist/index.html',
    170170    prepare: function (runner, contentWindow, contentDocument) {
    171171        return runner.waitForElement('#new-todo').then(function (element) {
  • trunk/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs/.gitignore

    r221205 r221206  
    33# compiled output
    44# /dist
     5/dist/assets/.gitkeep
    56/tmp
    67
  • trunk/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs/README.md

    r220373 r221206  
    11# Speedometer 2.0: Ember.js TodoMVC example
    22
    3 See `source/README.md`.
     3## Test locally
     4
     51. `npm install && bower install`
     62. `npm run build`
     73. Run a local server from the `dist` directory. (You could use [`npm i -g http-server`](https://github.com/indexzero/http-server).)
     84. Open the URL pointing to the local server in your web browser of choice.
  • trunk/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs/app/index.html

    r221205 r221206  
    99    {{content-for "head"}}
    1010    <link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
    11     <link rel="stylesheet" href="{{rootURL}}assets/todomvc.css">
    1211    {{content-for "head-footer"}}
    1312  </head>
  • trunk/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs/dist/assets/todomvc-677491ba42e10b5fa16875d8bcaf1c6c.js

    r221205 r221206  
    2828t.length=0,t.getItem=function(e){return o[e]||null},t.setItem=function(e,n){void 0===n?t.removeItem(e):(o.hasOwnProperty(e)||t.length++,o[e]=""+n)},t.removeItem=function(e){o.hasOwnProperty(e)&&(delete o[e],t.length--)},t.key=function(e){return Object.keys(o)[e]||null},t.clear=function(){o={},t.length=0},e.localStorageMemory=t})(window)}),define("todomvc/services/repo",["exports","ember","todomvc/services/memory"],function(e,t,o){e.default=t.default.Service.extend({lastId:0,data:null,findAll:function(){return this.get("data")||this.set("data",JSON.parse(window.localStorageMemory.getItem("todos")||"[]"))},add:function(e){var t=Object.assign({id:this.incrementProperty("lastId")},e)
    2929return this.get("data").pushObject(t),this.persist(),t},delete:function(e){this.get("data").removeObject(e),this.persist()},persist:function(){window.localStorageMemory.setItem("todos",JSON.stringify(this.get("data")))}})}),define("todomvc/templates/active",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"aAsc4Lt8",block:'{"statements":[[1,[33,["todo-list"],null,[["todos"],[[28,["todos"]]]]],false]],"locals":[],"named":[],"yields":[],"hasPartials":false}',meta:{moduleName:"todomvc/templates/active.hbs"}})}),define("todomvc/templates/application",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"BYnyz5ON",block:'{"statements":[[11,"section",[]],[15,"id","todoapp"],[13],[0,"\\n  "],[11,"header",[]],[15,"id","header"],[13],[0,"\\n    "],[11,"h1",[]],[13],[0,"todos"],[14],[0,"\\n    "],[11,"input",[]],[15,"type","text"],[15,"id","new-todo"],[16,"onkeydown",[33,["action"],[[28,[null]],"createTodo"],null],null],[15,"placeholder","What needs to be done?"],[15,"autofocus",""],[13],[14],[0,"\\n  "],[14],[0,"\\n    "],[1,[26,["outlet"]],false],[0,"\\n"],[6,["if"],[[33,["gt"],[[28,["model","length"]],0],null]],null,{"statements":[[0,"      "],[11,"footer",[]],[15,"id","footer"],[13],[0,"\\n        "],[11,"span",[]],[15,"id","todo-count"],[13],[11,"strong",[]],[13],[1,[28,["remaining","length"]],false],[14],[0," "],[1,[33,["pluralize"],["item",[28,["remaining","length"]]],null],false],[0," left"],[14],[0,"\\n        "],[11,"ul",[]],[15,"id","filters"],[13],[0,"\\n          "],[11,"li",[]],[13],[6,["link-to"],["index"],[["activeClass"],["selected"]],{"statements":[[0,"All"]],"locals":[]},null],[14],[0,"\\n          "],[11,"li",[]],[13],[6,["link-to"],["active"],[["activeClass"],["selected"]],{"statements":[[0,"Active"]],"locals":[]},null],[14],[0,"\\n          "],[11,"li",[]],[13],[6,["link-to"],["completed"],[["activeClass"],["selected"]],{"statements":[[0,"Completed"]],"locals":[]},null],[14],[0,"\\n        "],[14],[0,"\\n"],[6,["if"],[[28,["completed","length"]]],null,{"statements":[[0,"          "],[11,"button",[]],[15,"id","clear-completed"],[16,"onclick",[33,["action"],[[28,[null]],"clearCompleted"],null],null],[13],[0,"Clear completed"],[14],[0,"\\n"]],"locals":[]},null],[0,"      "],[14],[0,"\\n"]],"locals":[]},null],[14],[0,"\\n"],[11,"footer",[]],[15,"id","info"],[13],[0,"\\n  "],[11,"p",[]],[13],[0,"Double-click to edit a todo"],[14],[0,"\\n  "],[11,"p",[]],[13],[0,"\\n    Created by\\n    "],[11,"a",[]],[15,"href","http://github.com/cibernox"],[13],[0,"Miguel Camba"],[14],[0,",\\n    "],[11,"a",[]],[15,"href","http://github.com/addyosmani"],[13],[0,"Addy Osmani"],[14],[0,"\\n  "],[14],[0,"\\n  "],[11,"p",[]],[13],[0,"Part of "],[11,"a",[]],[15,"href","http://todomvc.com"],[13],[0,"TodoMVC"],[14],[14],[0,"\\n"],[14]],"locals":[],"named":[],"yields":[],"hasPartials":false}',meta:{moduleName:"todomvc/templates/application.hbs"}})}),define("todomvc/templates/completed",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"F4la9wtb",block:'{"statements":[[1,[33,["todo-list"],null,[["todos"],[[28,["todos"]]]]],false]],"locals":[],"named":[],"yields":[],"hasPartials":false}',meta:{moduleName:"todomvc/templates/completed.hbs"}})}),define("todomvc/templates/components/todo-item",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"dQ3+cK5E",block:'{"statements":[[11,"div",[]],[15,"class","view"],[13],[0,"\\n  "],[11,"input",[]],[15,"type","checkbox"],[15,"class","toggle"],[16,"checked",[28,["todo","completed"]],null],[16,"onchange",[33,["action"],[[28,[null]],"toggleCompleted"],null],null],[13],[14],[0,"\\n  "],[11,"label",[]],[16,"ondblclick",[33,["action"],[[28,[null]],"startEditing"],null],null],[13],[1,[28,["todo","title"]],false],[14],[0,"\\n  "],[11,"button",[]],[16,"onclick",[33,["action"],[[28,[null]],"removeTodo"],null],null],[15,"class","destroy"],[13],[14],[0,"\\n"],[14],[0,"\\n"],[11,"input",[]],[15,"type","text"],[15,"class","edit"],[16,"value",[28,["todo","title"]],null],[16,"onblur",[33,["action"],[[28,[null]],"doneEditing"],[["value"],["target.value"]]],null],[16,"onkeydown",[33,["action"],[[28,[null]],"handleKeydown"],null],null],[15,"autofocus",""],[13],[14]],"locals":[],"named":[],"yields":[],"hasPartials":false}',meta:{moduleName:"todomvc/templates/components/todo-item.hbs"}})}),define("todomvc/templates/components/todo-list",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"XGmWWD63",block:'{"statements":[[6,["if"],[[28,["todos","length"]]],null,{"statements":[[6,["if"],[[28,["canToggle"]]],null,{"statements":[[0,"    "],[11,"input",[]],[15,"type","checkbox"],[15,"id","toggle-all"],[16,"checked",[26,["allCompleted"]],null],[16,"onchange",[33,["action"],[[28,[null]],"toggleAll"],null],null],[13],[14],[0,"\\n"]],"locals":[]},null],[0,"  "],[11,"ul",[]],[15,"id","todo-list"],[15,"class","todo-list"],[13],[0,"\\n"],[6,["each"],[[28,["todos"]]],null,{"statements":[[0,"      "],[1,[33,["todo-item"],null,[["todo","onStartEdit","onEndEdit"],[[28,["todo"]],[33,["action"],[[28,[null]],"disableToggle"],null],[33,["action"],[[28,[null]],"enableToggle"],null]]]],false],[0,"\\n"]],"locals":["todo"]},null],[0,"  "],[14],[0,"\\n"]],"locals":[]},null]],"locals":[],"named":[],"yields":[],"hasPartials":false}',meta:{moduleName:"todomvc/templates/components/todo-list.hbs"}})}),define("todomvc/templates/index",["exports"],function(e){e.default=Ember.HTMLBars.template({id:"hBadNIpo",block:'{"statements":[[6,["if"],[[28,["model","length"]]],null,{"statements":[[0,"  "],[1,[33,["todo-list"],null,[["todos"],[[28,["model"]]]]],false],[0,"\\n"]],"locals":[]},null]],"locals":[],"named":[],"yields":[],"hasPartials":false}',meta:{moduleName:"todomvc/templates/index.hbs"}})}),define("todomvc/config/environment",["ember"],function(e){try{var t="todomvc/config/environment",o=document.querySelector('meta[name="'+t+'"]').getAttribute("content"),n=JSON.parse(unescape(o)),l={default:n}
    30 return Object.defineProperty(l,"__esModule",{value:!0}),l}catch(e){throw new Error('Could not read config from meta tag with name "'+t+'".')}}),runningTests||require("todomvc/app").default.create({name:"todomvc",version:"0.0.0+164d27e2"})
     30return Object.defineProperty(l,"__esModule",{value:!0}),l}catch(e){throw new Error('Could not read config from meta tag with name "'+t+'".')}}),runningTests||require("todomvc/app").default.create({name:"todomvc",version:"0.0.0+64a7cfcd"})
  • trunk/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs/dist/index.html

    r221205 r221206  
    88    <meta name="viewport" content="width=device-width, initial-scale=1">
    99   
    10 <meta name="todomvc/config/environment" content="%7B%22modulePrefix%22%3A%22todomvc%22%2C%22environment%22%3A%22production%22%2C%22baseURL%22%3Anull%2C%22locationType%22%3A%22hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%7D%7D%2C%22APP%22%3A%7B%22name%22%3A%22todomvc%22%2C%22version%22%3A%220.0.0+164d27e2%22%7D%2C%22exportApplicationGlobal%22%3Afalse%7D" />
     10<meta name="todomvc/config/environment" content="%7B%22modulePrefix%22%3A%22todomvc%22%2C%22environment%22%3A%22production%22%2C%22baseURL%22%3Anull%2C%22locationType%22%3A%22hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%7D%7D%2C%22APP%22%3A%7B%22name%22%3A%22todomvc%22%2C%22version%22%3A%220.0.0+64a7cfcd%22%7D%2C%22exportApplicationGlobal%22%3Afalse%7D" />
    1111    <link rel="stylesheet" href="assets/vendor-7b5c98520910afa58d74e05ec86cd873.css" integrity="sha256-bsagGHduhay9QPLUFpddcZFq7Kmr2ScM3VKnWhdX8oM= sha512-eNsGN2aLecWPvoqNVH8oXK8o/IJ7rO5ti0zgS8lF8LiwmKUHdEIuFduwcDL1VLAt2r+3YjgDzoSNYK6c57pJzw==" >
    12     <link rel="stylesheet" href="assets/todomvc-d41d8cd98f00b204e9800998ecf8427e.css" integrity="sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==" >
    1312   
    1413  </head>
     
    1615   
    1716    <script src="assets/vendor-820919567eb7bd4d9fac358a90a5aac4.js" integrity="sha256-BZHBbf1U21+kgPYmoIK7gLkqHu88v5cwEVFfwUPXojs= sha512-2YWrAbR45p8fk3/y4Qhbok/KUfLE/v6yMSUqIWncTmWqfJbyJj0+AiTkJL03k0oPUMZbFYyQx9SuL6XoXp4sgg==" ></script>
    18     <script src="assets/todomvc-7601ffca6150ed633f0f333fe76bfaf2.js" integrity="sha256-J9SBPSVPiTlDzBrAevEqRvNz3E++u7jNErZ79EDgR3g= sha512-8QtnoWm6aXdKWOIsnuqQwaU575TkOmagUJS66bIqqZzwM8aUduM6DHlrbTsopZ9M5ok9NLqhKsafEXHWQP0cXg==" ></script>
     17    <script src="assets/todomvc-677491ba42e10b5fa16875d8bcaf1c6c.js" integrity="sha256-GshnmIB2kQAujHPhB44P5QbEHERBTybuBrnUuTZ4+ho= sha512-zzAFfLKLXLZazJBBznOzzQoYSJEtdLYY+zeWxkbH3+lCwo07DbpNT37fspq+OQrgCprOl2jdPverSxgr2vd75A==" ></script>
    1918   
    2019  </body>
  • trunk/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs/testem.js

    r216735 r221206  
    1 /**
    2  * This is dummy file that exists for the sole purpose
    3  * of allowing tests to run directly in the browser as
    4  * well as by Testem.
    5  *
    6  * Testem is configured to run tests directly against
    7  * the test build of index.html, which requires a
    8  * snippet to load the testem.js file:
    9  *   <script src="/testem.js"></script>
    10  * This has to go before the qunit framework and app
    11  * tests are loaded.
    12  *
    13  * Testem internally supplies this file. However, if you
    14  * run the tests directly in the browser (localhost:8000/tests),
    15  * this file does not exist.
    16  *
    17  * Hence the purpose of this fake file. This file is served
    18  * directly from the express server to satisify the script load.
    19  */
     1/*jshint node:true*/
     2module.exports = {
     3    framework: 'qunit',
     4    test_page: 'tests/index.html?hidepassed',
     5    disable_watching: true,
     6    launch_in_ci: [
     7        'PhantomJS'
     8    ],
     9    launch_in_dev: [
     10        'PhantomJS',
     11        'Chrome'
     12    ]
     13};
  • trunk/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs/tests/index.html

    r216946 r221206  
    88    <meta name="viewport" content="width=device-width, initial-scale=1">
    99
    10     <base href="/" />
    11 <meta name="todomvc/config/environment" content="%7B%22modulePrefix%22%3A%22todomvc%22%2C%22environment%22%3A%22test%22%2C%22baseURL%22%3A%22/%22%2C%22locationType%22%3A%22none%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%7D%2C%22APP%22%3A%7B%22LOG_ACTIVE_GENERATION%22%3Afalse%2C%22LOG_VIEW_LOOKUPS%22%3Afalse%2C%22rootElement%22%3A%22%23ember-testing%22%2C%22name%22%3A%22todomvc%22%2C%22version%22%3A%220.0.0+%22%7D%2C%22exportApplicationGlobal%22%3Atrue%7D" />
    12    
     10    {{content-for "head"}}
     11    {{content-for "test-head"}}
    1312
    14     <link rel="stylesheet" href="assets/vendor.css">
    15     <link rel="stylesheet" href="assets/todomvc.css">
    16     <link rel="stylesheet" href="assets/test-support.css">
     13    <link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
     14    <link rel="stylesheet" href="{{rootURL}}assets/todomvc.css">
     15    <link rel="stylesheet" href="{{rootURL}}assets/test-support.css">
    1716
    18    
    19    
     17    {{content-for "head-footer"}}
     18    {{content-for "test-head-footer"}}
    2019  </head>
    2120  <body>
    22    
    23     <div id="qunit"></div>
    24 <div id="qunit-fixture"></div>
     21    {{content-for "body"}}
     22    {{content-for "test-body"}}
    2523
    26 <div id="ember-testing-container">
    27   <div id="ember-testing"></div>
    28 </div>
     24    <script src="/testem.js" integrity=""></script>
     25    <script src="{{rootURL}}assets/vendor.js"></script>
     26    <script src="{{rootURL}}assets/test-support.js"></script>
     27    <script src="{{rootURL}}assets/todomvc.js"></script>
     28    <script src="{{rootURL}}assets/tests.js"></script>
    2929
    30 
    31     <script src="testem.js" integrity=""></script>
    32     <script src="assets/vendor.js"></script>
    33     <script src="assets/test-support.js"></script>
    34     <script src="assets/todomvc.js"></script>
    35     <script src="assets/tests.js"></script>
    36     <script src="assets/test-loader.js"></script>
    37 
    38    
    39     <script>Ember.assert('The tests file was not loaded. Make sure your tests index.html includes "assets/tests.js".', EmberENV.TESTS_FILE_LOADED);</script>
     30    {{content-for "body-footer"}}
     31    {{content-for "test-body-footer"}}
    4032  </body>
    4133</html>
Note: See TracChangeset for help on using the changeset viewer.