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

Unified Diff: chrome/test/data/extensions/api_test/usb/reset_device/test.js

Issue 695613002: Move the USB API tests into app_shell_browsertests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/usb/reset_device/test.js
diff --git a/chrome/test/data/extensions/api_test/usb/reset_device/test.js b/chrome/test/data/extensions/api_test/usb/reset_device/test.js
deleted file mode 100644
index 9bc4bc491020afe74f52862685363bf25117565e..0000000000000000000000000000000000000000
--- a/chrome/test/data/extensions/api_test/usb/reset_device/test.js
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2013 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 usb = chrome.usb;
-
-function resetDevice() {
- usb.findDevices({vendorId: 0, productId: 0}, function(devices) {
- usb.resetDevice(devices[0], function(result) {
- chrome.test.assertEq(result, true);
- // Ensure the device is still open.
- var transfer = {
- direction: "out",
- endpoint: 2,
- data: new ArrayBuffer(1)
- };
- usb.interruptTransfer(devices[0], transfer, function(result) {
- // This is designed to fail.
- usb.resetDevice(devices[0], function(result) {
- chrome.test.assertEq(result, false);
- usb.interruptTransfer(devices[0], transfer, function(result) {
- chrome.test.assertEq(result, undefined);
- chrome.test.assertEq(
- chrome.runtime.lastError && chrome.runtime.lastError.message,
- 'No such device.'
- );
- chrome.test.succeed();
- });
- });
- });
- });
- });
-}
-
-chrome.test.runTests([resetDevice]);

Powered by Google App Engine
This is Rietveld 408576698