| Index: chrome/test/data/extensions/api_test/automation/tests/tabs/close_tab.js
|
| diff --git a/chrome/test/data/extensions/api_test/automation/tests/tabs/close_tab.js b/chrome/test/data/extensions/api_test/automation/tests/tabs/close_tab.js
|
| index aa04332d65849bcbf2d4987c0051b79023505278..6190449c7ec82602310d390f79034afac2759d1a 100644
|
| --- a/chrome/test/data/extensions/api_test/automation/tests/tabs/close_tab.js
|
| +++ b/chrome/test/data/extensions/api_test/automation/tests/tabs/close_tab.js
|
| @@ -7,12 +7,17 @@ var allTests = [
|
| getUrlFromConfig('index.html', function(url) {
|
| chrome.tabs.create({'url': url}, function(tab) {
|
| chrome.automation.getTree(function(rootNode) {
|
| + var button = rootNode.find({role: 'button'});
|
| + assertEq(rootNode, button.root);
|
| +
|
| rootNode.addEventListener(EventType.destroyed, function() {
|
| // Poll until the root node doesn't have a role anymore
|
| // indicating that it really did get cleaned up.
|
| function checkSuccess() {
|
| - if (rootNode.role === undefined)
|
| + if (rootNode.role === undefined && rootNode.root === null) {
|
| + assertEq(null, button.root);
|
| chrome.test.succeed();
|
| + }
|
| else
|
| window.setTimeout(checkSuccess, 10);
|
| }
|
|
|