1 <script src=
"../../../../resources/testharness.js"></script>
5 function getJSONP(url
) {
6 var sc
= document
.createElement('script');
8 var promise
= new Promise(function(resolve
, reject
) {
9 // This callback function is called by appending a script element.
13 function() { reject('Failed to load url:' + url
); });
15 document
.body
.appendChild(sc
);
24 "type=opaque&clone=1",
25 "type=default&clone=1",
27 "type=opaque&clone=2",
28 "type=default&clone=2",
29 "type=basic&passThroughCache=true",
30 "type=opaque&passThroughCache=true",
31 "type=default&passThroughCache=true",
32 "type=basic&clone=1&passThroughCache=true",
33 "type=opaque&clone=1&passThroughCache=true",
34 "type=default&clone=1&passThroughCache=true",
35 "type=basic&clone=2&passThroughCache=true",
36 "type=opaque&clone=2&passThroughCache=true",
37 "type=default&clone=2&passThroughCache=true",
40 function executeTest(url
) {
42 .then(function(result
) {
43 assert_equals(result
, 'OK', 'The result must be OK url:' + url
);
48 var urls
= TEST_CASES
.map(function(param
) { return 'TestRequest?' + param
; });
49 var promise
= Promise
.resolve();
50 for (var i
= 0; i
< urls
.length
; ++i
) {
51 promise
= promise
.then(executeTest
.bind(undefined, urls
[i
]));