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
3 // found in the LICENSE file.
6 function testGetDesktop() {
7 chrome.automation.getDesktop(function(rootNode) {
8 assertEq(RoleType.desktop, rootNode.role);
9 assertEq(undefined, rootNode.firstChild);
10 chrome.test.succeed();
14 function testGetDesktopTwice() {
16 chrome.automation.getDesktop(function(rootNode) {
19 chrome.automation.getDesktop(function(rootNode) {
20 assertEq(rootNode, desktop);
21 chrome.test.succeed();
25 function testGetDesktopNested() {
27 chrome.automation.getDesktop(function(rootNode) {
29 chrome.automation.getDesktop(function(rootNode2) {
30 assertEq(rootNode2, desktop);
31 chrome.test.succeed();
37 chrome.test.runTests(allTests);