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

Unified Diff: chrome/test/data/extensions/api_test/bluetooth/test_getdevices.js

Issue 10916331: Revert 156348 (caused http://crbug.com/149828) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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/bluetooth/test_getdevices.js
===================================================================
--- chrome/test/data/extensions/api_test/bluetooth/test_getdevices.js (revision 157029)
+++ chrome/test/data/extensions/api_test/bluetooth/test_getdevices.js (working copy)
@@ -1,55 +0,0 @@
-// 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.
-
-function testGetDevices() {
- chrome.test.assertEq(2, devices['all'].length);
- chrome.test.assertEq('d1', devices['all'][0].name);
- chrome.test.assertEq('d2', devices['all'][1].name);
-
- chrome.test.assertEq(1, devices['name'].length);
- chrome.test.assertEq('d1', devices['name'][0].name);
-
- chrome.test.assertEq(1, devices['uuid'].length);
- chrome.test.assertEq('d2', devices['uuid'][0].name);
-
- chrome.test.succeed();
-}
-
-var devices = {
- 'all': [],
- 'name': [],
- 'uuid': []
-};
-function recordDevicesInto(arrayKey) {
- return function(device) {
- devices[arrayKey].push(device);
- };
-}
-
-chrome.experimental.bluetooth.getDevices(
- {
- deviceCallback:recordDevicesInto('all')
- },
- function() {
- chrome.experimental.bluetooth.getDevices(
- {
- name:'fooservice',
- deviceCallback:recordDevicesInto('name')
- },
- function() {
- chrome.experimental.bluetooth.getDevices(
- {
- uuid:'00000010-0000-1000-8000-00805f9b34fb',
- deviceCallback:recordDevicesInto('uuid')
- },
- function() {
- chrome.test.sendMessage('ready',
- function(message) {
- chrome.test.runTests([
- testGetDevices
- ]);
- });
- });
- });
- });

Powered by Google App Engine
This is Rietveld 408576698