| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <div id="description"></div> | 7 <div id="description"></div> |
| 8 <div id="console"></div> | 8 <div id="console"></div> |
| 9 <script> | 9 <script> |
| 10 description('Test Promise native then.'); | 10 description('Test Promise native then.'); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 shouldBe('result', '11'); | 21 shouldBe('result', '11'); |
| 22 return window.internals.addOneToPromise(result); | 22 return window.internals.addOneToPromise(result); |
| 23 }).then(function(result) { | 23 }).then(function(result) { |
| 24 window.result = result; | 24 window.result = result; |
| 25 shouldBe('result', '12'); | 25 shouldBe('result', '12'); |
| 26 testPassed('DONE'); | 26 testPassed('DONE'); |
| 27 }, function() { | 27 }, function() { |
| 28 testFailed("rejected"); | 28 testFailed("rejected"); |
| 29 }).then(finishJSTest, finishJSTest); | 29 }).then(finishJSTest, finishJSTest); |
| 30 | 30 |
| 31 resolve(10); | 31 resolve(new Promise(function(resolve) { resolve(10); })); |
| 32 | 32 |
| 33 </script> | 33 </script> |
| 34 </body> | 34 </body> |
| 35 </html> | 35 </html> |
| OLD | NEW |