| OLD | NEW | 
|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 if (!chrome || !chrome.test) | 5 if (!chrome || !chrome.test) | 
| 6   throw new Error('chrome.test is undefined'); | 6   throw new Error('chrome.test is undefined'); | 
| 7 | 7 | 
| 8 var portNumber; | 8 var portNumber; | 
| 9 | 9 | 
| 10 // This is a good end-to-end test for two reasons. The first is obvious - it | 10 // This is a good end-to-end test for two reasons. The first is obvious - it | 
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 86       tabId = tab.id; | 86       tabId = tab.id; | 
| 87     }); | 87     }); | 
| 88   }, | 88   }, | 
| 89   function castStreaming() { | 89   function castStreaming() { | 
| 90     // chrome.cast.streaming APIs are the only ones that are triply-prefixed. | 90     // chrome.cast.streaming APIs are the only ones that are triply-prefixed. | 
| 91     chrome.test.assertTrue(!!chrome.cast); | 91     chrome.test.assertTrue(!!chrome.cast); | 
| 92     chrome.test.assertTrue(!!chrome.cast.streaming); | 92     chrome.test.assertTrue(!!chrome.cast.streaming); | 
| 93     chrome.test.assertTrue(!!chrome.cast.streaming.udpTransport); | 93     chrome.test.assertTrue(!!chrome.cast.streaming.udpTransport); | 
| 94     chrome.test.assertTrue(!!chrome.cast.streaming.udpTransport.setOptions); | 94     chrome.test.assertTrue(!!chrome.cast.streaming.udpTransport.setOptions); | 
| 95     chrome.test.succeed(); | 95     chrome.test.succeed(); | 
| 96   } | 96   }, | 
|  | 97   function testLastError() { | 
|  | 98     chrome.runtime.setUninstallURL('chrome://newtab', function() { | 
|  | 99       chrome.test.assertLastError('Invalid URL: "chrome://newtab".'); | 
|  | 100       chrome.test.succeed(); | 
|  | 101     }); | 
|  | 102   }, | 
| 97 ]; | 103 ]; | 
| 98 | 104 | 
| 99 chrome.test.getConfig(config => { | 105 chrome.test.getConfig(config => { | 
| 100   chrome.test.assertTrue(!!config, 'config does not exist'); | 106   chrome.test.assertTrue(!!config, 'config does not exist'); | 
| 101   chrome.test.assertTrue(!!config.testServer, 'testServer does not exist'); | 107   chrome.test.assertTrue(!!config.testServer, 'testServer does not exist'); | 
| 102   portNumber = config.testServer.port; | 108   portNumber = config.testServer.port; | 
| 103   chrome.test.runTests(tests); | 109   chrome.test.runTests(tests); | 
| 104 }); | 110 }); | 
| OLD | NEW | 
|---|