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

Side by Side Diff: chrome/test/data/extensions/api_test/tabs/get_current/test.js

Issue 10534054: Improve extension api tests: run all tests, even if one fails (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some tests Created 8 years, 6 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 var assertEq = chrome.test.assertEq; 1 var assertEq = chrome.test.assertEq;
2 2
3 function pageUrl(letter) { 3 function pageUrl(letter) {
4 return chrome.extension.getURL(letter + ".html"); 4 return chrome.extension.getURL(letter + ".html");
5 } 5 }
6 6
7 function onCompleteGetCurrentTab(tab) { 7 function onCompleteGetCurrentTab(tab) {
8 assertEq(tab.url, pageUrl("a")); 8 assertEq(tab.url, pageUrl("a"));
9 chrome.tabs.remove(tab.id, function() { 9 chrome.tabs.remove(tab.id, function() {
10 chrome.test.runNextTest(); 10 chrome.test.succeed();
11 }); 11 });
12 } 12 }
13 13
14 chrome.test.runTests([ 14 chrome.test.runTests([
15 function backgroundPageGetCurrentTab() { 15 function backgroundPageGetCurrentTab() {
16 chrome.tabs.getCurrent(function(tab) { 16 chrome.tabs.getCurrent(function(tab) {
17 // There should be no tab. 17 // There should be no tab.
18 assertEq(tab, undefined); 18 assertEq(tab, undefined);
19 chrome.test.runNextTest(); 19 chrome.test.succeed();
20 }); 20 });
21 }, 21 },
22 22
23 function openedTabGetCurrentTab() { 23 function openedTabGetCurrentTab() {
24 chrome.tabs.create({url: pageUrl("a")}); 24 chrome.tabs.create({url: pageUrl("a")});
25 // Completes with onCompleteGetCurrentTab, which is triggered by 25 // Completes with onCompleteGetCurrentTab, which is triggered by
26 // the onload of a.html . 26 // the onload of a.html .
27 } 27 }
28 ]); 28 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698