| OLD | NEW |
| 1 function checkIfFrameLocationMatchesSrcAndCallDone(frameId) | 1 function checkIfFrameLocationMatchesSrcAndCallDone(frameId) |
| 2 { | 2 { |
| 3 if (!window.testRunner) | 3 if (!window.testRunner) |
| 4 return; | 4 return; |
| 5 | 5 |
| 6 var actualURL = 'unavailable', frame = document.getElementById(frameId); | 6 var actualURL = 'unavailable', frame = document.getElementById(frameId); |
| 7 try { | 7 try { |
| 8 actualURL = frame.contentWindow.location.href; | 8 actualURL = frame.contentWindow.location.href; |
| 9 } | 9 } |
| 10 catch (e) { | 10 catch (e) { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 } | 41 } |
| 42 } | 42 } |
| 43 frameContent.write('</form>'); | 43 frameContent.write('</form>'); |
| 44 frameContent.close(); | 44 frameContent.close(); |
| 45 if (callbackWhenDone) | 45 if (callbackWhenDone) |
| 46 iFrameObj.onload = callbackWhenDone; | 46 iFrameObj.onload = callbackWhenDone; |
| 47 frameContent.getElementById('form').submit(); | 47 frameContent.getElementById('form').submit(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 | 50 |
| 51 function notifyDoneAfterReceivingBeforeloadFromIds(ids) | 51 function notifyDoneAfterReceivingLoaded() |
| 52 { | 52 { |
| 53 var loadAttempted = 0; | |
| 54 window.addEventListener("message", function(event) { | 53 window.addEventListener("message", function(event) { |
| 55 var index = ids.indexOf(event.data); | 54 if (event.data == "loaded") |
| 56 if (index == -1) | |
| 57 return; | |
| 58 | |
| 59 loadAttempted = loadAttempted | (1 << index); | |
| 60 if (loadAttempted == (1 << ids.length) - 1) | |
| 61 testRunner.notifyDone(); | 55 testRunner.notifyDone(); |
| 62 }, false); | 56 }, false); |
| 63 } | 57 } |
| 64 | 58 |
| OLD | NEW |