| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 2 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 { | 106 { |
| 107 testRunner.evaluateInWebInspector(++lastFrontendEvalId, script); | 107 testRunner.evaluateInWebInspector(++lastFrontendEvalId, script); |
| 108 } | 108 } |
| 109 | 109 |
| 110 function navigateProtocolTest(url) | 110 function navigateProtocolTest(url) |
| 111 { | 111 { |
| 112 url += (url.indexOf("?") === -1 ? "?" : "&") + reloadParam + lastFrontendEva
lId; | 112 url += (url.indexOf("?") === -1 ? "?" : "&") + reloadParam + lastFrontendEva
lId; |
| 113 window.location.replace(url); | 113 window.location.replace(url); |
| 114 } | 114 } |
| 115 | 115 |
| 116 function prepareForReload() |
| 117 { |
| 118 window.location += "#" + reloadParam + lastFrontendEvalId; |
| 119 } |
| 120 |
| 116 function openInspector() | 121 function openInspector() |
| 117 { | 122 { |
| 118 var scriptTags = document.getElementsByTagName("script"); | 123 var scriptTags = document.getElementsByTagName("script"); |
| 119 var scriptUrlBasePath = ""; | 124 var scriptUrlBasePath = ""; |
| 120 for (var i = 0; i < scriptTags.length; ++i) { | 125 for (var i = 0; i < scriptTags.length; ++i) { |
| 121 var index = scriptTags[i].src.lastIndexOf("/inspector-protocol-test.js")
; | 126 var index = scriptTags[i].src.lastIndexOf("/inspector-protocol-test.js")
; |
| 122 if (index > -1 ) { | 127 if (index > -1 ) { |
| 123 scriptUrlBasePath = scriptTags[i].src.slice(0, index); | 128 scriptUrlBasePath = scriptTags[i].src.slice(0, index); |
| 124 break; | 129 break; |
| 125 } | 130 } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 136 continue; | 141 continue; |
| 137 initializers += "(" + window[symbol].toString() + ")();\n"; | 142 initializers += "(" + window[symbol].toString() + ")();\n"; |
| 138 } | 143 } |
| 139 evaluateInFrontend(initializers + "(" + testFunction.toString() +")();")
; | 144 evaluateInFrontend(initializers + "(" + testFunction.toString() +")();")
; |
| 140 return; | 145 return; |
| 141 } | 146 } |
| 142 // Kill waiting process if failed to send. | 147 // Kill waiting process if failed to send. |
| 143 alert("Failed to send test function"); | 148 alert("Failed to send test function"); |
| 144 testRunner.notifyDone(); | 149 testRunner.notifyDone(); |
| 145 } | 150 } |
| OLD | NEW |