Changeset 221401 in webkit


Ignore:
Timestamp:
Aug 30, 2017 3:45:26 PM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Speedometer 2.0: jQuery test fails occasionally
https://bugs.webkit.org/show_bug.cgi?id=176017

Patch by Shiyu Zhang <shiyu.zhang@intel.com> on 2017-08-30
Reviewed by Ryosuke Niwa.

Create a dummy node to notify that app is ready for jQuery suite. It prevents Speedometer injecting items before app.js is loaded.

  • Speedometer/resources/tests.js:

(Suites.push.prepare):

  • Speedometer/resources/todomvc/architecture-examples/jquery/js/app.js:

(jQuery.App.init):

Location:
trunk/PerformanceTests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r221206 r221401  
     12017-08-30  Shiyu Zhang  <shiyu.zhang@intel.com>
     2
     3        Speedometer 2.0: jQuery test fails occasionally
     4        https://bugs.webkit.org/show_bug.cgi?id=176017
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Create a dummy node to notify that app is ready for jQuery suite. It prevents Speedometer injecting items before app.js is loaded.
     9
     10        * Speedometer/resources/tests.js:
     11        (Suites.push.prepare):
     12        * Speedometer/resources/todomvc/architecture-examples/jquery/js/app.js:
     13        (jQuery.App.init):
     14
    1152017-08-25  Mathias Bynens  <mathias@qiwi.be>
    216
  • trunk/PerformanceTests/Speedometer/resources/tests.js

    r221206 r221401  
    356356    url: 'todomvc/architecture-examples/jquery/index.html',
    357357    prepare: function (runner, contentWindow, contentDocument) {
    358         return runner.waitForElement('#new-todo').then(function (element) {
    359             element.focus();
    360             return element;
     358        return runner.waitForElement('#appIsReady').then(function (element) {
     359            var newTodo = contentDocument.getElementById('new-todo');
     360            newTodo.focus();
     361            return newTodo;
    361362        });
    362363    },
  • trunk/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/jquery/js/app.js

    r216713 r221401  
    4747                }.bind(this)
    4848            }).init('/all');
     49
     50            var dummyNodeToNotifyAppIsReady = document.createElement('div');
     51            dummyNodeToNotifyAppIsReady.id = 'appIsReady';
     52            document.body.appendChild(dummyNodeToNotifyAppIsReady);
    4953        },
    5054        bindEvents: function () {
Note: See TracChangeset for help on using the changeset viewer.