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

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

Issue 1970153003: Completely detach removed nodes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/resources/extensions/automation/automation_node.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « chrome/renderer/resources/extensions/automation/automation_node.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698