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

Side by Side Diff: chrome/test/data/extensions/api_test/tabs/basics/events.html

Issue 7134035: Make an inserted selected tab selected before calling TabInsertedAt on observers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename foreground to active, and function style Created 9 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
« no previous file with comments | « chrome/browser/extensions/extension_tabs_module.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <script src="tabs_util.js"></script> 1 <script src="tabs_util.js"></script>
2 2
3 <script> 3 <script>
4 var testTabId; 4 var testTabId;
5 var otherTabId; 5 var otherTabId;
6 var firstWindowId; 6 var firstWindowId;
7 var secondWindowId; 7 var secondWindowId;
8 8
9 chrome.test.runTests([ 9 chrome.test.runTests([
10 function init() { 10 function init() {
11 chrome.tabs.getSelected(null, pass(function(tab) { 11 chrome.tabs.getSelected(null, pass(function(tab) {
12 testTabId = tab.id; 12 testTabId = tab.id;
13 firstWindowId = tab.windowId; 13 firstWindowId = tab.windowId;
14 })); 14 }));
15 }, 15 },
16 16
17 function tabsOnCreated() { 17 function tabsOnCreated() {
18 chrome.test.listenOnce(chrome.tabs.onCreated, function(tab) { 18 chrome.test.listenOnce(chrome.tabs.onCreated, function(tab) {
19 assertEq(pageUrl("f"), tab.url); 19 assertEq(pageUrl("f"), tab.url);
20 otherTabId = tab.id; 20 otherTabId = tab.id;
21 // TODO(jstritar): http://crbug.com/59194 tab.selected is always false 21 assertEq(true, tab.selected);
22 // when passed into chrome.tabs.onCreated listener
23 //assertEq(true, tab.selected);
24 }); 22 });
25 23
26 chrome.tabs.create({"windowId": firstWindowId, "url": pageUrl("f"), 24 chrome.tabs.create({"windowId": firstWindowId, "url": pageUrl("f"),
27 "selected": true}, pass(function(tab) {})); 25 "selected": true}, pass(function(tab) {}));
28 }, 26 },
29 27
30 function tabsOnUpdatedIgnoreTabArg() { 28 function tabsOnUpdatedIgnoreTabArg() {
31 // A third argument was added to the onUpdated event callback. 29 // A third argument was added to the onUpdated event callback.
32 // Test that an event handler which ignores this argument works. 30 // Test that an event handler which ignores this argument works.
33 var onUpdatedCompleted = chrome.test.listenForever(chrome.tabs.onUpdated, 31 var onUpdatedCompleted = chrome.test.listenForever(chrome.tabs.onUpdated,
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 }); 165 });
168 chrome.windows.remove(windowB.id); 166 chrome.windows.remove(windowB.id);
169 })); 167 }));
170 })); 168 }));
171 })); 169 }));
172 })); 170 }));
173 } 171 }
174 */ 172 */
175 ]); 173 ]);
176 </script> 174 </script>
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tabs_module.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698