mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 22:53:28 +00:00
migrate more tests to htmlRunner
This commit is contained in:
@@ -92,6 +92,15 @@
|
||||
_registerErrorCallback();
|
||||
}
|
||||
|
||||
async function async(promise, cb) {
|
||||
const script_id = document.currentScript.id;
|
||||
const stack = new Error().stack;
|
||||
const value = await promise;
|
||||
this._captured = {script_id: script_id, stack: stack};
|
||||
cb(value);
|
||||
this._captured = null;
|
||||
}
|
||||
|
||||
function _recordExecution() {
|
||||
if (testing._status === 'fail') {
|
||||
return;
|
||||
@@ -161,6 +170,7 @@
|
||||
_executed_scripts: new Set(),
|
||||
_captured: null,
|
||||
skip: skip,
|
||||
async: async,
|
||||
getStatus: getStatus,
|
||||
eventually: eventually,
|
||||
expectEqual: expectEqual,
|
||||
@@ -177,4 +187,9 @@
|
||||
window.$$ = function(sel) {
|
||||
return document.querySelectorAll(sel);
|
||||
}
|
||||
|
||||
if (!console.lp) {
|
||||
// make this work in the browser
|
||||
console.lp = console.log;
|
||||
}
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user