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

Unified Diff: extensions/test/data/keep_alive_client_unittest.js

Issue 2409073002: Use mojo from the PDF extension instead of using an extension API.
Patch Set: Created 4 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
« no previous file with comments | « extensions/test/data/api_test_base_unittest.js ('k') | extensions/test/data/mojo_private_unittest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/test/data/keep_alive_client_unittest.js
diff --git a/extensions/test/data/keep_alive_client_unittest.js b/extensions/test/data/keep_alive_client_unittest.js
deleted file mode 100644
index 7b88fb0a8ecdc4e4061555d8063ddc4b172babae..0000000000000000000000000000000000000000
--- a/extensions/test/data/keep_alive_client_unittest.js
+++ /dev/null
@@ -1,44 +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.
-
-/**
- * Unit tests for the keep-alive client.
- *
- * They are launched by extensions/renderer/mojo/keep_alive_client_unittest.cc.
- */
-
-var test = require('test').binding;
-var unittestBindings = require('test_environment_specific_bindings');
-var utils = require('utils');
-
-var shouldSucceed;
-
-// We need to set custom bindings for a real API and serial.getDevices has a
-// simple signature.
-var binding = require('binding').Binding.create('serial');
-binding.registerCustomHook(function(bindingsAPI) {
- bindingsAPI.apiFunctions.setHandleRequestWithPromise('getDevices',
- function() {
- if (shouldSucceed)
- return Promise.resolve([]);
- else
- return Promise.reject();
- });
-});
-var apiFunction = binding.generate().getDevices;
-
-unittestBindings.exportTests([
- // Test that a keep alive is created and destroyed for a successful API call.
- function testKeepAliveWithSuccessfulCall() {
- shouldSucceed = true;
- utils.promise(apiFunction).then(test.succeed, test.fail);
- },
-
- // Test that a keep alive is created and destroyed for an unsuccessful API
- // call.
- function testKeepAliveWithError() {
- shouldSucceed = false;
- utils.promise(apiFunction).then(test.fail, test.succeed);
- },
-], test.runTests, exports);
« no previous file with comments | « extensions/test/data/api_test_base_unittest.js ('k') | extensions/test/data/mojo_private_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698