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

Side by Side Diff: chrome/test/data/extensions/api_test/page_capture/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 // API test for chrome.extension.pageCapture. 5 // API test for chrome.extension.pageCapture.
6 // browser_tests.exe --gtest_filter=ExtensionApiTest.PageCapture 6 // browser_tests.exe --gtest_filter=ExtensionApiTest.PageCapture
7 7
8 const assertEq = chrome.test.assertEq; 8 const assertEq = chrome.test.assertEq;
9 const assertTrue = chrome.test.assertTrue; 9 const assertTrue = chrome.test.assertTrue;
10 10
11 var testUrl = 'http://www.a.com:PORT' + 11 var testUrl = 'http://www.a.com:PORT' +
12 '/files/extensions/api_test/page_capture/google.html'; 12 '/extensions/api_test/page_capture/google.html';
13 13
14 function waitForCurrentTabLoaded(callback) { 14 function waitForCurrentTabLoaded(callback) {
15 chrome.tabs.getSelected(null, function(tab) { 15 chrome.tabs.getSelected(null, function(tab) {
16 if (tab.status == "complete" && tab.url == testUrl) { 16 if (tab.status == "complete" && tab.url == testUrl) {
17 callback(); 17 callback();
18 return; 18 return;
19 } 19 }
20 window.setTimeout(function() { waitForCurrentTabLoaded(callback); }, 100); 20 window.setTimeout(function() { waitForCurrentTabLoaded(callback); }, 100);
21 }); 21 });
22 } 22 }
(...skipping 23 matching lines...) Expand all
46 window.setTimeout(function() { chrome.test.notifyPass(); }, 0); 46 window.setTimeout(function() { chrome.test.notifyPass(); }, 0);
47 }; 47 };
48 reader.readAsText(data); 48 reader.readAsText(data);
49 }); 49 });
50 }); 50 });
51 }); 51 });
52 } 52 }
53 ]); 53 ]);
54 }); 54 });
55 55
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698