OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <script> | 4 <script> |
5 if (window.testRunner) { | 5 if (window.testRunner) { |
6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
7 | 7 |
8 var intTest = testRunner.evaluateScriptInIsolatedWorldAndReturnValue(0, "5"); | 8 var intTest = testRunner.evaluateScriptInIsolatedWorldAndReturnValue(1, "5"); |
9 document.body.appendChild(document.createTextNode('Expecting 5: ' + intTest)); | 9 document.body.appendChild(document.createTextNode('Expecting 5: ' + intTest)); |
10 document.body.appendChild(document.createElement('br')); | 10 document.body.appendChild(document.createElement('br')); |
11 | 11 |
12 var doubleTest = testRunner.evaluateScriptInIsolatedWorldAndReturnValue(0, "3.
14"); | 12 var doubleTest = testRunner.evaluateScriptInIsolatedWorldAndReturnValue(1, "3.
14"); |
13 document.body.appendChild(document.createTextNode('Expecting 3.14: ' + doubleT
est)); | 13 document.body.appendChild(document.createTextNode('Expecting 3.14: ' + doubleT
est)); |
14 document.body.appendChild(document.createElement('br')); | 14 document.body.appendChild(document.createElement('br')); |
15 | 15 |
16 var stringTest = testRunner.evaluateScriptInIsolatedWorldAndReturnValue(0, '"T
he quick brown dog."'); | 16 var stringTest = testRunner.evaluateScriptInIsolatedWorldAndReturnValue(1, '"T
he quick brown dog."'); |
17 document.body.appendChild(document.createTextNode('Expecting "The quick brown
dog.": ' + stringTest)); | 17 document.body.appendChild(document.createTextNode('Expecting "The quick brown
dog.": ' + stringTest)); |
18 document.body.appendChild(document.createElement('br')); | 18 document.body.appendChild(document.createElement('br')); |
19 | 19 |
20 var booleanTest = testRunner.evaluateScriptInIsolatedWorldAndReturnValue(0, "!
true"); | 20 var booleanTest = testRunner.evaluateScriptInIsolatedWorldAndReturnValue(1, "!
true"); |
21 document.body.appendChild(document.createTextNode('Expecting false: ' + boolea
nTest)); | 21 document.body.appendChild(document.createTextNode('Expecting false: ' + boolea
nTest)); |
22 document.body.appendChild(document.createElement('br')); | 22 document.body.appendChild(document.createElement('br')); |
23 | 23 |
24 var nullTest = testRunner.evaluateScriptInIsolatedWorldAndReturnValue(0, "null
"); | 24 var nullTest = testRunner.evaluateScriptInIsolatedWorldAndReturnValue(1, "null
"); |
25 document.body.appendChild(document.createTextNode('Expecting null: ' + nullTes
t)); | 25 document.body.appendChild(document.createTextNode('Expecting null: ' + nullTes
t)); |
26 document.body.appendChild(document.createElement('br')); | 26 document.body.appendChild(document.createElement('br')); |
27 } | 27 } |
28 </script> | 28 </script> |
29 </body> | 29 </body> |
30 </html> | 30 </html> |
OLD | NEW |