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

Unified Diff: extensions/test/data/api_test_base_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
Index: extensions/test/data/api_test_base_unittest.js
diff --git a/extensions/test/data/api_test_base_unittest.js b/extensions/test/data/api_test_base_unittest.js
deleted file mode 100644
index 6ea5ee6cea69a098d7f8e452fa380673018a6a6f..0000000000000000000000000000000000000000
--- a/extensions/test/data/api_test_base_unittest.js
+++ /dev/null
@@ -1,65 +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.
-
-var test = require('test').binding;
-var unittestBindings = require('test_environment_specific_bindings');
-
-unittestBindings.exportTests([
- function testEnvironment() {
- test.assertTrue(!!$Array);
- test.assertTrue(!!$Function);
- test.assertTrue(!!$JSON);
- test.assertTrue(!!$Object);
- test.assertTrue(!!$RegExp);
- test.assertTrue(!!$String);
- test.assertTrue(!!privates);
- test.assertTrue(!!define);
- test.assertTrue(!!require);
- test.assertTrue(!!requireNative);
- test.assertTrue(!!requireAsync);
- test.assertEq(undefined, chrome.runtime.lastError);
- test.assertEq(undefined, chrome.extension.lastError);
- test.succeed();
- },
- function testPromisesRun() {
- Promise.resolve().then(test.callbackPass());
- },
- function testCommonModulesAreAvailable() {
- var binding = require('binding');
- var sendRequest = require('sendRequest');
- var lastError = require('lastError');
- test.assertTrue(!!binding);
- test.assertTrue(!!sendRequest);
- test.assertTrue(!!lastError);
- test.succeed();
- },
- function testMojoModulesAreAvailable() {
- Promise.all([
- requireAsync('mojo/public/js/connection'),
- requireAsync('mojo/public/js/core'),
- requireAsync('content/public/renderer/frame_interfaces'),
- ]).then(test.callback(function(modules) {
- var connection = modules[0];
- var core = modules[1];
- var frameInterfaces = modules[2];
- test.assertTrue(!!connection.Connection);
- test.assertTrue(!!core.createMessagePipe);
- test.assertTrue(!!frameInterfaces.getInterface);
- }));
- },
- function testTestBindings() {
- var counter = 0;
- function increment() {
- counter++;
- }
- test.runWithUserGesture(increment);
- test.runWithoutUserGesture(increment);
- test.runWithNativesEnabled(increment);
- test.assertEq(3, counter);
- test.assertFalse(test.isProcessingUserGesture());
- test.assertTrue(!!test.getApiFeatures());
- test.assertEq(0, test.getApiDefinitions().length);
- test.succeed();
- }
-], test.runTests, exports);

Powered by Google App Engine
This is Rietveld 408576698