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

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

Issue 10697017: Tabs Extension: Implementation of tabs.duplicate api. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 3 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/test/data/extensions/api_test/tabs/basics/duplicate.html ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 var firstTabId;
6 var firstWindowId;
7
8 chrome.test.runTests([
9 function setupWindow() {
10 createWindow([pageUrl("a")], {},
11 pass(function(winId, tabIds) {
12 firstWindowId = winId;
13 firstTabId = tabIds[0];
14 }));
15 },
16
17 function duplicateTab() {
18 chrome.tabs.duplicate(firstTabId, pass(function(tab) {
19 assertEq(pageUrl("a"), tab.url);
20 assertEq(1, tab.index);
21 }));
22 },
23
24 function totalTab() {
25 chrome.tabs.getAllInWindow(firstWindowId,
26 pass(function(tabs) {
27 assertEq(tabs.length, 2);
28 assertEq(tabs[0].url, tabs[1].url);
29 assertEq(tabs[0].index + 1, tabs[1].index);
30 }));
31 }
32 ]);
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/tabs/basics/duplicate.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698