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

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

Issue 9320016: Fix crash in CreateTabFunction::RunImpl(). (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: . Created 8 years, 10 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
« 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 secondWindowId; 5 var secondWindowId;
6 var thirdWindowId; 6 var thirdWindowId;
7 var testTabId; 7 var testTabId;
8 8
9 function clickLink(id) { 9 function clickLink(id) {
10 var clickEvent = document.createEvent('MouseEvents'); 10 var clickEvent = document.createEvent('MouseEvents');
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 function openerTabId() { 103 function openerTabId() {
104 chrome.test.listenOnce( 104 chrome.test.listenOnce(
105 chrome.tabs.onCreated, 105 chrome.tabs.onCreated,
106 function(tab) { 106 function(tab) {
107 chrome.tabs.getCurrent(pass(function(thisTab) { 107 chrome.tabs.getCurrent(pass(function(thisTab) {
108 assertEq(thisTab.id, tab.openerTabId); 108 assertEq(thisTab.id, tab.openerTabId);
109 })); 109 }));
110 }); 110 });
111 // Pretend to click a link (openers aren't tracked when using tabs.create). 111 // Pretend to click a link (openers aren't tracked when using tabs.create).
112 clickLink("test_link"); 112 clickLink("test_link");
113 },
114
115 // The window on chrome.tabs.create is ignored if it doesn't accept tabs.
116 function testRedirectingToAnotherWindow() {
117 chrome.windows.create(
118 {url: 'about:blank', type: 'popup'},
119 pass(function(window) {
120 chrome.tabs.create(
121 {url: 'about:blank', windowId: window.id},
122 pass(function(tab) {
123 assertTrue(window.id != tab.windowId);
124 }));
125 }));
113 } 126 }
114
115 ]); 127 ]);
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