mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 12:22:51 +08:00
Merge pull request #17403 from wangmengHB:master
Fix Test Case: in latest version, window.cv is a promise instance that makes most test case failed. * Fix Browser Test Case: In latest version, window.cv is a promise instance In latest version of opencv.js, window.cv is promise instance. So that most of the test cases is run failed. This commit is to fix browser test case. * Add comment for backward compatible Add comments for backward compatible
This commit is contained in:
parent
c6b60e219d
commit
ab2c59b80e
@ -49,8 +49,17 @@
|
|||||||
postRun: [] ,
|
postRun: [] ,
|
||||||
onRuntimeInitialized: function() {
|
onRuntimeInitialized: function() {
|
||||||
console.log("Emscripten runtime is ready, launching QUnit tests...");
|
console.log("Emscripten runtime is ready, launching QUnit tests...");
|
||||||
//console.log(cv.getBuildInformation());
|
if (window.cv instanceof Promise) {
|
||||||
QUnit.start();
|
window.cv.then((target) => {
|
||||||
|
window.cv = target;
|
||||||
|
//console.log(cv.getBuildInformation());
|
||||||
|
QUnit.start();
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// for backward compatible
|
||||||
|
// console.log(cv.getBuildInformation());
|
||||||
|
QUnit.start();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
print: (function() {
|
print: (function() {
|
||||||
var element = document.getElementById('output');
|
var element = document.getElementById('output');
|
||||||
|
Loading…
Reference in New Issue
Block a user