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:
Martin Yankov
2018-02-09 16:04:20 +02:00
committed by Alexander Vakrilov
parent 0c8275fa06
commit b113b0021a
11 changed files with 227 additions and 123 deletions

View File

@@ -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);
};
};