~abreu-alexandre/unity-webapps-qml/fail-safe-content-hub-bindings

« back to all changes in this revision

Viewing changes to tests/unit/test_qml/tst_dispatch.qml

Add bidirectional callback support between js <-> qml, 

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
        var simple_backend = {This: { Is: { A: {Backend: function (args) { mockedWebView.called(args) } } } } };
21
21
 
22
 
        webapps._opt_backendProxies = simple_backend;
 
22
        webapps.customBackendProxies = simple_backend;
23
23
        webapps.name = "test_properBackendDispatched";
24
24
        webapps.bindee = mockedWebView;
25
25
 
47
47
 
48
48
        var simple_backend = {This: { Is: { A: {Backend: action } } } };
49
49
 
50
 
        webapps._opt_backendProxies = simple_backend;
 
50
        webapps.customBackendProxies = simple_backend;
51
51
        webapps.name = "test_backendDispatchedWithProperArguments";
52
52
        webapps.bindee = mockedWebView;
53
53
 
65
65
 
66
66
        var invalid_backend = {This: { Is: { Not: { A: {Backend: function (args) { mockedWebView.called(args) } } } } } };
67
67
 
68
 
        webapps._opt_backendProxies = invalid_backend;
 
68
        webapps.customBackendProxies = invalid_backend;
69
69
        webapps.name = "test_invalidBackendNotDispatched";
70
70
        webapps.bindee = mockedWebView;
71
71
 
94
94
 
95
95
        var backend = {This: { Is: { A: {Backend: action } } } };
96
96
 
97
 
        webapps._opt_backendProxies = backend;
 
97
        webapps.customBackendProxies = backend;
98
98
        webapps.name = "test_callbacksAreWrapped";
99
99
        webapps.bindee = mockedWebView;
100
100