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

Unified Diff: chrome/browser/devtools/device/webrtc/devtools_bridge_client_browsertest.js

Issue 1560583002: DevTools: remove experimental webrtc-based remote debugging device provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more tests/gyp removals Created 4 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/browser/devtools/device/webrtc/devtools_bridge_client_browsertest.js
diff --git a/chrome/browser/devtools/device/webrtc/devtools_bridge_client_browsertest.js b/chrome/browser/devtools/device/webrtc/devtools_bridge_client_browsertest.js
deleted file mode 100644
index dbb67385c9c3e78005c3031bb20bd85c5a650d46..0000000000000000000000000000000000000000
--- a/chrome/browser/devtools/device/webrtc/devtools_bridge_client_browsertest.js
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright 2014 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.
-
-GEN('#include "chrome/browser/devtools/device/webrtc/' +
- 'devtools_bridge_client_browsertest.h"');
-
-/**
- * Test fixture for DevToolsBridgeClientBrowserTest.
- * @constructor
- * @extends {testing.Test}
- */
-function DevToolsBridgeClientBrowserTest() {}
-
-var DEVICES_URL = "https://www.googleapis.com/clouddevices/v1/devices";
-
-DevToolsBridgeClientBrowserTest.prototype = {
- __proto__: testing.Test.prototype,
-
- /** @override */
- typedefCppFixture: 'DevToolsBridgeClientBrowserTest',
-
- /** @override */
- isAsync: true,
-
- /** @override */
- browsePreload: DUMMY_URL,
-
- setUp: function() {
- this.callbacksMock = mock(DevToolsBridgeClientBrowserTest.NativeCallbacks);
- window.callbacks = this.callbacksMock.proxy();
- },
-
- /**
- * Simulates user sign in. DevToolsBridgeClient creates
- * background_worker only in this case.
- */
- signIn: function() {
- chrome.send('signIn', []);
- return new Promise(function(resolve) {
- this.callbacksMock.expects(once()).workerLoaded().will(
- callFunction(resolve));
- }.bind(this));
- },
-
- /**
- * Creates GCD device definition which could be recognized as a
- * DevToolsBridge.
- *
- * @param {string} id GCD instance id.
- * @param {string} displayName Display name.
- */
- createInstanceDef: function(id, displayName) {
- return {
- 'kind': 'clouddevices#device',
- 'deviceKind': 'vendor',
- 'id': id,
- 'displayName': displayName,
- 'commandDefs': {
- 'base': {
- '_iceExchange': {'kind': 'clouddevices#commandDef'},
- '_renegotiate': {'kind': 'clouddevices#commandDef'},
- '_startSession': {'kind': 'clouddevices#commandDef'},
- }
- },
- };
- }
-};
-
-/**
- * Callbacks from native DevToolsBridgeClientBrowserTest.
- * @constructor
- */
-DevToolsBridgeClientBrowserTest.NativeCallbacks = function() {}
-
-DevToolsBridgeClientBrowserTest.NativeCallbacks.prototype = {
- workerLoaded: function() {},
- gcdApiRequest: function(id, body) {},
- browserListUpdated: function(count) {},
-};
-
-TEST_F('DevToolsBridgeClientBrowserTest', 'testSetUpOnMainThread', function() {
- testDone();
-});
-
-TEST_F('DevToolsBridgeClientBrowserTest', 'testSignIn', function() {
- this.signIn().then(testDone);
-});
-
-TEST_F('DevToolsBridgeClientBrowserTest', 'testQueryBrowsers', function() {
- this.signIn().then(function() {
- chrome.send('queryDevices');
- });
- var savedArgs = new SaveMockArguments();
- this.callbacksMock.expects(once()).gcdApiRequest(
- savedArgs.match(ANYTHING), DEVICES_URL, '').will(
- callFunctionWithSavedArgs(savedArgs, function(id) {
- var response = {
- 'kind': 'clouddevices#devicesListResponse',
- 'devices': [
- this.createInstanceDef(
- 'ab911465-83c7-e335-ea64-cb656868cbe0', 'Test 1'),
- this.createInstanceDef(
- 'ab911465-83c7-e335-ea64-cb656868cbe1', 'Test 2'),
- this.createInstanceDef(
- 'ab911465-83c7-e335-ea64-cb656868cbe2', 'Test 3'),
- ],
- };
- chrome.send('gcdApiResponse', [id, response]);
- }.bind(this)));
-
- var browsersCount = 3;
-
- this.callbacksMock.expects(once()).browserListUpdated(browsersCount).will(
- callFunction(testDone));
-});

Powered by Google App Engine
This is Rietveld 408576698