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

Side by Side Diff: chrome/test/data/extensions/api_test/automation/tests/tabs/close_tab.js

Issue 655273005: Implement AutomationNode.querySelector(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix heap-use-after-free issue by not keeping a scoped_ptr to automation_api_helper in extension_hel… Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 allTests = [ 5 var allTests = [
6 function testCloseTab() { 6 function testCloseTab() {
7 getUrlFromConfig(function(url) { 7 getUrlFromConfig('index.html', function(url) {
8 chrome.tabs.create({'url': url}, function(tab) { 8 chrome.tabs.create({'url': url}, function(tab) {
9 chrome.automation.getTree(function(rootNode) { 9 chrome.automation.getTree(function(rootNode) {
10 rootNode.addEventListener(EventType.destroyed, function() { 10 rootNode.addEventListener(EventType.destroyed, function() {
11 // Should get a 'destroyed' event when the tab is closed. 11 // Should get a 'destroyed' event when the tab is closed.
12 // TODO(aboxhall): assert actual cleanup has occurred once 12 // TODO(aboxhall): assert actual cleanup has occurred once
13 // crbug.com/387954 makes it possible. 13 // crbug.com/387954 makes it possible.
14 chrome.test.succeed(); 14 chrome.test.succeed();
15 }); 15 });
16 chrome.tabs.remove(tab.id); 16 chrome.tabs.remove(tab.id);
17 }); 17 });
18 }); 18 });
19 }); 19 });
20 } 20 }
21 ] 21 ]
22 chrome.test.runTests(allTests); 22 chrome.test.runTests(allTests);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698