Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativeecmascript / data / include_remote.js
1 var myvar = 10;
2
3 function go()
4 {
5     var a = Qt.include("http://127.0.0.1:8111/remote_file.js", 
6                        function(o) { 
7                             test2 = o.status == o.OK
8                             test3 = a.status == a.OK
9                             test4 = myvar == 13
10
11                             done = true;
12                        });
13     test1 = a.status == a.LOADING
14
15
16     var b = Qt.include("http://127.0.0.1:8111/exception.js", 
17                        function(o) { 
18                             test7 = o.status == o.EXCEPTION
19                             test8 = b.status == a.EXCEPTION
20                             test9 = b.exception.toString() == "Whoops!";
21                             test10 = o.exception.toString() == "Whoops!";
22
23                             done2 = true;
24                        });
25     test6 = b.status == b.LOADING
26 }