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

Unified Diff: chrome/browser/extensions/api/serial/serial_apitest.cc

Issue 10392181: Implement serial API for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OSX/Win fixes and review feedback. Created 8 years, 7 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/browser/extensions/api/serial/serial_apitest.cc
diff --git a/chrome/browser/extensions/api/serial/serial_apitest.cc b/chrome/browser/extensions/api/serial/serial_apitest.cc
index 3074c0d7f5dfa3b2c8d0185d22805900c1db396a..83c45df0429da5f2c313fc11d694bcc024b26da1 100644
--- a/chrome/browser/extensions/api/serial/serial_apitest.cc
+++ b/chrome/browser/extensions/api/serial/serial_apitest.cc
@@ -33,15 +33,16 @@ IN_PROC_BROWSER_TEST_F(SerialApiTest, SerialExtension) {
#if 0
// Enable this path only if all the following are true:
//
- // 1. You're running Linux.
+ // 1. You have an Adafruit Atmega32u4 Breakout Board attached to your machine
+ // and properly appearing as the first virtual serial port ("first" is very
+ // loosely defined as whichever port shows up in serial.getPorts). Other
+ // devices will work, but this is the only one tested.
//
- // 2. You have an Adafruit ATmega32u4 breakout board attached to your machine
- // via USB with the Arduino Leonardo bootloader flashed to the board. Other
- // devices will work; this is the only one tested.
+ // 2. Your user has permission to read/write the port. For example, this might
+ // mean that your user is in the "tty" group on Ubuntu flavors of Linux, or
+ // else that /dev/ttyACM0 has global read/write permissions.
//
- // 3. Your user has permission to read/write the /dev/ttyACM0 device.
- //
- // 4. You have uploaded a program to the '32u4 that does a byte-for-byte echo
+ // 4. You have uploaded a program to the board that does a byte-for-byte echo
// on the virtual serial port at 57600 bps. Here is an example (built using
// the Arduino IDE):
//
@@ -56,12 +57,9 @@ IN_PROC_BROWSER_TEST_F(SerialApiTest, SerialExtension) {
// }
// }
// }
- //
- // TODO(miket): Enable a more forgiving set of test conditions, specifically
- // by mocking SerialConnection.
- listener.Reply("/dev/ttyACM0");
+ listener.Reply("echo_device_attached");
#else
- listener.Reply("none");
+ listener.Reply("false");
#endif
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();

Powered by Google App Engine
This is Rietveld 408576698