#include "chrome/renderer/accessibility/read_anything_app_model.h"
#include <string>
#include <vector>
#include "base/memory/raw_ptr.h"
#include "base/threading/platform_thread.h"
#include "chrome/renderer/accessibility/read_anything_node_utils.h"
#include "chrome/renderer/accessibility/read_anything_test_utils.h"
#include "chrome/test/base/chrome_render_view_test.h"
#include "read_anything_test_utils.h"
#include "services/strings/grit/services_strings.h"
#include "ui/accessibility/ax_enums.mojom-shared.h"
#include "ui/accessibility/ax_event.h"
#include "ui/accessibility/ax_node_id_forward.h"
#include "ui/accessibility/ax_serializable_tree.h"
#include "ui/accessibility/ax_updates_and_events.h"
#include "ui/base/l10n/l10n_util.h"
class ReadAnythingAppModelTest : public ChromeRenderViewTest { … };
TEST_F(ReadAnythingAppModelTest, FontName) { … }
TEST_F(ReadAnythingAppModelTest, OnSettingsRestoredFromPrefs) { … }
TEST_F(ReadAnythingAppModelTest, IsNodeIgnoredForReadAnything) { … }
TEST_F(ReadAnythingAppModelTest,
IsNodeIgnoredForReadAnything_TextFieldsNotIgnored) { … }
TEST_F(ReadAnythingAppModelTest,
IsNodeIgnoredForReadAnything_InaccessiblePDFPageNodes) { … }
TEST_F(ReadAnythingAppModelTest, ModelUpdatesTreeState) { … }
TEST_F(ReadAnythingAppModelTest, AddAndRemoveTrees) { … }
TEST_F(ReadAnythingAppModelTest,
DistillationInProgress_TreeUpdateReceivedOnInactiveTree) { … }
TEST_F(ReadAnythingAppModelTest,
AddPendingUpdatesAfterUnserializingOnSameTree_DoesNotCrash) { … }
TEST_F(ReadAnythingAppModelTest, OnTreeErased_ClearsPendingUpdates) { … }
TEST_F(ReadAnythingAppModelTest,
DistillationInProgress_TreeUpdateReceivedOnActiveTree) { … }
TEST_F(ReadAnythingAppModelTest, SpeechPlaying_TreeUpdateReceivedOnActiveTree) { … }
TEST_F(ReadAnythingAppModelTest, ClearPendingUpdates_DeletesPendingUpdates) { … }
TEST_F(ReadAnythingAppModelTest, ChangeActiveTreeWithPendingUpdates_UnknownID) { … }
TEST_F(ReadAnythingAppModelTest, DisplayNodeIdsContains_ContentNodes) { … }
TEST_F(ReadAnythingAppModelTest,
DisplayNodeIdsDoesNotContain_InvisibleOrIgnoredNodes) { … }
TEST_F(ReadAnythingAppModelTest,
DisplayNodeIdsEmpty_WhenContentNodesAreAllHeadings) { … }
TEST_F(ReadAnythingAppModelTest,
SelectionNodeIdsContains_SelectionAndNearbyNodes) { … }
TEST_F(ReadAnythingAppModelTest,
SelectionNodeIdsContains_BackwardSelectionAndNearbyNodes) { … }
TEST_F(ReadAnythingAppModelTest,
SelectionNodeIdsDoesNotContain_InvisibleOrIgnoredNodes) { … }
TEST_F(ReadAnythingAppModelTest, Reset_ResetsState) { … }
TEST_F(ReadAnythingAppModelTest, Reset_ResetsSelectionState) { … }
TEST_F(ReadAnythingAppModelTest, PostProcessSelection_SelectionStateCorrect) { … }
TEST_F(ReadAnythingAppModelTest, PostProcessSelectionFromAction_DoesNotDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_OnFirstOpen_DrawsWithNonEmptySelectionInside) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_OnFirstOpen_DrawsWithEmptySelectionInside) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_OnFirstOpen_DrawsWithNonEmptySelectionOutside) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection__OnFirstOpen_DrawsWithEmptySelectionOutside) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_EmptyInside_AfterNonEmptyInside_DoesNotDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_EmptyInside_AfterEmptyInside_DoesNotDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_NonEmptyInside_AfterEmptyInside_DoesNotDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_NonEmptyInside_AfterNonEmptyInside_DoesNotDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_EmptyOutside_AfterNonEmptyOutside_DoesDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_EmptyOutside_AfterEmptyOutside_DoesNotDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_NonEmptyOutside_AfterEmptyOutside_DoesDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_NonEmptyOutside_AfterNonEmptyOutside_DoesDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_EmptyInside_AfterNonEmptyOutside_DoesDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_EmptyInside_AfterEmptyOutside_DoesNotDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_NonEmptyInside_AfterEmptyOutside_DoesNotDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_NonEmptyInside_AfterNonEmptyOutside_DoesDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_EmptyOutside_AfterNonEmptyInside_DoesNotDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_EmptyOutside_AfterEmptyInside_DoesNotDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_NonEmptyOutside_AfterEmptyInside_DoesDraw) { … }
TEST_F(ReadAnythingAppModelTest,
PostProcessSelection_NonEmptyOutside_AfterNonEmptyInside_DoesDraw) { … }
TEST_F(ReadAnythingAppModelTest,
StartAndEndNodesHaveDifferentParents_SelectionStateCorrect) { … }
TEST_F(ReadAnythingAppModelTest,
SelectionParentIsLinkAndInlineBlock_SelectionStateCorrect) { … }
TEST_F(ReadAnythingAppModelTest,
SelectionParentIsListItem_SelectionStateCorrect) { … }
TEST_F(ReadAnythingAppModelTest,
SelectionParentIsGenericContainerAndInline_SelectionStateCorrect) { … }
TEST_F(
ReadAnythingAppModelTest,
SelectionParentIsGenericContainerWithMultipleChildren_SelectionStateCorrect) { … }
TEST_F(ReadAnythingAppModelTest, ResetTextSize_ReturnsTextSizeToDefault) { … }
TEST_F(ReadAnythingAppModelTest, LanguageCode_ReturnsCorrectCode) { … }
TEST_F(ReadAnythingAppModelTest,
SupportedFonts_InvalidLanguageCode_ReturnsDefaultFonts) { … }
TEST_F(ReadAnythingAppModelTest,
SupportedFonts_BeforeLanguageSet_ReturnsDefaultFonts) { … }
TEST_F(ReadAnythingAppModelTest,
SupportedFonts_SetLanguageCode_ReturnsExpectedDefaultFonts) { … }
TEST_F(ReadAnythingAppModelTest, PdfEvents_SetRequiresDistillation) { … }
TEST_F(ReadAnythingAppModelTest, PdfEvents_DontSetRequiresDistillation) { … }
TEST_F(ReadAnythingAppModelTest, OnSelection_HandlesClickAndDragEvents) { … }
TEST_F(ReadAnythingAppModelTest, LastExpandedNodeNamedChanged_TriggersRedraw) { … }
TEST_F(ReadAnythingAppModelTest, ContentEditableValueChanged_ResetsDrawTimer) { … }