Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6321)

Unified Diff: chrome/test/data/extensions/api_test/serial/api/background.js

Issue 9174019: Add skeleton plumbing for serial API. No functionality yet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/serial/api/background.js
diff --git a/chrome/test/data/extensions/api_test/serial/api/background.js b/chrome/test/data/extensions/api_test/serial/api/background.js
new file mode 100644
index 0000000000000000000000000000000000000000..b5812eaae071ceac90b722a64d14b82396926ab0
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/serial/api/background.js
@@ -0,0 +1,20 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+var testSerial = function() {
+ var onClose = function(result) {
+ chrome.test.assertTrue(result);
+ chrome.test.succeed();
+ }
+
+ var onOpen = function(connectionInfo) {
+ var connectionId = connectionInfo.connectionId;
+ chrome.test.assertTrue(connectionId > 0);
+ chrome.experimental.serial.close(connectionId, onClose);
+ }
+
+ chrome.experimental.serial.open("/dev/null", onOpen);
+};
+
+chrome.test.runTests([testSerial]);
« no previous file with comments | « chrome/common/extensions/docs/js/api_page_generator.js ('k') | chrome/test/data/extensions/api_test/serial/api/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698