| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 var pass = chrome.test.callbackPass; | 5 var pass = chrome.test.callbackPass; |
| 6 var fail = chrome.test.callbackFail; | 6 var fail = chrome.test.callbackFail; |
| 7 | 7 |
| 8 var debuggee; | 8 var debuggee; |
| 9 var protocolVersion = "1.1"; | 9 var protocolVersion = "1.2"; |
| 10 | 10 |
| 11 chrome.test.runTests([ | 11 chrome.test.runTests([ |
| 12 | 12 |
| 13 function attach() { | 13 function attach() { |
| 14 var extensionId = chrome.extension.getURL('').split('/')[2]; | 14 var extensionId = chrome.extension.getURL('').split('/')[2]; |
| 15 debuggee = {extensionId: extensionId}; | 15 debuggee = {extensionId: extensionId}; |
| 16 chrome.debugger.attach(debuggee, protocolVersion, pass()); | 16 chrome.debugger.attach(debuggee, protocolVersion, pass()); |
| 17 }, | 17 }, |
| 18 | 18 |
| 19 function attachToMissing() { | 19 function attachToMissing() { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 if (page) { | 64 if (page) { |
| 65 chrome.debugger.attach({targetId: page.id}, protocolVersion, pass()); | 65 chrome.debugger.attach({targetId: page.id}, protocolVersion, pass()); |
| 66 } else { | 66 } else { |
| 67 chrome.test.fail("Cannot discover a newly created worker"); | 67 chrome.test.fail("Cannot discover a newly created worker"); |
| 68 } | 68 } |
| 69 }); | 69 }); |
| 70 }; | 70 }; |
| 71 workerPort.start(); | 71 workerPort.start(); |
| 72 } | 72 } |
| 73 ]); | 73 ]); |
| OLD | NEW |