Title: Theory / Important / Chrome / Earl grey
On every note of this deck, unless a note says otherwise:
Language: Objective-C

Typ: ChromeTestCase
Meaning: Parent for chrome related test cases
Page: https://chromium.googlesource.com/chromium/src/+/HEAD/docs/ios/testing.md
Language: Objective-C

Instruction: chrome_test_util::GetAnyKeyWindow()
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: current keyWindow, from the list of all of the remote application windows
Assuming: Only for single window tests

Typ: ChromeEarlGreyImpl
Meaning: Test methods that perform actions on Chrome.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Language: Objective-C
Subtype of: BaseEGTestHelperImpl
Extra: These methods may read or alter Chrome's internal state programmatically or via the UI, but in both cases will properly synchronize the UI for Earl Grey tests.

Instruction: [chromeEGImpl
   waitForMatcher:matcher]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Wait until |matcher| is accessible (not nil) on the device.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Typ: ChromeEarlGreyImpl

Instruction: [chromeEGImpl
   isIPdIdiom
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: Whether running on an iPad
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
   isRTL
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: Whether it's RTL
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
   isCompact(Width|Height)
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: Whether the main application window's rootViewController has a compact (horizontal|vertical) size class
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
   isSplitToolbarMode
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: whether the toolbar is split between top and bottom toolbar
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: displayed as only one toolbar otherwise

Instruction: [chromeEGImpl
   isRegularXRegularSizeClass
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: Whether application has regular vertical and horizontal size class
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
   clearBrowsingHistory
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Clears browsing history.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Exception: EarlGrey exception if not done withing a timeout

Instruction: [chromeEGImpl
   browsingHistoryEntryCount
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: Number ofentries in the browsing history database.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
   navigationBackListItemsCount
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: Number of items in the back list
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
   sceneOpenUrl:URL
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Instructs some connected scene to open |URL| with default opening options
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
   loadUrl:URL
  waitForCompletion:NO
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Loads |URL| in the current WebState with transition type ui::PAGE_TRANSITION_TYPED and return immediately.
Returns: nil on success or an NSError
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
   loadUrl:URL
  waitForCompletion:YES
]
[chromeEGImpl
   loadUrl:URL
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Loads |URL| in the current WebState with transition type ui::PAGE_TRANSITION_TYPED and wait for completion
Returns: NSError or nil
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
   isLoading
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: Whether current state is loading
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
   reload
]
[chromeEGImpl
   reloadAndWaitForCompletion:YES
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Reload the page and wait for it to finish in timeout, or GREYAssert
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
   reloadAndWaitForCompletion:NO
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Reload the pag eand return immediately. GREY assert if not done in timeout
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  go(Back|Forward)
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Navigates back to the previous page and waits for the loading to complete within a timeout, or a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForPageToFinishLoading
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the page to finish loading within a timeout, or a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForSufficientlyVisibleElementWithMatchermatcher
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the matcher to return an element that is sufficiently visible.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForUIElementToAppearWithMatcher:matcher
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the matcher to return an element.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForUIElementToAppearWithMatcher:matcher
  timeout:timeout
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the matcher to return an element. If the condition is not met within the given |timeout| a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForUIElementToDisappearWithMatcher:matcher
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the matcher to not return any elements.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForUIElementToDisappearWithMatcher:matcher
  timout:timeout
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the matcher to not return any elements. If the condition is not met within the given |timeout| a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForMainTabCount:count
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for there to be |count| number of non-incognito tabs within a timeout, or a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForIncognitoTabCount:count
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for there to be |count| number of incognito tabs within a timeout, or a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  openURLFromExternalApp:URL
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Loads |URL| as if it was opened from an external application.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  dismissSettings
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Programmatically dismisses settings screen.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  clearSyncServerData
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Clears fake sync server data if the server is running.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  signInWitoutSyncWithIdentity:identity
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Signs in with |identity| without sync consent.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  startSync
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Starts the sync server.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Assuming: Server is not running

Instruction: [chromeEGImpl
  stopSync
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Stop the sync server
Variables: ChromeEarlyGreyImpl chromeEGImpl
Assuming: The server should be running

Instruction: [chromeEGImpl
  addUserDemographicsToSyncServerWithBirthYear:rawPirthYear
  gender:gender
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Injects user demographics into the fake sync server.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  addAutofillProfileToFakeSyncServerWithGUIID:GUID
  autofillProfileName:fullName
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Injects an autofill profile into the fake sync server with |GUID| and |full_name|.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  isAutoFillProfilePresentWithGUIID:GUID
  autofillProfileName:fullName
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: Whether there is an autofilll profile with the corresponding |GUID| and |full_name|.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  setUpFakeSyncServer
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Sets up a fake sync server to be used by the SyncServiceImpl
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  tearDownFakeSyncServer
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Tears down the fake sync server used by the SyncServiceImpl and restores the real one
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  numberOfSyncEntitiesWithType:type
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Gets the number of entities of the given |type|
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  addHistoryServiceTypeURL:URL
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Add typed URL into HistoryService
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  deletHistoryServiceTypeURL:URL
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Deletes typed URL from HistoryService
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  addFakeSyncServerBookmarkWithURL:URL
  title:title
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Injects a bookmark with |URL| and |title| into the fake sync server.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  addFakeSyncServerLegacyBookmarkWithURL:URL
  title:title
  originator_client_item_id:originator_client_item_id
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Injects a legacy bookmark into the fake sync server.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  addFakeSyncServerDeviceInfoaddFakeSyncServerTYpedURL:URL
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Injects typed URl to sync fakeserver
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  AddFakeSyncServerDeviceInfo:deviceName
  lastUpdatedTimestamp:lastUpdatedTimestamp
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Injects device info to sync FakeServer.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  triggerSyncCycleForType:type
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Triggers a sync cyle for a |type|
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  deleteAutofillProfileFromFakeSyncServerWithGUID:GUID
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Deletes an autofill profile from the fake sync server with |GUID|, if it exists. If it doesn't exist, nothing is done.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  verifySyncServerURLS:URLS
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Verifies the sessions hierarchy on the Sync FakeServer. |URLs| is the collection of URLs that are to be expected for a single window
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForSyncServerEntitiesWithType:type
  name:UTF8Name
  count:count
  timeout:timeout
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits until sync server countains |count| entities of the given |type| and |name|, not counting folders. Greyassert after timeout
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForTypedURL:URL
  expectPresent:expectPresent
  timeout:timeout
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Whether URL is present or not, as in |expectPresent|
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForSyncInvalidationFields
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for sync invalidation field presence in the DeviceInfo data type on server
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
openNewTab]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Opens a new tab and waits for the new tab animation to complete with a timeout, or a GREYAssert is induced
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  simulateExternalAppURLOpening
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Simulates opening http://www.example.com/ from another application.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  simulateAddAccountFromWeb
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Simulates opening the add account sign-in flow from the web.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  closeCurrentTab
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Closes the current tab and waits for the UI to complete.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  openNewIncognitoTab
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Opens a new incognito tab and waits for the new tab animation to complete.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  closeAllTabsInCurrentMode
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Closes all tabs in the current mode (incognito or normal), and waits for the UI to complete. If incognito, goes back to normal mode
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  closeAll(Normal|Incognito)Tabs
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Closes all (normal|incognito) tabs and waits for the UI to complete within a timeout, or a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  closeAllTabs
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Closes all tabs in the all modes (incognito and main (non-incognito)), and does not wait for the UI to complete. Ends in normal mode.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  selectTabAtIndex:index
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: select the index-th tab in current mode
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  closeTabAtIndex:index
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Close the n-th tab in current mode
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  isIncognitoMode
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Whether browser is in incognito mode
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  (main|incognito)TabCount
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: The number of (main|incognito) tabs
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  browserCount
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: The number of browsers
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  indexOfActiveNormalTab
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: the index of active tab in normal (non-incognito) mode.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  simulateTabsBackgrounding
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Simulates a backgrounding and raises an EarlGrey exception if simulation not succeeded.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  saveSessionImmediately
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Persists the current list of tabs to disk immediately.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  evictedMainTabCount
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: the number of main (non-incognito) tabs currently evicted.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  evictOtherBrowserTabs
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Evicts the tabs associated with the non-current browser mode.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  setCurrentTabsToBeColdStartTabs
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Sets the normal tabs as 'cold start' tabs and raises an EarlGrey exception if operation not succeeded.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  resetTabUsageRecorder
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Resets the tab usage recorder on current mode and raises an EarlGrey exception if operation not succeeded.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  currentTabTitle
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: the tab title of the current tab.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  nextTabTitle
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: the tab title of the next tab.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Assuming: Next tab exists.

Instruction: [chromeEGImpl
  currentTabID
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: a unique identifier for the current Tab.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  showTabSwitcher
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Shows the tab switcher by tapping the switcher button.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: Works on both phone and tablet.

Instruction: [chromeEGImpl
  screenPositionOfScreenWithNumber:windowNumber
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: screen position of the given |windowNumber|
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  windowCount
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: the number of windows, including background and disconnected or archived windows.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  foregroundWindowCount
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: the number of foreground (visible on screen) windows.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForForegorundWindowCount
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for there to be |count| number of browsers within a timeout, or a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  closeAllExtraWindows
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Closes all but one window, including all non-foreground windows. No-op if only one window presents.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  openNewWindow
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Opens a new window
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitUntilReadyWindowWithNumber:windowNumber
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Wait until window with windowNumber is ready to interact or to be closed.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  openNewTabInWinodwWithNumber:windowNumber
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Opens a new tab in window with given number and waits for the new tab animation to complete within a timeout, or a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  closeWindowWithNumber:windowNumber
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Closes the window with given number. Note that numbering doesn't change and if a new window is to be added in a test, a renumbering might be needed.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  changeWindowWithNumber:windowNumber
  toNewnumber:newWindowNumber
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Renumbers given window with current number to new number.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: For example, if you have windows 0 and 1, close window 0, the add new window, then both windows would be 1. Therefore you should renumber the remaining ones before adding new ones.

Instruction: [chromeEGImpl
  loadURL:URL
  inWindowWithNumber:windowNumber
  waitForCompletion:YES
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Loads |URL| in the current WebState for window with given number, with transition type ui::PAGE_TRANSITION_TYPED, and if waitForCompletion is YES waits for the loading to complete within a timeout.
Returns: Returns nil on success, or else an NSError indicating why the operation failed.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  loadURL:URL
  inWindowWithNumber:windowNumber
]
[chromeEGImpl
  loadURL:URL
  inWindowWithNumber:windowNumber
  waitForCompletion:YES
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Loads |URL| in the current WebState for window with given number, with transition type ui::PAGE_TRANSITION_TYPED, and waits for the loading to complete within a timeout. If the condition is not met within a timeout returns an NSError indicating why the operation failed, otherwise nil.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForPageToFinishLoadingInWindowWithNumber:windowNumber
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the page to finish loading for window with given number, within a timeout, or a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  isLoadingInWindowWithNumber:windowNumber
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: Whether the window windowNumber current webstate is loading
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForWebStateVisible
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the current web state for window to be visible.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForWebStateContainingText:UTF8Text
  inWindowWithNumber:windowNumber
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the current web state for window with given number, to contain |UTF8Text|. If the condition is not met within a timeout a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForWebStateContainingText:UTF8Text
  timeout:timeout
  inWindowWithNumber:windowNumber
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the current web state for window with given number, to contain |UTF8Text|. If the condition is not met within the given |timeout| a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForMainTabCount:count
  inWindowWithNumber:windowNumber
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for there to be |count| number of non-incognito tabs within a timeout, or a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForIncognitoTabCount:count
  inWindowWithNumber:windowNumber
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for there to be |count| number of incognito tabs within a timeout, or a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForJavaScriptCondition:javaScriptCondition
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Test javaScriptCondition, or fail after kWaitForActionTimeout
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  signOutAndClearIdentities
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Signs the user out, clears the known accounts entirely and checks whether the accounts were correctly removed from the keychain. Induces a GREYAssert if the operation fails.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForSyncInitialized:isInitialized
  syncTimeout:timeout
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for sync engine to be initialized or not. It doesn't necessarily mean that data types are configured and ready to use. See SyncService::IsEngineInitialized() for details. If not succeeded a GREYAssert is induced
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  syncCacheGUID
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: the current sync cache GUID.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Assuming: The sync server must be running

Instruction: [chromeEGImpl
  addBookmarkWithSyncPassphrase:syncPassphrase
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Adds a bookmark with a sync passphrase. The sync server will need the sync passphrase to start.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  tapWebStateElementWithID:elementID
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Taps html element with |elementID| in the current web state. A GREYAssert is induced on failure.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  tapWebStateElementInIFrameWithID:elementID
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Attempts to tap the element with |element_id| within window.frames[0] of the current WebState using a JavaScript click() event. This only works on same-origin iframes.
A GREYAssert is induced on failure.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForWebStateContainingElement:selector
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the current web state to contain an element matching |selector|.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: If the condition is not met within a timeout a GREYAssert is induced.

Instruction: [chromeEGImpl
  waitForWebStateNotContainingElement:selector
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the current web state to NOT contain an element matching |selector|.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: If the condition is not met within a timeout a GREYAssert is induced.

Instruction: [chromeEGImpl
  submitWebStateFormWithID:formID
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Attempts to submit form with |formID| in the current WebState.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: Induces a GREYAssert if the operation fails.

Instruction: [chromeEGImpl
  waitForWebStateContainingText:UTF8Text
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the current web state to contain |UTF8Text|.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: If the condition is not met within a timeout a GREYAssert is induced.

Instruction: [chromeEGImpl
  waitForWebStateFrameCountainingtext:UTF8Text
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the main frame or an iframe to contain |UTF8Text|.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: If the condition is not met within a timeout a GREYAssert is induced.

Instruction: [chromeEGImpl
  waitForWebStateFrameCountainingtext:UTF8Text
  timeout:timeout
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the current web state to contain |UTF8Text|.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: If the condition is not met within the given |timeout| a GREYAssert is induced.

Instruction: [chromeEGImpl
  waitForWebStateNotContainingText:UTF8Text
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for there to be no web state containing |UTF8Text|.
Returns: If the condition is not met within a timeout a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForWebStateContainingBlockedImageElementWithID:UTF8ImageID
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for there to be a web state containing a blocked |imageID|.  When blocked, the image element will be smaller than the actual image size.
Returns: If the condition is not met within a timeout a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForWebStateContainingLoadedImageElementWithID:UTF8ImageID
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for there to be a web state containing loaded image with |imageID|.
When loaded, the image element will have the same size as actual image.
Returns: If the condition is not met within a timeout a GREYAssert is induced.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  waitForWebStateZoomScale:scale
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the web state's scroll view zoom scale to be suitably close (within 0.05) of the expected scale.
Returns: nil if the condition is met within a
// timeout, or else an NSError indicating why the operation failed.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  webStateVisibleURL
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: the current web state's VisibleURL.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  webStateLastCommittedURL
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: the current web state's last committed URL.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  purgeCachedWebViewPages
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Purges cached web view pages, so the next time back navigation will not use a cached page. Browsers don't have to use a fresh version for back/forward navigation for HTTP pages and may serve a version from the cache even if the Cache-Control response header says otherwise.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  triggerRestoreViaTabGridRemoveAllUndo
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Simulators background, killing, and restoring the app within the limitations of EG1, by simply doing a tab grid close all / undo / done.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  webStateWebViewUsesContentInset
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: Whether the current webstate's web view uses the content inset to correctly align the top of the content with the bottom of the top bar
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  webStateWebViewSize
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: the size of the current WebState's web view.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  stopAllWebStatesLoading
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Stops any pending navigations in all WebStates which are loading.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  clearAllWebStateBrowsingData
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Clears all web state browsing data.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: A GREYAssert is induced if the data cannot be cleared.

Instruction: [chromeEGImpl
  waitForBookmarksToFirishLoading
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Waits for the bookmark internal state to be done loading.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: If the condition is not met within a timeout a GREYAssert is induced.

Instruction: [chromeEGImpl
  clearBookmarks
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Clears bookmarks if any bookmark still presents.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: A GREYAssert is induced if bookmarks can not be cleared.

Instruction: [chromeEGImpl
  displayTitleForURL:URL
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: Title string to be used for a page with |URL| if that page doesn't specify a title.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  evaluateJavaScript:javaScript
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: Value returned by javaScript
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: If execution does not complete within a timeout a GREYAssert is induced.
Assuming: We want the return value. otherwise uses -evaluateJavaScriptForSideEffect

Instruction: [chromeEGImpl
  evaluateJavaScriptForSideEffect:javaScript
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: evaluate javaScript
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  mobileUserAgentString
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: the user agent that should be used for the mobile version
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  cookies
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: Returns cookies as key value pairs, where key is a cookie name and value is a cookie value.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: A GREYAssert is induced if cookies can not be returned.

Instruction: [chromeEGImpl
  verifyAccessibilityForCurrentScreen
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Verifies that all interactive elements on screen (or at least one of their descendants) are accessible.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: todo
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: eature enables checkers
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  popupPrefValue
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: The current value of the popup content setting preference for the original browser state.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  setPopupPrefValue:value
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Sets the popup content setting preference to the given value for the original browser state.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  resetDesktopContentSetting
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Resets the desktop content setting to its default value.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  registeredKeyCommandCount
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: The count of key commands registered with the currently active BVC.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  simulatePhysicalKeyboardEvent:input
  flags:flags
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Simulates a physical keyboard event.
The input is similar to UIKeyCommand parameters, and is designed for testing keyboard shortcuts.
Accepts any strings and also UIKeyInput{Up|Down|Left|Right}Arrow and UIKeyInputEscape constants as |input|.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  localState(Boolean|Integer|String)Pref:prefName
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: The value of a local state pref prefName.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  set(Boolean|Integer|String)Value:value
  forLocalStatePref:prefName
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Set the value of a user pref in the original browser state
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  user(Boolean|Integer)Pref:prefName
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Gets the value of a user pref in the original browser state.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  resetBrowsingDataPrefs
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Reset the browsing data prefs which defines if it's selected or not when clearing browsing data
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  resetDataForLocalStatePref:prefName
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Resets data for the local state pref prefName
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  verifyStringCopied:text
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Verifies that |text| was copied to the pasteboard
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  pasteboardURL
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: URL stored in teh pasteboard or an empty GURL
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  verifyCopyLinkActionWithText:text
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Taps on the Copy Link context menu action and verifies that the |text| has been copied to the pasteboard.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  verifyOpenInNewTabActionWithURL:URL
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Taps on the Open in New Tab context menu action and waits for the |URL| to be present in the omnibox.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  verifyOpenInNewWindowActionWithContent:content
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Taps on the Open in New Window context menu action and waits for the |content| to be present in webview.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  verifyOpenInIncognitoActionWithURL:URL
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Taps on the Open in Incognito context menu action and waits for the |URL| to be present in the omnibox.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  verifyShareActionWithURL:URL
  pageTitle:pageTitle
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Taps on the Share context menu aciton and validates that the activityView was brought up with the title |URL| first then |pageTitle|
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  setURLKeyedAnonymizedDataCollectionEnabled:enabled
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Enables or disables URL-keyed anonymized data collection.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  watchForButtonsWithLabels:labels
  timeout:timeout
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Starts monitoring for buttons (based on traits) with the given (accessibility) |labels|.
Variables: ChromeEarlyGreyImpl chromeEGImpl
Extra: If a previous set is currently being watched for it gets
// replaced with this set. Note that timeout is best effort and can be a bit
// longer than specified. This method returns immediately.

Instruction: [chromeEGImpl
  watchDetectedButtonWithLabel:labels
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Returns: Whether the button with given (accessibility) |label| was observed at some point since |watchForButtonsWithLabels:timeout:| was called.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  stopWatcher
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Clear the watcher list, stopping monitoring
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  setUrlParamClassification:raw_classifications
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Sets the |raw_classifications| on the url_param_filter::ClassificationsLoader.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: [chromeEGImpl
  resetUrlParamClassification
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_earl_grey.h
Effect: Resets the stored classifications on the url_param_filter::ClassificationsLoader.
Variables: ChromeEarlyGreyImpl chromeEGImpl

Instruction: chrome_test_util::VerifyAccessibilityForCurrentScreen(error)
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/accessibility_util.h
Effect: Verifies that all interactive elements on screen (or at least one of their descendants) are accessible.
Variables: NSError* error

Instruction: [ChromeTestCase
  removeAnyOpenMenusAndInfoBars
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_test_case.h
Effect: Removes any UI elements that are present, to ensure it is in a clean state.

Instruction: [ChromeTestCase
  closeAllTabs
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_test_case.h
Effect: Closes all tabs, and waits for the UI to synchronize.

Instruction: [ChromeTestCase
  disableMockAuthentication
]
[chromeTestCase
  disableMockAuthentication
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_test_case.h
Effect: Turns off mock authentication. It will automatically be re-enabled at the end of the test.
Variables: ChromeTestCase chromeTestCase

Instruction: [ChromeTestCase
  enableMockAuthentication
]
[chromeTestCase
  enableMockAuthentication
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_test_case.h
Effect: Turns back on mock authentication.
Variables: ChromeTestCase chromeTestCase

Instruction: [ChromeTestCase
  testForStartupnableMockAuthentication
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_test_case.h
Effect: Configures the fixture for startup testing.

Instruction: [chromeTestCase
  setTearDownHandler:tearDownHandler
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_test_case.h
Effect: Sets a block to always be executed at the end of a test during tearDown, whether the test passes or fails.
Variables: ChromeTestCase chromeTestCase
Assuming: only be set once per test.

Instruction: [chromeTestCase
  isRunningTest:selector
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_test_case.h
Effect: Turns mock authentication back on.
Returns: whether the test method name extracted from |selector| matches the name of the currently running test method.
Variables: ChromeTestCase chromeTestCase

Typ: ChromeTestCaseAppInterface
Meaning: ?
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_test_case_app_interface.h
Language: Objective-C
Chapter: chromeTestCase.testServer

Instruction: [ChromeTestCaseAppInterface
  setUpMockAuthentication
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_test_case_app_interface.h
Effect: Sets up mock authentication and the mock account reconcilor.
Chapter: chromeTestCase.testServer

Instruction: [ChromeTestCaseAppInterface
  tearDownMockAuthentication
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_test_case_app_interface.h
Effect: Tears down mock authentication and the mock account reconcilor.
Chapter: chromeTestCase.testServer

Instruction: [ChromeTestCaseAppInterface
  resetAuthentication
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_test_case_app_interface.h
Effect: Resets mock authentication and signin promo settings.
Chapter: chromeTestCase.testServer

Instruction: [ChromeTestCaseAppInterface
  removeInfoBarsAndPresentedStateWithCompletionUUID:completionUUID
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_test_case_app_interface.h
Effect: Removes all infobars and clears any presented state.
Chapter: chromeTestCase.testServer
Extra: See +[ChromeTestCaseAppInterface isCompletionInvokedWithUUID:] to know when all views are dismissed.

Instruction: [ChromeTestCaseAppInterface
  isCompletionInvokedWithUUID:completionUUID
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_test_case_app_interface.h
Chapter: chromeTestCase.testServer
Returns: Whether the completion related to |completionUUID| has been invoked.
Extra: Once this method returns YES, |completionUUID| is dropped, and a second call will return NO.

Typ: ScopedAllowCrashOnStartup
Meaning: Swizzles away various crash and error handlers such that if the app being tested crashes on startup, it does not immediately fail the test.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/scoped_allow_crash_on_startup.h
Language: Objective-C
Chapter: chromeTestCase.testServer
Invariant: There may be at most one live instance of ScopedAllowCrashOnStartup at any given time.

Instruction: scopedAllowCrashOnStartup.IsActive()
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/scoped_allow_crash_on_startup.h
Chapter: chromeTestCase.testServer
Returns: Whether there is a live ScopedAllowCrashOnStartup instance.
Variables: ScopedAllowCrashOnStartup scopedAllowCrashOnStartup

Typ: EarlGreyScopedBlockSwizzlerAppInterface
Meaning: the app-side implementation for helpers. These helpers are compiled into the app binary and can be called from either app or test code.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/scoped_allow_crash_on_startup.h
Language: Objective-C
Chapter: chromeTestCase.testServer

Instruction: [EarlGreyScopedBlockSwizzlerAppInterface
  createScopedBlockSwizzlerForTarget:target
  withSelector:selector
  withBlock:block
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/scoped_allow_crash_on_startup.h
Effect: Creates and retains a ScopedBlockSwizzler
Chapter: chromeTestCase.testServer
Returns: unique id to be used to delete that ScopedBlockSwizzler.

Instruction: [EarlGreyScopedBlockSwizzlerAppInterface
  deletedScopedBlockSwizzlerForTarget:target
]
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/scoped_allow_crash_on_startup.h
Effect: Deletes a ScopedBlockSwizzler based on it's unique id.
Chapter: chromeTestCase.testServer

Typ: EarlGreyScopedBlockSwizzler
Meaning: Helper class that wraps ScopedBlockSwizzler for use in EG1 and EG2 tests.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/earl_grey_scoped_block_swizzler.h
Language: Objective-C
Chapter: chromeTestCase.testServer

Instruction: LongPressCellAndDragToEdge(
  NSString* accessibility_identifier,
  GREYContentEdge edge,
  int window_number
);
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_xcui_actions.h
Effect: Action (XCUI, hence local) to long press a cell item with |accessibility_identifier| in |window_number| and drag it to the given |edge| of the app screen (can trigger a new window) before dropping it.
Chapter: chromeTestCase.testServer
Returns: Whether an item was found
Library: chrome_test_util

Instruction: LongPressCellAndDragToOffsetOf(
  src_accessibility_identifier,
  src_window_number,
  dst_accessibility_identifier,
  dst_window_number,
  dst_normalized_offset
);
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_xcui_actions.h
Effect: XCUI action to long press a cell item with |src_accessibility_identifier| in |src_window_number| and drag it to the given normalized offset of the cell or window with |dst_accessibility_identifier| in |dist_window_number| before dropping it.
Chapter: chromeTestCase.testServer
Returns: Whether both items are found
Library: chrome_test_util

Instruction: LongPressCellAndDragToOffsetOf(
  src_accessibility_identifier,
  src_window_number,
  nil,
  dst_window_number,
  dst_normalized_offset
);
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_xcui_actions.h
Effect: XCUI action to long press a cell item with |src_accessibility_identifier| in |src_window_number| and drag it to the window with |dist_window_number| before dropping it.
Chapter: chromeTestCase.testServer
Library: chrome_test_util

Instruction: LongPressCellAndDragToView(
  src_accessibility_identifier,
  src_window_number,
  nil,
  dst_window_number,
  dst_normalized_offset
);
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_xcui_actions.h
Effect: XCUI action to long press a link element in a webview with |src_accessibility_identifier| in |src_window_number| and drag it to the widnow |dst_window_number|
Chapter: chromeTestCase.testServer
Returns: Whether both items are found
Library: chrome_test_util

Instruction: LongPressCellAndDragToView(
  src_accessibility_identifier,
  src_window_number,
  dst_accessibility_identifier,
  dst_window_number,
  dst_normalized_offset
);
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_xcui_actions.h
Effect: XCUI action to long press a link element in a webview with |src_accessibility_identifier| in |src_window_number| and drag it to the widnow |dst_window_number|
Chapter: chromeTestCase.testServer
Returns: Whether both items are found
Library: chrome_test_util

Instruction: LongPressLinkAndDragToView(
  src_accessibility_identifier,
  dst_accessibility_identifier,
);
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_xcui_actions.h
Effect: Convenience helper for the above function, using the default window for both elements, and an offset of (0.5, 0.5).
Chapter: chromeTestCase.testServer
Returns: BOOL
Library: chrome_test_util

Instruction: DragWindowSplitterToSize(
  first_window_number,
  second_window_number,
  first_window_normalized_screen_size
);
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_xcui_actions.h
Effect: // Action (XCUI, hence local) to resize split windows by dragging the splitter.
This action requires two windows (|first_window_number| and |second_window_number|, in any order) to find where the splitter is located.
A given |first_window_normalized_screen_size| defines the normalized size [0.0 - 1.0] wanted for the |first_window_number|.
Chapter: chromeTestCase.testServer
Returns: NO if any window is not found or if one of them is a floating window.
Extra: Notes: The size requested will be matched by the OS to the closest available multiwindow layout. This function works with any device oreintation and with either LTR or RTL languages.
Starting with window sizes 438 and 320 pts, this will resize them to 320pts and 438 pts respectively.
Library: chrome_test_util
Example: [ChromeEarlGrey openNewWindow];
[ChromeEarlGrey waitForForegroundWindowCount:2];
chrome_test_util::DragWindowSplitterToSize(0, 1, 0.25);

Instruction: TapAtOffsetOf(
  accessibility_identifier,
  window_number,
  normalized_offset
)
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_xcui_actions.h
Effect: XCUI action to tap item with |accessibility identifier| in |window_number|. Should only be used in second or third window, until a (already requested) fix is made to EarlyGrey to allow using grey_tap() correctly on extra windows (right now it fails visibility check)
Chapter: chromeTestCase.testServer
Library: chrome_test_util

Instruction: TypeText(
  accessibility_identifier,
  window_number
  text
)
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/chrome_xcui_actions.h
Effect: XCUI action to type text in text field with |accessibility_identifier| in |window_number|. Use to replace grey_typeText call that are flaky. grey_typeText fails sometime during a layout change of the keyboard.
Chapter: chromeTestCase.testServer
Library: chrome_test_util

Typ: ScopedBlockPopupsPref
Meaning: Modifies the block popups preference for the original browser state and resets the preference to its original value when this object goes out of scope.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/scoped_block_popups_pref.h
Language: Objective-C
Library: chrome_test_util

Constant: test_switches::kSignInAtStartup
Meaning: Switch used to record an identity at startup to avoid automatic sign out.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/test_switches.h
Language: Objective-C

Typ: WebHttpServerChromeTestCase
Meaning: class for Chrome Earl Grey tests which need a web::test::HttpServer.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/web_http_server_chrome_test_case.h
Language: Objective-C
Assuming: NOTE: This class exists for compatibility with old test classes only.
  New tests should not use this class, but instead inherit from ChromeTestCase and use |self.testServer| directly.

Typ: ChromeIdentity
Meaning: A single identity used for signing in.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/chrome/test/earl_grey/web_http_server_chrome_test_case.h
Language: Objective-C
Assuming: NOTE: This class exists for compatibility with old test classes only.
  New tests should not use this class, but instead inherit from ChromeTestCase and use |self.testServer| directly.

Constant: kChromeIdentityErrorDomain
Meaning: Error domain for Chrome identity errors.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/chrome_identity_interaction_manager.h
Language: Objective-C
Typ: ChromeIdentity

Typ: SigninCompletionCallback
Meaning: Callback for the signin operation methods.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/chrome_identity_interaction_manager.h
Language: Objective-C
Implementation: void (^)(ChromeIdentity* identity,
                                         NSError* error);

Typ: ChromeIdentityInteractionManager
Meaning: abstracts the interaction to add identities on iOS.
Page: https://source.chromium.org/chromium/chromium/src/+/main:ios/public/provider/chrome/browser/signin/chrome_identity_interaction_manager.h
Language: Objective-C