OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 var testSerial = function() { |
| 6 var onClose = function(result) { |
| 7 chrome.test.assertTrue(result); |
| 8 chrome.test.succeed(); |
| 9 } |
| 10 |
| 11 var onOpen = function(connectionInfo) { |
| 12 var connectionId = connectionInfo.connectionId; |
| 13 chrome.test.assertTrue(connectionId > 0); |
| 14 chrome.experimental.serial.close(connectionId, onClose); |
| 15 } |
| 16 |
| 17 chrome.experimental.serial.open("/dev/null", onOpen); |
| 18 }; |
| 19 |
| 20 chrome.test.runTests([testSerial]); |
OLD | NEW |