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

Side by Side Diff: chrome/renderer/resources/extension_apitest.js

Issue 7432006: Add an experimental permissions API for extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // extension_apitest.js 5 // extension_apitest.js
6 // mini-framework for ExtensionApiTest browser tests 6 // mini-framework for ExtensionApiTest browser tests
7 7
8 var chrome = chrome || {}; 8 var chrome = chrome || {};
9 (function() { 9 (function() {
10 chrome.test = chrome.test || {}; 10 chrome.test = chrome.test || {};
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 var pendingCallbacks = 0; 64 var pendingCallbacks = 0;
65 65
66 chrome.test.callbackAdded = function() { 66 chrome.test.callbackAdded = function() {
67 pendingCallbacks++; 67 pendingCallbacks++;
68 68
69 return function() { 69 return function() {
70 pendingCallbacks--; 70 pendingCallbacks--;
71 if (pendingCallbacks == 0) { 71 if (pendingCallbacks == 0) {
72 chrome.test.succeed(); 72 chrome.test.succeed();
73 } 73 }
74 } 74 };
75 }; 75 };
76 76
77 chrome.test.runNextTest = function() { 77 chrome.test.runNextTest = function() {
78 chrome.test.assertEq(0, pendingCallbacks); 78 chrome.test.assertEq(0, pendingCallbacks);
79 lastTest = currentTest; 79 lastTest = currentTest;
80 currentTest = chrome.test.tests.shift(); 80 currentTest = chrome.test.tests.shift();
81 if (!currentTest) { 81 if (!currentTest) {
82 allTestsSucceeded(); 82 allTestsSucceeded();
83 return; 83 return;
84 } 84 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 chrome.test.callbackFail = function(expectedError, func) { 270 chrome.test.callbackFail = function(expectedError, func) {
271 return chrome.test.callback(func, expectedError); 271 return chrome.test.callback(func, expectedError);
272 }; 272 };
273 273
274 chrome.test.runTests = function(tests) { 274 chrome.test.runTests = function(tests) {
275 chrome.test.tests = tests; 275 chrome.test.tests = tests;
276 chrome.test.runNextTest(); 276 chrome.test.runNextTest();
277 }; 277 };
278 })(); 278 })();
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/extension_dispatcher.cc ('k') | chrome/renderer/resources/renderer_extension_bindings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698