mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat: Add methods to get the root view and set a different root view at run time (#5386)
* feat: add option to set a different root view at run time * feat: expose application getRootView method * refactor: Introduce ViewEntry interface * fix: Respect root view rturned from launch event in Android * refactor: getRootView() code + caching root view per activity. * refactor: add app-root.xml in apps * refactor: http test made async
This commit is contained in:
committed by
Alexander Vakrilov
parent
0c8275fa06
commit
b113b0021a
@@ -634,20 +634,12 @@ export var test_request_jsonAsContentSentAndReceivedProperly = function (done) {
|
||||
};
|
||||
|
||||
declare var Worker: any;
|
||||
export var test_getString_WorksProperlyInWorker = function () {
|
||||
var ready;
|
||||
|
||||
var worker = new Worker("./http-string-worker");
|
||||
|
||||
worker.onmessage = function (msg) {
|
||||
TKUnit.assert(typeof msg.data === "string", "Result from getString() should be valid string object!");
|
||||
ready = true;
|
||||
}
|
||||
|
||||
worker.onerror = function (e) {
|
||||
ready = true;
|
||||
throw e;
|
||||
}
|
||||
|
||||
TKUnit.waitUntilReady(() => ready);
|
||||
}
|
||||
export var test_getString_WorksProperlyInWorker = function(done) {
|
||||
let worker = new Worker("./http-string-worker");
|
||||
worker.onmessage = function(msg) {
|
||||
done();
|
||||
};
|
||||
worker.onerror = function(e) {
|
||||
done(e);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user