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) { |
11 | 11 actualURL = '[Location object access threw exception]'; |
| 12 } |
| 13 |
12 if (actualURL != frame.src) | 14 if (actualURL != frame.src) |
13 alert('URL mismatch: ' + actualURL + ' vs. ' + frame.src); | 15 alert('URL mismatch: \'' + actualURL + '\' vs. \'' + frame.src + '\''); |
14 | 16 |
15 testRunner.notifyDone(); | 17 testRunner.notifyDone(); |
16 } | 18 } |
17 | 19 |
18 function sendRequestFromIFrame(url, params, HTTPMethod, callbackWhenDone) | 20 function sendRequestFromIFrame(url, params, HTTPMethod, callbackWhenDone) |
19 { | 21 { |
20 if (!params || !params.length) | 22 if (!params || !params.length) |
21 return; | 23 return; |
22 | 24 |
23 if (!HTTPMethod) | 25 if (!HTTPMethod) |
(...skipping 29 matching lines...) Expand all Loading... |
53 var index = ids.indexOf(event.data); | 55 var index = ids.indexOf(event.data); |
54 if (index == -1) | 56 if (index == -1) |
55 return; | 57 return; |
56 | 58 |
57 loadAttempted = loadAttempted | (1 << index); | 59 loadAttempted = loadAttempted | (1 << index); |
58 if (loadAttempted == (1 << ids.length) - 1) | 60 if (loadAttempted == (1 << ids.length) - 1) |
59 testRunner.notifyDone(); | 61 testRunner.notifyDone(); |
60 }, false); | 62 }, false); |
61 } | 63 } |
62 | 64 |
OLD | NEW |