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

Side by Side Diff: chrome/test/data/extensions/api_test/executescript/permissions/test.js

Issue 16268017: GTTF: convert some tests in chrome to use EmbeddedTestServer patch nr 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 var assertEq = chrome.test.assertEq; 5 var assertEq = chrome.test.assertEq;
6 var assertTrue = chrome.test.assertTrue; 6 var assertTrue = chrome.test.assertTrue;
7 var numReceivedRequests = 0; 7 var numReceivedRequests = 0;
8 var relativePath = 'files/extensions/api_test/executescript/permissions/'; 8 var relativePath = 'extensions/api_test/executescript/permissions/';
9 var testFile = relativePath + 'empty.html'; 9 var testFile = relativePath + 'empty.html';
10 var testFileFrames = relativePath + 'frames.html'; 10 var testFileFrames = relativePath + 'frames.html';
11 var onTabLoaded; 11 var onTabLoaded;
12 12
13 chrome.extension.onRequest.addListener(function(req) { 13 chrome.extension.onRequest.addListener(function(req) {
14 numReceivedRequests++; 14 numReceivedRequests++;
15 }); 15 });
16 16
17 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) { 17 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {
18 if (tab.status == 'complete' && onTabLoaded) 18 if (tab.status == 'complete' && onTabLoaded)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 {file: 'script.js', allFrames: true}); 60 {file: 'script.js', allFrames: true});
61 window.setTimeout(function() { 61 window.setTimeout(function() {
62 chrome.test.assertEq(3, numReceivedRequests); 62 chrome.test.assertEq(3, numReceivedRequests);
63 chrome.test.succeed(); 63 chrome.test.succeed();
64 }, 4000); 64 }, 4000);
65 }; 65 };
66 } 66 }
67 ]); 67 ]);
68 68
69 }); 69 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698