https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 22ee639e7d52dea59f2be311a7264a96f062dfe9 authored by Chris Rebert on 28 November 2016, 01:36:43 UTC
Add tests for Event.returnValue
Tip revision: 22ee639
invoke_with_timing_attributes.worker.js
importScripts("/resources/testharness.js");
importScripts("resources/webperftestharness.js");

function emit_test(attrName) {
    test(function() {
      performance.mark(attrName);
      performance.clearMarks(attrName);
    }, "performance.mark should not throw if used with timing attribute " + attrName
       + " in workers");
}
for (var i in timingAttributes) {
  emit_test(timingAttributes[i]);
}

function emit_test2(attrName) {
    test(function() {
      performance.measure(attrName);
      performance.clearMeasures(attrName);
    }, "performance.measure should not throw if used with timing attribute " + attrName
       + " in workers");
}
for (var i in timingAttributes) {
  emit_test2(timingAttributes[i]);
}
done();
back to top