Home | History | Annotate | Download | only in api
      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
      3 // found in the LICENSE file.
      4 
      5 // API for integration testing. To be used on test images with a test component
      6 // extension.
      7 [nodoc] namespace autotestPrivate {
      8 
      9   dictionary LoginStatusDict {
     10     // Are we logged in?
     11     boolean isLoggedIn;
     12     // Is the logged-in user the owner?
     13     boolean isOwner;
     14     // Is the screen locked?
     15     boolean isScreenLocked;
     16 
     17     // Is the logged-in user a regular user?
     18     boolean isRegularUser;
     19     // Are we logged into the guest account?
     20     boolean isGuest;
     21     // Are we logged into kiosk-app mode?
     22     boolean isKiosk;
     23 
     24     DOMString email;
     25     DOMString displayEmail;
     26     // User image: 'file', 'profile' or a number.
     27     DOMString userImage;
     28   };
     29   callback LoginStatusCallback = void (LoginStatusDict status);
     30 
     31   dictionary ExtensionInfoDict {
     32     DOMString id;
     33     DOMString version;
     34     DOMString name;
     35     DOMString publicKey;
     36     DOMString description;
     37     DOMString backgroundUrl;
     38     DOMString optionsUrl;
     39 
     40     DOMString[] hostPermissions;
     41     DOMString[] effectiveHostPermissions;
     42     DOMString[] apiPermissions;
     43 
     44     boolean isComponent;
     45     boolean isInternal;
     46     boolean isUserInstalled;
     47     boolean isEnabled;
     48     boolean allowedInIncognito;
     49     boolean hasPageAction;
     50   };
     51   dictionary ExtensionsInfoArray {
     52     ExtensionInfoDict[] extensions;
     53   };
     54   callback ExtensionsInfoCallback = void (ExtensionsInfoArray info);
     55 
     56   interface Functions {
     57     // Logout of a user session.
     58     static void logout();
     59 
     60     // Restart the browser.
     61     static void restart();
     62 
     63     // Shutdown the browser.
     64     // |force|: if set, ignore ongoing downloads and onunbeforeunload handlers.
     65     static void shutdown(boolean force);
     66 
     67     // Get login status.
     68     static void loginStatus(LoginStatusCallback callback);
     69 
     70     // Locks the screen.
     71     static void lockScreen();
     72 
     73     // Get info about installed extensions.
     74     static void getExtensionsInfo(ExtensionsInfoCallback callback);
     75 
     76     // Simulates a memory access bug for asan testing.
     77     static void simulateAsanMemoryBug();
     78   };
     79 };
     80