Back to build
Raw log | Switch to full mode | Login

python -u /b/swarming/w/ir/kitchen-checkout/build/scripts/tools/runit.py --show-path --with-third-party-lib -- python /b/swarming/w/ir/kitchen-checkout/build/scripts/slave/recipe_modules/swarming/resources/collect_task.py --verbose -o /b/swarming/w/ir/tmp/t/tmpNTOIA4.json --task-output-dir /b/swarming/w/ir/tmp/t/tmpc280ib --merge-script /b/swarming/w/ir/kitchen-checkout/build/scripts/slave/recipe_modules/swarming/resources/standard_gtest_merge.py --merge-script-stdout-file /b/swarming/w/ir/tmp/t/tmpUbO5eumerge_script_log --merge-additional-args '[]' --build-properties '{"blamelist": ["rhalavati@chromium.org"], "bot_id": "swarm1569-c4", "buildbucket": {"build": {"bucket": "luci.chromium.try", "created_by": "user:rhalavati@google.com", "created_ts": 1549960548101963, "id": "8921742284272318256", "project": "chromium", "tags": ["build_address:luci.chromium.try/linux-chromeos-dbg/697", "builder:linux-chromeos-dbg", "buildset:patch/gerrit/chromium-review.googlesource.com/1466401/2", "user_agent:gerrit"]}, "hostname": "cr-buildbucket.appspot.com"}, "buildername": "linux-chromeos-dbg", "buildnumber": 697, "got_angle_revision": "c66fb571be1a1599791a6d96d4055b3b84534a14", "got_dawn_revision": "5987c4e8395aed194c987c051b56d35485180b46", "got_nacl_revision": "ff15c51d20785fa51c0ef03ccb480b87299acbeb", "got_revision": "5b67888aa4895f595d68d6587ee628693298e3cb", "got_revision_cp": "refs/heads/master@{#631150}", "got_swarming_client_revision": "0e3e1c4dc4e79f25a5b58fcbc135dc93183c0c54", "got_v8_revision": "1a2e8b8dfd4006959f17c0145ec936117eb3808d", "got_v8_revision_cp": "refs/heads/7.4.139@{#1}", "got_webrtc_revision": "f13c2cd9ee41f4ca572232a4e397b05449474632", "got_webrtc_revision_cp": "refs/heads/master@{#26626}", "mastername": "tryserver.chromium.chromiumos", "patch_gerrit_url": "https://chromium-review.googlesource.com", "patch_issue": 1466401, "patch_project": "chromium/src", "patch_ref": "refs/changes/01/1466401/2", "patch_repository_url": "https://chromium.googlesource.com/chromium/src", "patch_set": 2, "patch_storage": "gerrit", "path_config": "generic", "recipe": "chromium_trybot", "repository": "https://chromium.googlesource.com/chromium/src"}' --summary-json-file /b/swarming/w/ir/tmp/t/tmpzU56ez.json -- swarming collect -server https://chromium-swarm.appspot.com -worker 50 -task-summary-python -task-output-stdout all -verbose -requests-json /b/swarming/w/ir/tmp/t/tmpny_A13.json in dir /b/swarming/w/ir/kitchen-workdir: allow_subannotations: True base_name: 'non_single_process_mash_browser_tests (with patch)' cmd: ['python', '-u', '/b/swarming/w/ir/kitchen-checkout/build/scripts/tools/runit.py', '--show-path', '--with-third-party-lib', '--', 'python', '/b/swarming/w/ir/kitchen-checkout/build/scripts/slave/recipe_modules/swarming/resources/collect_task.py', '--verbose', '-o', '/b/swarming/w/ir/tmp/t/tmpNTOIA4.json', '--task-output-dir', '/b/swarming/w/ir/tmp/t/tmpc280ib', '--merge-script', '/b/swarming/w/ir/kitchen-checkout/build/scripts/slave/recipe_modules/swarming/resources/standard_gtest_merge.py', '--merge-script-stdout-file', '/b/swarming/w/ir/tmp/t/tmpUbO5eumerge_script_log', '--merge-additional-args', '[]', '--build-properties', '{"blamelist": ["rhalavati@chromium.org"], "bot_id": "swarm1569-c4", "buildbucket": {"build": {"bucket": "luci.chromium.try", "created_by": "user:rhalavati@google.com", "created_ts": 1549960548101963, "id": "8921742284272318256", "project": "chromium", "tags": ["build_address:luci.chromium.try/linux-chromeos-dbg/697", "builder:linux-chromeos-dbg", "buildset:patch/gerrit/chromium-review.googlesource.com/1466401/2", "user_agent:gerrit"]}, "hostname": "cr-buildbucket.appspot.com"}, "buildername": "linux-chromeos-dbg", "buildnumber": 697, "got_angle_revision": "c66fb571be1a1599791a6d96d4055b3b84534a14", "got_dawn_revision": "5987c4e8395aed194c987c051b56d35485180b46", "got_nacl_revision": "ff15c51d20785fa51c0ef03ccb480b87299acbeb", "got_revision": "5b67888aa4895f595d68d6587ee628693298e3cb", "got_revision_cp": "refs/heads/master@{#631150}", "got_swarming_client_revision": "0e3e1c4dc4e79f25a5b58fcbc135dc93183c0c54", "got_v8_revision": "1a2e8b8dfd4006959f17c0145ec936117eb3808d", "got_v8_revision_cp": "refs/heads/7.4.139@{#1}", "got_webrtc_revision": "f13c2cd9ee41f4ca572232a4e397b05449474632", "got_webrtc_revision_cp": "refs/heads/master@{#26626}", "mastername": "tryserver.chromium.chromiumos", "patch_gerrit_url": "https://chromium-review.googlesource.com", "patch_issue": 1466401, "patch_project": "chromium/src", "patch_ref": "refs/changes/01/1466401/2", "patch_repository_url": "https://chromium.googlesource.com/chromium/src", "patch_set": 2, "patch_storage": "gerrit", "path_config": "generic", "recipe": "chromium_trybot", "repository": "https://chromium.googlesource.com/chromium/src"}', '--summary-json-file', '/b/swarming/w/ir/tmp/t/tmpzU56ez.json', '--', 'swarming', 'collect', '-server', 'https://chromium-swarm.appspot.com', '-worker', '50', '-task-summary-python', '-task-output-stdout', 'all', '-verbose', '-requests-json', '/b/swarming/w/ir/tmp/t/tmpny_A13.json'] env: {'CHROME_HEADLESS': '1'} env_prefixes: {'PATH': '/b/swarming/w/ir/cache/swarming_client'} env_suffixes: {} infra_step: False name: 'non_single_process_mash_browser_tests (with patch)' nest_level: 0 ok_ret: frozenset([0]) step_test_data: <lambda>(...) trigger_specs: () full environment: ADDRFAM: inet BOTO_CONFIG: /b/swarming/w/ir/tmp/gsutil_task/.boto BUILDBUCKET_EXPERIMENTAL: FALSE CHROME_HEADLESS: 1 CIPD_CACHE_DIR: /b/swarming/cipd_cache/cache CIPD_PROTOCOL: v2 DEVSHELL_CLIENT_PORT: 37614 DOCKER_CONFIG: /b/swarming/w/ir/tmp/docker_cfg_task DOCKER_TMPDIR: /b/swarming/w/ir/tmp/docker_tmp_task GIT_CONFIG_NOSYSTEM: 1 GIT_TERMINAL_PROMPT: 0 HOME: /home/chrome-bot IFACE: eth0 INFRA_GIT_WRAPPER_HOME: /b/swarming/w/ir/tmp/git_home_task LOGDOG_COORDINATOR_HOST: logs.chromium.org LOGDOG_STREAM_PREFIX: buildbucket/cr-buildbucket.appspot.com/8921742284272318256 LOGDOG_STREAM_PROJECT: chromium LOGDOG_STREAM_SERVER_PATH: unix:/b/swarming/w/ir/tmp/ld.sock LOGICAL: eth0 LUCI_CONTEXT: /b/swarming/w/itEL_ah1/luci_context.369954488 MAC_CHROMIUM_TMPDIR: /b/swarming/w/ir/tmp/t METHOD: dhcp NO_GCE_CHECK: False PATH: /b/swarming/w/ir/cache/swarming_client:/b/swarming/w/ir/cipd_bin_packages:/b/swarming/w/ir/cipd_bin_packages/bin:/b/swarming/cipd_cache/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PWD: /b/swarming/w/ir PYTHONIOENCODING: UTF-8 PYTHONUNBUFFERED: 1 ROOT_SETUP_LOG: /var/log/messages/chromebuild/root-setup.log SHLVL: 1 STARTUP_LOG: /var/log/messages/chromebuild/startup.log SWARMING_BOT_ID: swarm1569-c4 SWARMING_EXTERNAL_BOT_SETUP: 1 SWARMING_HEADLESS: 1 SWARMING_SERVER: https://chromium-swarm.appspot.com SWARMING_TASK_ID: 42f9aaa240cb0d11 TEMP: /b/swarming/w/ir/tmp/t TEMPDIR: /b/swarming/w/ir/tmp/t TERM: linux TMP: /b/swarming/w/ir/tmp/t TMPDIR: /b/swarming/w/ir/tmp/t UPSTART_EVENTS: net-device-up UPSTART_INSTANCE: UPSTART_JOB: chromebuild-startup USER: chrome-bot USERNAME: chrome-bot VPYTHON_VIRTUALENV_ROOT: /b/swarming/w/ir/cache/vpython _: /b/swarming/w/ir/cipd_bin_packages/vpython Set PYTHONPATH: /b/swarming/w/ir/kitchen-checkout/build/scripts:/b/swarming/w/ir/kitchen-checkout/build/site_config:/b/swarming/w/ir/kitchen-checkout/build/third_party:/b/swarming/w/ir/kitchen-checkout/build/third_party/buildbot_8_4p1:/b/swarming/w/ir/kitchen-checkout/build/third_party/buildbot_slave_8_4:/b/swarming/w/ir/kitchen-checkout/build/third_party/coverage-3.7.1:/b/swarming/w/ir/kitchen-checkout/build/third_party/decorator_3_3_1:/b/swarming/w/ir/kitchen-checkout/build/third_party/google_api_python_client:/b/swarming/w/ir/kitchen-checkout/build/third_party/httplib2/python2:/b/swarming/w/ir/kitchen-checkout/build/third_party/infra_libs:/b/swarming/w/ir/kitchen-checkout/build/third_party/jinja2:/b/swarming/w/ir/kitchen-checkout/build/third_party/markupsafe:/b/swarming/w/ir/kitchen-checkout/build/third_party/oauth2client:/b/swarming/w/ir/kitchen-checkout/build/third_party/pyasn1:/b/swarming/w/ir/kitchen-checkout/build/third_party/pyasn1-modules:/b/swarming/w/ir/kitchen-checkout/build/third_party/python-rsa:/b/swarming/w/ir/kitchen-checkout/build/third_party/requests_2_10_0:/b/swarming/w/ir/kitchen-checkout/build/third_party/setuptools-0.6c11:/b/swarming/w/ir/kitchen-checkout/build/third_party/sqlalchemy_0_7_1:/b/swarming/w/ir/kitchen-checkout/build/third_party/sqlalchemy_migrate_0_7_1:/b/swarming/w/ir/kitchen-checkout/build/third_party/tempita_0_5:/b/swarming/w/ir/kitchen-checkout/build/third_party/twisted_10_2:/b/swarming/w/ir/kitchen-checkout/build/third_party/uritemplate:/b/swarming/w/ir/kitchen-checkout/build/third_party/site-packages 2019-02-12 01:38:29,197 - root: [DEBUG] Using task_output_dir: '/b/swarming/w/ir/tmp/t/tmpc280ib' 2019-02-12 01:38:29,197 - root: [WARNING] task_output_dir '/b/swarming/w/ir/tmp/t/tmpc280ib' already exists! 2019-02-12 01:38:29,197 - root: [WARNING] task_output_dir existing content: [] 2019-02-12 01:38:29,197 - root: [INFO] collect_cmd: swarming collect -server https://chromium-swarm.appspot.com -worker 50 -task-summary-python -task-output-stdout all -verbose -requests-json /b/swarming/w/ir/tmp/t/tmpny_A13.json -output-dir /b/swarming/w/ir/tmp/t/tmpc280ib -task-summary-json /b/swarming/w/ir/tmp/t/tmpzU56ez.json 42f9c39913249510: exit 0 Additional test environment: CHROME_DEVEL_SANDBOX=/opt/chromium/chrome_sandbox CHROME_HEADLESS=1 LANG=en_US.UTF-8 Command: ./browser_tests --test-launcher-bot-mode --cfi-diag=0 --disable-features=SingleProcessMash --override-use-software-gl-for-tests --test-launcher-summary-output=/b/s/w/iopCc93e/output.json IMPORTANT DEBUGGING NOTE: each test is run inside its own process. For debugging a test inside a debugger, use the --gtest_filter=<your_test_name> flag along with either --single_process (to run the test in one launcher/browser process) or --single-process (to do the above, and also run Chrome in single-process mode). Using sharding settings from environment. This is shard 0/20 Using 4 parallel jobs. Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=PlatformAppBrowserTest.AppWithContextMenuClicked --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsfK5fV1/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dhSO81d ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=PlatformAppBrowserTest.WindowDotPrintShouldBringUpPrintPreview --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsaVfMHD/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dezdvOP ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=PlatformAppBrowserTest.AppWindowIframe --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsS0SCjR/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dQPiXo3 ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=PlatformAppBrowserTest.ChromeRuntimeGetPackageDirectoryEntryApp --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsjfvJ4g/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/d9hzteF [1/594] PlatformAppBrowserTest.AppWindowIframe (19579 ms) [2/594] PlatformAppBrowserTest.AppWithContextMenuClicked (21017 ms) [3/594] PlatformAppBrowserTest.ChromeRuntimeGetPackageDirectoryEntryApp (25215 ms) [4/594] WebViewTest.Shim_TestCustomElementCallbacksInaccessible (11017 ms) [5/594] PlatformAppBrowserTest.WindowDotPrintShouldBringUpPrintPreview (31215 ms) [6/594] WebViewTest.Shim_TestPartitionRemovalAfterNavigationFails (10229 ms) [7/594] WebViewTest.Shim_TestDeclarativeWebRequestAPISendMessage (7625 ms) [8/594] WebViewTest.Shim_TestLoadAbortInvalidNavigation (8395 ms) [9/594] WebViewTest.ShimSrcAttribute (8397 ms) [10/594] WebViewTest.TestContextMenu (8655 ms) [11/594] WebViewTest.MediaAccessAPIAllow_TestAllowTwice (8396 ms) [0212/010522.865133:ERROR:kill_posix.cc(84)] Unable to terminate process group 28348: No such process (3) [ RUN ] WebViewTest.ReloadAfterCrash [1:1:0212/010518.734971:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [28348:28348:0212/010519.560650:WARNING:user_policy_manager_factory_chromeos.cc(210)] No policy loaded for known non-enterprise user [28348:28348:0212/010519.682720:WARNING:merge_session_throttling_utils.cc(143)] Loading content for a profile without session restore? [28348:28348:0212/010519.960332:WARNING:merge_session_throttling_utils.cc(143)] Loading content for a profile without session restore? [28348:28348:0212/010520.126447:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [28348:28348:0212/010521.464039:FATAL:shelf_widget.cc(293)] Check failed: login_shelf_view_->visible(). #0 0x7f476a432901 base::debug::CollectStackTrace() #1 0x7f476a29ac1d base::debug::StackTrace::StackTrace() #2 0x7f476a29abd5 base::debug::StackTrace::StackTrace() #3 0x7f476a2d5827 logging::LogMessage::~LogMessage() #4 0x7f4755505f47 ash::ShelfWidget::GetHitTestRects() #5 0x7f4755507f11 ash::ShelfWindowTargeter::GetHitTestRects() #6 0x7f475d0b83ae aura::WindowTargeter::EventLocationInsideBounds() #7 0x7f4753f857d0 wm::EasyResizeWindowTargeter::EventLocationInsideBounds() #8 0x7f475d0b6e04 aura::WindowTargeter::SubtreeShouldBeExploredForEvent() #9 0x7f475d0b8046 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #10 0x7f475d0b7ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #11 0x7f47554be22b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #12 0x7f475d0b7c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #13 0x7f475d0b7aa1 aura::WindowTargeter::FindTargetForEvent() #14 0x7f475d0b8096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #15 0x7f475d0b7ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #16 0x7f47554be22b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #17 0x7f475d0b7c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #18 0x7f475d0b7aa1 aura::WindowTargeter::FindTargetForEvent() #19 0x7f475d0b8096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #20 0x7f475d0b7ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #21 0x7f47554be22b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #22 0x7f475d0b7c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #23 0x7f475d0b7aa1 aura::WindowTargeter::FindTargetForEvent() #24 0x7f475f2ddc0c ui::EventProcessor::OnEventFromSource() #25 0x7f475f2ddfac ui::EventProcessor::OnEventFromSource() #26 0x7f4753af2a1f ws::EventQueue::DeliverOrQueueEvent() #27 0x7f47554322b8 ash::AshWindowTreeHostPlatform::DeliverEventToSink() #28 0x7f475543235c ash::AshWindowTreeHostPlatform::DeliverEventToSink() #29 0x7f475f2de9f8 ui::EventSource::SendEventToSinkFromRewriter() #30 0x7f475f2de591 ui::EventSource::SendEventToSink() #31 0x7f475d0be01d aura::WindowTreeHostPlatform::DispatchEvent() #32 0x7f4755432191 ash::AshWindowTreeHostPlatform::DispatchEvent() #33 0x7f475490bf55 base::internal::FunctorTraits<>::Invoke<>() #34 0x7f475490beb6 base::internal::InvokeHelper<>::MakeItSo<>() #35 0x7f475490be47 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui22PlatformWindowDelegateEFvPNS3_5EventEEJNS0_17UnretainedWrapperIS4_EEEEEFvS6_EE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOS6_ #36 0x7f475490bde9 base::internal::Invoker<>::RunOnce() #37 0x7f475f2eadb3 _ZNO4base12OnceCallbackIFvPN2ui5EventEEE3RunES3_ #38 0x7f475f2eabe4 ui::DispatchEventFromNativeUiEvent() #39 0x7f47549824bc ui::X11WindowOzone::DispatchEvent() #40 0x7f47653b6887 ui::PlatformEventSource::DispatchEvent() #41 0x7f473dbb44a9 ui::X11EventSourceLibevent::DispatchPlatformEvent() #42 0x7f473dbb4053 ui::X11EventSourceLibevent::ProcessXEvent() #43 0x7f473dba68a5 ui::X11EventSource::ExtractCookieDataDispatchEvent() #44 0x7f473dba682e ui::X11EventSource::DispatchXEvents() #45 0x7f473dbb470f ui::X11EventSourceLibevent::OnFileCanReadWithoutBlocking() #46 0x7f476a465cae base::MessagePumpLibevent::FdWatchController::OnFileCanReadWithoutBlocking() #47 0x7f476a466dcd base::MessagePumpLibevent::OnLibeventNotification() #48 0x7f476a4af1fe event_process_active #49 0x7f476a4ae847 event_base_loop #50 0x7f476a466ea4 base::MessagePumpLibevent::Run() #51 0x7f476a39702c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #52 0x7f476a33b9d7 base::RunLoop::Run() #53 0x555fc9807c8e content::RunThisRunLoop() #54 0x555fc9807e33 content::RunAllPendingInMessageLoop() #55 0x555fc8e67111 InProcessBrowserTest::PreRunTestOnMainThread() #56 0x555fc97bacde content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #57 0x555fc499f69d base::internal::FunctorTraits<>::Invoke<>() #58 0x555fc499f5e1 base::internal::InvokeHelper<>::MakeItSo<>() #59 0x555fc499f587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #60 0x555fc4b6b83c base::internal::Invoker<>::Run() #61 0x555fc4992f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #62 0x555fc8f07d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #63 0x555fc8f06b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #64 0x555fc66e94dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #65 0x7f4762ab0807 content::BrowserMainLoop::PreMainMessageLoopRun() #66 0x7f4761e8c61d base::internal::FunctorTraits<>::Invoke<>() #67 0x7f4761e8c591 base::internal::InvokeHelper<>::MakeItSo<>() #68 0x7f4761e8c537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #69 0x7f476285811c base::internal::Invoker<>::Run() #70 0x7f4761e00d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #71 0x7f47632c3acc content::StartupTaskRunner::RunAllTasksNow() #72 0x7f4762aaefc1 content::BrowserMainLoop::CreateStartupTasks() #73 0x7f4762ab5ece content::BrowserMainRunnerImpl::Initialize() #74 0x7f4762aac361 content::BrowserMain() #75 0x7f4763e13d2b content::RunBrowserProcessMain() #76 0x7f4763e14fe6 content::ContentMainRunnerImpl::RunServiceManager() #77 0x7f4763e14aa0 content::ContentMainRunnerImpl::Run() #78 0x7f4763e12589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #79 0x7f47416d5703 service_manager::Main() #80 0x7f4763e13835 content::ContentMain() #81 0x555fc97baa19 content::BrowserTestBase::SetUp() #82 0x555fc8e65f4e InProcessBrowserTest::SetUp() #83 0x555fc8dfcdfb extensions::ExtensionBrowserTest::SetUp() #84 0x555fc49873bc WebViewTest::SetUp() #85 0x555fc6c4463e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #86 0x555fc6c40302 testing::internal::HandleExceptionsInMethodIfSupported<>() #87 0x555fc6c33b94 testing::Test::Run() #88 0x555fc6c34282 testing::TestInfo::Run() #89 0x555fc6c34793 testing::TestSuite::Run() #90 0x555fc6c3c274 testing::internal::UnitTestImpl::RunAllTests() #91 0x555fc6c446ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #92 0x555fc6c41152 testing::internal::HandleExceptionsInMethodIfSupported<>() #93 0x555fc6c3bf97 testing::UnitTest::Run() #94 0x555fc8e85d01 RUN_ALL_TESTS() #95 0x555fc8e84562 base::TestSuite::Run() #96 0x555fc8de8b57 ChromeTestSuiteRunner::RunTestSuite() #97 0x555fc8de8c43 ChromeTestLauncherDelegate::RunTestSuite() #98 0x555fc9800005 content::LaunchTests() #99 0x555fc8de8f87 LaunchChromeTests() #100 0x555fc8de89ab main #101 0x7f4742b9af45 __libc_start_main #102 0x555fc494102a _start [12/594] WebViewTest.ReloadAfterCrash (CRASHED) [13/594] WebViewTest.FileSystemAPIRequestFromMainThreadDefaultAllow (8138 ms) [14/594] WebViewTest.Dialog_TestAlertDialog (8410 ms) [15/594] WebViewSurfaceSynchronizationTest.AutosizeBeforeNavigation (8136 ms) [16/594] WebViewAccessibilityTest.FocusAccessibility (8924 ms) [17/594] AutofillTest.ProfilesNotAggregatedWithInvalidEmail (7608 ms) [18/594] SitePerProcessAutofillMetricsBrowserTest.CorrectSourceForCrossSiteEmbeddedUnownedCreditCardCheckout (8139 ms) [19/594] AutofillTest.UsePlusSignForInternationalNumber (11024 ms) [20/594] BitmapFetcherBrowserTest.HandleImageFailedTest (6822 ms) [21/594] AppBannerManagerBrowserTest.CancelBannerAfterPromptInHandler (7896 ms) [22/594] BrowsingDataIndexedDBHelperTest.CannedUnique (6837 ms) [23/594] AutofillCounterTest.AutocompleteSuggestions (6571 ms) [24/594] HistoryCounterTest.DuplicateVisits (6575 ms) [25/594] ChromeNavigationBrowserTest.EmptyDocumentWithErrorCode (7617 ms) [26/594] ChromeNavigationBrowserTest.RedirectErrorPageReloadToAboutBlank (8660 ms) [27/594] ChromeNavigationBrowserTest.ChromeSchemeNavFromSadTab (7621 ms) [28/594] ChromeSecurityExploitBrowserTest.CommitExtensionOriginInWebProcess (7085 ms) [29/594] ChromeSitePerProcessTest.TwoPostMessagesToDifferentSitesWithSameUserGesture (8922 ms) [30/594] ChromeSitePerProcessTest.PostMessageSenderAndReceiverRaceToCreatePopup (8395 ms) [31/594] ChromeSitePerProcessTest.CrossProcessWindowCloseWithTwoBeforeUnloadIframes (8925 ms) [32/594] ChromeSitePerProcessPDFTest.SendSyntheticTapGestureNonOOPIF (8136 ms) [33/594] ClientHintsBrowserTest.ClientHintsHttps/1 (7090 ms) [34/594] ClientHintsBrowserTest.ClientHintsNoLifetimeScriptNotAllowed/0 (7346 ms) [35/594] DataReductionProxyResourceTypeBrowsertest.CoreProxyUsedForMedia (6830 ms) [36/594] DataSaverWithServerBrowserTest.ReloadPage (7875 ms) [37/594] DataSaverWithServerBrowserTest.HttpRttEstimate (6314 ms) [38/594] PageLoadCappingBrowserTest.PageLoadCappingAllowLoads (7082 ms) [39/594] DistillablePageUtilsBrowserTestAllArticles.SimpleArticlesCallDelegateTwiceWithIsDistillable (7619 ms) [40/594] DownloadTest.DownloadMimeTypeSelect (6827 ms) [41/594] DevToolsSanityTest.DevtoolsInDevTools (11287 ms) [42/594] DownloadTest.ContentDisposition (6311 ms) [43/594] DownloadTest.AutoOpen (6567 ms) [44/594] DownloadTest.AnchorDownloadTag (7085 ms) [45/594] ContentFaviconDriverTest.AssociateIconWithInitialPageDespiteLocationOverrideWithinPage (7609 ms) [46/594] ContentFaviconDriverTest.MixedContentSecureFaviconAllowed (7614 ms) [47/594] InfoBarUiTest.InvokeUi_nacl (6301 ms) [48/594] InstallableManagerBrowserTest.CheckMaskableIcon (7347 ms) [49/594] ChromeResourceDispatcherHostDelegateBrowserTest.ThrottlesAddedExactlyOnceToLargeSniffedDownloads (7097 ms) [50/594] EncryptedMediaSupportedTypesClearKeyTest.NoCodecs (8395 ms) [51/594] EncryptedMediaSupportedTypesExternalClearKeyTest.SessionType (8660 ms) [52/594] BrowserCloseManagerBrowserTest.TestUnloadMultipleSlowTabs (14167 ms) [53/594] EncryptedMediaSupportedTypesWidevineHwSecureTest.Robustness (8401 ms) [54/594] MediaEngagementBrowserTest.SessionNewTabCrossOrigin (8405 ms) [55/594] UnifiedAutoplayBrowserTest.OpenSameOriginOutsideMenu (8133 ms) [56/594] MediaEngagementBrowserTest.SessionMultipleTabsClosingParent (8917 ms) [57/594] UnifiedAutoplayBrowserTest.BypassUsingAutoplayFlag (7093 ms) [58/594] MediaStreamDevicesControllerTest.RequestCamBlockedByFeaturePolicy (8928 ms) [59/594] MediaStreamPermissionTest.TestAllowingUserMedia (9705 ms) [60/594] MediaStreamPermissionTest.TestDismissIsNotSticky (9184 ms) [61/594] MediaStreamPermissionTest.DenyingCameraDoesNotCauseStickyDenyForMics (9713 ms) [62/594] MediaFileValidatorTest.InvalidAudio (6564 ms) [63/594] NavigationPredictorBrowserTest.ClickAnchorElementOffTheRecord (8137 ms) [64/594] ProcessMemoryMetricsEmitterTest.FetchDuringTrace (10236 ms) [65/594] DNSErrorPageTest.DNSError_Basic (7088 ms) [66/594] AudibleContentsTrackerTest.TestAudioNotifications (14425 ms) [67/594] NetworkQualityTrackerBrowserTest.SimulateNetworkServiceCrash (5787 ms) [68/594] WebSocketBrowserTest.WebSocketBasicAuthInHTTPURL (7348 ms) [69/594] NTPTilesTest.ServerRedirect (6556 ms) [70/594] HttpsEngagementPageLoadMetricsBrowserTest.SameOrigin_Https (6836 ms) [71/594] HttpsEngagementPageLoadMetricsBrowserTest.ClosedWhileHidden_Https (7624 ms) [72/594] SecurityStatePageLoadMetricsBrowserTest.Simple_Https (6825 ms) [73/594] LiveTabCountPageLoadMetricsBrowserTest.LoadSingleTabInForeground (8658 ms) [74/594] PageLoadMetricsBrowserTest.PaintInMultipleChildFrames (8132 ms) [75/594] PageLoadMetricsBrowserTest.NoStatePrefetchObserverNoStore (8130 ms) [76/594] PageLoadMetricsBrowserTest.UseCounterAnimatedCSSPropertiesInMainFrame (8922 ms) [77/594] PageLoadMetricsBrowserTest.UseCounterFeaturesInNonSecureMainFrame (9193 ms) [78/594] CredentialManagerBrowserTest.StoreInUnloadHandler_SameSite_PreestablishedPipe (7353 ms) [79/594] CredentialManagerBrowserTest.StoreInUnloadHandler_CrossSite_PreestablishedPipe (7617 ms) [80/594] PasswordManagerBrowserTest.NoPromptForSameFormWithDifferentAction (7871 ms) [81/594] PasswordManagerBrowserTest.PromptAfterSubmitWithSubFrameNavigation (8929 ms) [82/594] PasswordManagerBrowserTest.PromptForInputElementWithoutId (8406 ms) [83/594] PasswordManagerBrowserTest.NoPromptForLandingPageWithHTTPErrorStatusCode (7875 ms) [84/594] PasswordManagerBrowserTest.PromptForPushStateWhenFormDisappears_ParametersInOrigins (7081 ms) [85/594] PasswordManagerBrowserTest.PromptForSubmitWithAutocompleteOff (7613 ms) [86/594] PasswordManagerBrowserTest.InternalsPage_Browser (10515 ms) [87/594] PasswordManagerBrowserTest.DeleteCredentialsUpdateDropdow (7870 ms) [88/594] PDFExtensionTest.EnsureInternalPluginDisabled (7092 ms) [89/594] PermissionDialogTest.InvokeUi_mic (7608 ms) [90/594] PictureInPictureWindowControllerBrowserTest.ChangeVideoSrcToMediaStreamKeepsPictureInPictureWindowOpened (7882 ms) [91/594] PictureInPictureWindowControllerBrowserTest.AutoPictureInPictureIsNotTriggeredInRegularWebApp (7871 ms) [92/594] PDFExtensionTest.ServiceWorkerInterception (12079 ms) [93/594] PolicyTest.SpokenFeedbackEnabled (7092 ms) [94/594] WebAppPictureInPictureWindowControllerBrowserTest.AutoPictureInPictureNotTriggeredOnPageShownIfNotEnteredAutoPictureInPicture (8659 ms) [95/594] PolicyTest.URLBlacklistSubresources (8397 ms) [96/594] PolicyTest.ScreenMagnifierTypeNone (6820 ms) [97/594] PolicyTest.PasswordProtectionWarningTriggerGSuite (6823 ms) [98/594] PrerenderBrowserTest.PrerenderXhrHead (7606 ms) [99/594] PrerenderBrowserTest.PrerenderHTML5AudioJsplay (7877 ms) [100/594] PolicyWebStoreIconTest.AppsWebStoreIconHidden (8135 ms) [101/594] PrerenderBrowserTest.PrerenderXhrPost (7355 ms) [102/594] PrerenderBrowserTest.PrerenderSSLClientCertIframe (7606 ms) [103/594] PrerenderBrowserTest.PrerenderEvents (7608 ms) [104/594] PrerenderBrowserTest.PrerenderSSLErrorSubresource (7871 ms) [105/594] PrerenderBrowserTest.PrerenderClickNavigateGoBack (8415 ms) [106/594] PrerenderBrowserTest.PrerenderCapturedWebContents (7867 ms) [107/594] PrerenderBrowserTest.ResourcePriorityOverlappingSwap (7874 ms) [108/594] PrerenderIncognitoBrowserTest.PrerenderIncognitoClosed (8137 ms) [109/594] NoStatePrefetchBrowserTest.PurposeHeaderNotSetWhenNotPrefetching (6832 ms) [110/594] NoStatePrefetchBrowserTest.HistoryUntouchedByPrefetch (7607 ms) [111/594] HostZoomMapBrowserTest.ToggleDefaultZoomLevel (7605 ms) [112/594] NoStatePrefetchBrowserTest.ServiceWorkerIntercept (8393 ms) [113/594] ProfileBrowserTest.SeparateMediaCache (6562 ms) [114/594] ProfileManagerCrOSBrowserTest.GetLastUsedProfile (6310 ms) [115/594] PushMessagingBrowserTest.PushEventWithoutPermission (7607 ms) [116/594] PushMessagingBrowserTest.ResetPushPermissionAfterClearingSiteDataUnderLegacyConditions (7354 ms) [117/594] ReferrerPolicyTest.HttpLeftClickHTTPRedirectToHTTPSSameOrigin (7349 ms) [118/594] ContextMenuBrowserTest.OpenInAppPresentForURLsInScopeOfNonWindowedBookmarkApp (6826 ms) [119/594] SpellingMenuObserverTest.InitMenuWithMisspelledWord (6569 ms) [120/594] TabActivityWatcherUkmTest.LogOldestNTabFeatures (8137 ms) [121/594] TabManagerTest.TabFreezeAndUrgentDiscard (8672 ms) [122/594] TemplateURLScraperTest.ScrapeWithOnSubmit (7610 ms) [123/594] ContinueWhereILeftOffTest.PRE_SessionStorage (7367 ms) [124/594] ContinueWhereILeftOffTest.PRE_Post (7093 ms) [125/594] SessionRestoreTest.ClosedTabStaysClosed (8924 ms) [126/594] SessionRestoreTest.NoSessionRestoreNewWindowChromeOS (9709 ms) [127/594] SessionRestoreTest.ActiveIndexUpdatedAtInsert (10239 ms) [128/594] SessionRestoreTestChromeOS.PRE_RestoreAppsV1 (11024 ms) [129/594] PopupTrackerBrowserTest.NoOpener_NoTracker (7885 ms) [130/594] TabHoverCardBubbleViewBrowserTest.InactiveWindowStaysInactiveOnHover (9184 ms) [131/594] TtsApiTest.NetworkSpeechEngine (9184 ms) [132/594] IncognitoSSLHostStateDelegateTest.PRE_AfterRestart (7364 ms) [133/594] SiteDetailsBrowserTest.VerifySiteInstanceCountInBrowsingInstance (16285 ms) [134/594] SSLUITestWithClientCert.TestWSSClientCert (8148 ms) [135/594] SubresourceFilterBrowserTest.NoRuleset_NoActivation (6566 ms) [136/594] SubresourceFilterBrowserTest.LazyRulesetValidation (6562 ms) [137/594] SubresourceFilterBrowserTest.DynamicFrame (7874 ms) [138/594] SubresourceFilterDevtoolsBrowserTest.ForceActivation_SubresourceLogging (6833 ms) [0212/010937.914025:ERROR:kill_posix.cc(84)] Unable to terminate process group 7253: No such process (3) [ RUN ] TaskManagerBrowserTest.NoticeExtensionTabChanges [1:1:0212/010933.864092:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [7253:7253:0212/010934.672132:WARNING:user_policy_manager_factory_chromeos.cc(210)] No policy loaded for known non-enterprise user [7253:7253:0212/010934.783750:WARNING:merge_session_throttling_utils.cc(143)] Loading content for a profile without session restore? [7253:7253:0212/010935.025180:WARNING:merge_session_throttling_utils.cc(143)] Loading content for a profile without session restore? [7253:7253:0212/010935.185911:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [7253:7253:0212/010936.529849:FATAL:shelf_widget.cc(293)] Check failed: login_shelf_view_->visible(). #0 0x7f9927d24901 base::debug::CollectStackTrace() #1 0x7f9927b8cc1d base::debug::StackTrace::StackTrace() #2 0x7f9927b8cbd5 base::debug::StackTrace::StackTrace() #3 0x7f9927bc7827 logging::LogMessage::~LogMessage() #4 0x7f9912df7f47 ash::ShelfWidget::GetHitTestRects() #5 0x7f9912df9f11 ash::ShelfWindowTargeter::GetHitTestRects() #6 0x7f991a9aa3ae aura::WindowTargeter::EventLocationInsideBounds() #7 0x7f99118777d0 wm::EasyResizeWindowTargeter::EventLocationInsideBounds() #8 0x7f991a9a8e04 aura::WindowTargeter::SubtreeShouldBeExploredForEvent() #9 0x7f991a9aa046 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #10 0x7f991a9a9ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #11 0x7f9912db022b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #12 0x7f991a9a9c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #13 0x7f991a9a9aa1 aura::WindowTargeter::FindTargetForEvent() #14 0x7f991a9aa096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #15 0x7f991a9a9ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #16 0x7f9912db022b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #17 0x7f991a9a9c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #18 0x7f991a9a9aa1 aura::WindowTargeter::FindTargetForEvent() #19 0x7f991a9aa096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #20 0x7f991a9a9ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #21 0x7f9912db022b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #22 0x7f991a9a9c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #23 0x7f991a9a9aa1 aura::WindowTargeter::FindTargetForEvent() #24 0x7f991cbcfc0c ui::EventProcessor::OnEventFromSource() #25 0x7f991cbcffac ui::EventProcessor::OnEventFromSource() #26 0x7f99113e4a1f ws::EventQueue::DeliverOrQueueEvent() #27 0x7f9912d242b8 ash::AshWindowTreeHostPlatform::DeliverEventToSink() #28 0x7f9912d2435c ash::AshWindowTreeHostPlatform::DeliverEventToSink() #29 0x7f991cbd09f8 ui::EventSource::SendEventToSinkFromRewriter() #30 0x7f991cbd0591 ui::EventSource::SendEventToSink() #31 0x7f991a9b001d aura::WindowTreeHostPlatform::DispatchEvent() #32 0x7f9912d24191 ash::AshWindowTreeHostPlatform::DispatchEvent() #33 0x7f99121fdf55 base::internal::FunctorTraits<>::Invoke<>() #34 0x7f99121fdeb6 base::internal::InvokeHelper<>::MakeItSo<>() #35 0x7f99121fde47 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui22PlatformWindowDelegateEFvPNS3_5EventEEJNS0_17UnretainedWrapperIS4_EEEEEFvS6_EE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOS6_ #36 0x7f99121fdde9 base::internal::Invoker<>::RunOnce() #37 0x7f991cbdcdb3 _ZNO4base12OnceCallbackIFvPN2ui5EventEEE3RunES3_ #38 0x7f991cbdcbe4 ui::DispatchEventFromNativeUiEvent() #39 0x7f99122744bc ui::X11WindowOzone::DispatchEvent() #40 0x7f9922ca8887 ui::PlatformEventSource::DispatchEvent() #41 0x7f98fb4a64a9 ui::X11EventSourceLibevent::DispatchPlatformEvent() #42 0x7f98fb4a6053 ui::X11EventSourceLibevent::ProcessXEvent() #43 0x7f98fb4988a5 ui::X11EventSource::ExtractCookieDataDispatchEvent() #44 0x7f98fb49882e ui::X11EventSource::DispatchXEvents() #45 0x7f98fb4a670f ui::X11EventSourceLibevent::OnFileCanReadWithoutBlocking() #46 0x7f9927d57cae base::MessagePumpLibevent::FdWatchController::OnFileCanReadWithoutBlocking() #47 0x7f9927d58dcd base::MessagePumpLibevent::OnLibeventNotification() #48 0x7f9927da11fe event_process_active #49 0x7f9927da0847 event_base_loop #50 0x7f9927d58ea4 base::MessagePumpLibevent::Run() #51 0x7f9927c8902c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #52 0x7f9927c2d9d7 base::RunLoop::Run() #53 0x55afc86d1c8e content::RunThisRunLoop() #54 0x55afc86d1e33 content::RunAllPendingInMessageLoop() #55 0x55afc7d31111 InProcessBrowserTest::PreRunTestOnMainThread() #56 0x55afc8684cde content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #57 0x55afc386969d base::internal::FunctorTraits<>::Invoke<>() #58 0x55afc38695e1 base::internal::InvokeHelper<>::MakeItSo<>() #59 0x55afc3869587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #60 0x55afc3a3583c base::internal::Invoker<>::Run() #61 0x55afc385cf8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #62 0x55afc7dd1d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #63 0x55afc7dd0b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #64 0x55afc55b34dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #65 0x7f99203a2807 content::BrowserMainLoop::PreMainMessageLoopRun() #66 0x7f991f77e61d base::internal::FunctorTraits<>::Invoke<>() #67 0x7f991f77e591 base::internal::InvokeHelper<>::MakeItSo<>() #68 0x7f991f77e537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #69 0x7f992014a11c base::internal::Invoker<>::Run() #70 0x7f991f6f2d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #71 0x7f9920bb5acc content::StartupTaskRunner::RunAllTasksNow() #72 0x7f99203a0fc1 content::BrowserMainLoop::CreateStartupTasks() #73 0x7f99203a7ece content::BrowserMainRunnerImpl::Initialize() #74 0x7f992039e361 content::BrowserMain() #75 0x7f9921705d2b content::RunBrowserProcessMain() #76 0x7f9921706fe6 content::ContentMainRunnerImpl::RunServiceManager() #77 0x7f9921706aa0 content::ContentMainRunnerImpl::Run() #78 0x7f9921704589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #79 0x7f98fefc7703 service_manager::Main() #80 0x7f9921705835 content::ContentMain() #81 0x55afc8684a19 content::BrowserTestBase::SetUp() #82 0x55afc7d2ff4e InProcessBrowserTest::SetUp() #83 0x55afc7cc6dfb extensions::ExtensionBrowserTest::SetUp() #84 0x55afc5b0e63e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #85 0x55afc5b0a302 testing::internal::HandleExceptionsInMethodIfSupported<>() #86 0x55afc5afdb94 testing::Test::Run() #87 0x55afc5afe282 testing::TestInfo::Run() #88 0x55afc5afe793 testing::TestSuite::Run() #89 0x55afc5b06274 testing::internal::UnitTestImpl::RunAllTests() #90 0x55afc5b0e6ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #91 0x55afc5b0b152 testing::internal::HandleExceptionsInMethodIfSupported<>() #92 0x55afc5b05f97 testing::UnitTest::Run() #93 0x55afc7d4fd01 RUN_ALL_TESTS() #94 0x55afc7d4e562 base::TestSuite::Run() #95 0x55afc7cb2b57 ChromeTestSuiteRunner::RunTestSuite() #96 0x55afc7cb2c43 ChromeTestLauncherDelegate::RunTestSuite() #97 0x55afc86ca005 content::LaunchTests() #98 0x55afc7cb2f87 LaunchChromeTests() #99 0x55afc7cb29ab main #100 0x7f990048cf45 __libc_start_main #101 0x55afc380b02a _start [139/594] TaskManagerBrowserTest.NoticeExtensionTabChanges (CRASHED) [140/594] TaskManagerBrowserTest.NavigateAwayFromHungRenderer (8665 ms) [0212/010941.999365:ERROR:kill_posix.cc(84)] Unable to terminate process group 7462: No such process (3) [ RUN ] TranslateManagerBrowserTest.PageLanguageDetection [1:1:0212/010938.145034:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [7462:7462:0212/010938.510370:WARNING:chrome_browser_main_chromeos.cc(557)] Running as stub user with profile dir: test-user [7462:7462:0212/010939.266714:INFO:remote_commands_service.cc(38)] Fetching remote commands. [7462:7462:0212/010939.266990:WARNING:remote_commands_service.cc(40)] Client is not registered. [7462:7462:0212/010939.267186:INFO:remote_commands_invalidator.cc(32)] Initialize RemoteCommandsInvalidator. [7462:7462:0212/010939.267354:INFO:remote_commands_invalidator.cc(57)] Starting RemoteCommandsInvalidator. [7462:7462:0212/010939.267478:INFO:remote_commands_invalidator.cc(123)] RemoteCommandsInvalidator ReloadPolicyData. [7462:7462:0212/010939.268242:INFO:remote_commands_invalidator.cc(167)] Unregister RemoteCommandsInvalidator. [7462:7462:0212/010939.541471:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [7462:7462:0212/010940.754150:FATAL:shelf_widget.cc(293)] Check failed: login_shelf_view_->visible(). #0 0x7efd1f6e8901 base::debug::CollectStackTrace() #1 0x7efd1f550c1d base::debug::StackTrace::StackTrace() #2 0x7efd1f550bd5 base::debug::StackTrace::StackTrace() #3 0x7efd1f58b827 logging::LogMessage::~LogMessage() #4 0x7efd0a7bbf47 ash::ShelfWidget::GetHitTestRects() #5 0x7efd0a7bdf11 ash::ShelfWindowTargeter::GetHitTestRects() #6 0x7efd1236e3ae aura::WindowTargeter::EventLocationInsideBounds() #7 0x7efd0923b7d0 wm::EasyResizeWindowTargeter::EventLocationInsideBounds() #8 0x7efd1236ce04 aura::WindowTargeter::SubtreeShouldBeExploredForEvent() #9 0x7efd1236e046 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #10 0x7efd1236def3 aura::WindowTargeter::FindTargetForLocatedEvent() #11 0x7efd0a77422b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #12 0x7efd1236dc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #13 0x7efd1236daa1 aura::WindowTargeter::FindTargetForEvent() #14 0x7efd1236e096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #15 0x7efd1236def3 aura::WindowTargeter::FindTargetForLocatedEvent() #16 0x7efd0a77422b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #17 0x7efd1236dc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #18 0x7efd1236daa1 aura::WindowTargeter::FindTargetForEvent() #19 0x7efd1236e096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #20 0x7efd1236def3 aura::WindowTargeter::FindTargetForLocatedEvent() #21 0x7efd0a77422b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #22 0x7efd1236dc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #23 0x7efd1236daa1 aura::WindowTargeter::FindTargetForEvent() #24 0x7efd14593c0c ui::EventProcessor::OnEventFromSource() #25 0x7efd14593fac ui::EventProcessor::OnEventFromSource() #26 0x7efd08da8a1f ws::EventQueue::DeliverOrQueueEvent() #27 0x7efd0a6e82b8 ash::AshWindowTreeHostPlatform::DeliverEventToSink() #28 0x7efd0a6e835c ash::AshWindowTreeHostPlatform::DeliverEventToSink() #29 0x7efd145949f8 ui::EventSource::SendEventToSinkFromRewriter() #30 0x7efd14594591 ui::EventSource::SendEventToSink() #31 0x7efd1237401d aura::WindowTreeHostPlatform::DispatchEvent() #32 0x7efd0a6e8191 ash::AshWindowTreeHostPlatform::DispatchEvent() #33 0x7efd09bc1f55 base::internal::FunctorTraits<>::Invoke<>() #34 0x7efd09bc1eb6 base::internal::InvokeHelper<>::MakeItSo<>() #35 0x7efd09bc1e47 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui22PlatformWindowDelegateEFvPNS3_5EventEEJNS0_17UnretainedWrapperIS4_EEEEEFvS6_EE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOS6_ #36 0x7efd09bc1de9 base::internal::Invoker<>::RunOnce() #37 0x7efd145a0db3 _ZNO4base12OnceCallbackIFvPN2ui5EventEEE3RunES3_ #38 0x7efd145a0be4 ui::DispatchEventFromNativeUiEvent() #39 0x7efd09c384bc ui::X11WindowOzone::DispatchEvent() #40 0x7efd1a66c887 ui::PlatformEventSource::DispatchEvent() #41 0x7efcf2e6a4a9 ui::X11EventSourceLibevent::DispatchPlatformEvent() #42 0x7efcf2e6a053 ui::X11EventSourceLibevent::ProcessXEvent() #43 0x7efcf2e5c8a5 ui::X11EventSource::ExtractCookieDataDispatchEvent() #44 0x7efcf2e5c82e ui::X11EventSource::DispatchXEvents() #45 0x7efcf2e6a70f ui::X11EventSourceLibevent::OnFileCanReadWithoutBlocking() #46 0x7efd1f71bcae base::MessagePumpLibevent::FdWatchController::OnFileCanReadWithoutBlocking() #47 0x7efd1f71cdcd base::MessagePumpLibevent::OnLibeventNotification() #48 0x7efd1f7651fe event_process_active #49 0x7efd1f764847 event_base_loop #50 0x7efd1f71cea4 base::MessagePumpLibevent::Run() #51 0x7efd1f64d02c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #52 0x7efd1f5f19d7 base::RunLoop::Run() #53 0x557f2c7b7c8e content::RunThisRunLoop() #54 0x557f2c7b7e33 content::RunAllPendingInMessageLoop() #55 0x557f2be17111 InProcessBrowserTest::PreRunTestOnMainThread() #56 0x557f2c76acde content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #57 0x557f2794f69d base::internal::FunctorTraits<>::Invoke<>() #58 0x557f2794f5e1 base::internal::InvokeHelper<>::MakeItSo<>() #59 0x557f2794f587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #60 0x557f27b1b83c base::internal::Invoker<>::Run() #61 0x557f27942f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #62 0x557f2beb7d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #63 0x557f2beb6b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #64 0x557f296994dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #65 0x7efd17d66807 content::BrowserMainLoop::PreMainMessageLoopRun() #66 0x7efd1714261d base::internal::FunctorTraits<>::Invoke<>() #67 0x7efd17142591 base::internal::InvokeHelper<>::MakeItSo<>() #68 0x7efd17142537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #69 0x7efd17b0e11c base::internal::Invoker<>::Run() #70 0x7efd170b6d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #71 0x7efd18579acc content::StartupTaskRunner::RunAllTasksNow() #72 0x7efd17d64fc1 content::BrowserMainLoop::CreateStartupTasks() #73 0x7efd17d6bece content::BrowserMainRunnerImpl::Initialize() #74 0x7efd17d62361 content::BrowserMain() #75 0x7efd190c9d2b content::RunBrowserProcessMain() #76 0x7efd190cafe6 content::ContentMainRunnerImpl::RunServiceManager() #77 0x7efd190caaa0 content::ContentMainRunnerImpl::Run() #78 0x7efd190c8589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #79 0x7efcf698b703 service_manager::Main() #80 0x7efd190c9835 content::ContentMain() #81 0x557f2c76aa19 content::BrowserTestBase::SetUp() #82 0x557f2be15f4e InProcessBrowserTest::SetUp() #83 0x557f279adff5 autofill::AutofillProviderBrowserTest::SetUp() #84 0x557f29bf463e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #85 0x557f29bf0302 testing::internal::HandleExceptionsInMethodIfSupported<>() #86 0x557f29be3b94 testing::Test::Run() #87 0x557f29be4282 testing::TestInfo::Run() #88 0x557f29be4793 testing::TestSuite::Run() #89 0x557f29bec274 testing::internal::UnitTestImpl::RunAllTests() #90 0x557f29bf46ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #91 0x557f29bf1152 testing::internal::HandleExceptionsInMethodIfSupported<>() #92 0x557f29bebf97 testing::UnitTest::Run() #93 0x557f2be35d01 RUN_ALL_TESTS() #94 0x557f2be34562 base::TestSuite::Run() #95 0x557f2bd98b57 ChromeTestSuiteRunner::RunTestSuite() #96 0x557f2bd98c43 ChromeTestLauncherDelegate::RunTestSuite() #97 0x557f2c7b0005 content::LaunchTests() #98 0x557f2bd98f87 LaunchChromeTests() #99 0x557f2bd989ab main #100 0x7efcf7e50f45 __libc_start_main #101 0x557f278f102a _start [141/594] TranslateManagerBrowserTest.PageLanguageDetection (CRASHED) [142/594] TaskManagerBrowserTest.SentDataObserved (9708 ms) [143/594] TranslateManagerBrowserTest.PageTranslationError (7360 ms) [144/594] TranslateManagerBrowserTest.PageTranslationTimeoutError (8394 ms) [145/594] BrowserTest.AppIdSwitch (6825 ms) [146/594] BrowserTest.DialogsAllowedInFullscreenWithinTabMode (6298 ms) [147/594] ClickModifierTest.WindowOpenShiftClickTest (7607 ms) [148/594] BrowserNavigatorTest.AppInstalledFlagDisabled_OpenAppWindowIfPossible_True (7347 ms) [149/594] BrowserNavigatorTest.SchemeMismatchTabSwitchTest (8404 ms) [150/594] BrowserNavigatorTest.SwitchToTabLatestWindow (9722 ms) [151/594] FindInPageControllerTest.NoAudibleAlertOnFrameChange (11022 ms) [152/594] FindInPageControllerTest.PreferPreviousSearch (11831 ms) [153/594] FindInPageControllerTest.GlobalPasteboardIncognito (8408 ms) [154/594] PasswordGenerationPopupViewTest.MouseMovementInEditingPopup (7349 ms) [155/594] StartupBrowserCreatorWelcomeBackTest.WelcomeBackStandardNoPolicy (8929 ms) [156/594] BrowserActionsBarBrowserTest.Basic (8143 ms) [157/594] BrowserNavigatorTest.NavigateFromPageToOptionsInNewTab (33587 ms) [158/594] BrowserNavigatorTest.NavigateFromOtherTabToSingletonOptions (33326 ms) [159/594] AuthenticatorDialogTest.InvokeUi_ble_power_on_manual (6825 ms) [160/594] UnloadTest.BrowserCloseBeforeUnloadCancel (7084 ms) [161/594] FormAutocompleteTest.AjaxSucceeded_NoLongerVisible_DifferentActionsSameData (2363 ms) [162/594] PolicyToolUIExportTest.ExportSessionPolicyToLinux (11278 ms) [163/594] PolicyUITest.SendPolicyNames (12069 ms) [164/594] FormAutocompleteTest.AjaxSucceeded_NoFormInteractionInvisible (2104 ms) [165/594] UnloadTest.BrowserCloseTwoSecondBeforeUnloadAlert (7351 ms) [166/594] FormAutofillTest.WebFormControlElementToFormFieldMaxLength (2099 ms) [167/594] FormAutofillTest.WebFormElementConsiderNonControlLabelableElements (2099 ms) [168/594] FormAutofillTest.WebFormElementToFormData_AutocompleteOff_OnField (2100 ms) [169/594] FormAutofillTest.FillFormNonEmptyFieldForUnownedForm (1836 ms) [170/594] FormAutofillTest.LabelsInferredFromTableRow (2099 ms) [171/594] FormAutofillTest.MultipleLabelsPerElement (2100 ms) [172/594] PasswordAutofillAgentTest.PreviewSuggestion (2100 ms) [173/594] PasswordAutofillAgentTest.RememberLastNonEmptyUsernameAndPasswordOnSubmit_UserCleared (2099 ms) [174/594] PasswordAutofillAgentTest.AcceptingSuggestionDoesntRewriteUsername (2100 ms) [175/594] PasswordAutofillAgentTest.FillOnAccountSelectOnly (1838 ms) [176/594] PasswordAutofillAgentTest.NotShowPopupPasswordField (2099 ms) [177/594] PasswordAutofillAgentTest.SuggestionsOnUsernameFieldOfChangePasswordForm (2100 ms) [178/594] PasswordAutofillAgentTest.SuggestWhenJavaScriptUpdatesFieldNames (2102 ms) [179/594] PasswordGenerationAgentTest.ManualGenerationInFormTest (2099 ms) [180/594] ContentSettingsObserverBrowserTest.ContentSettingsAllowScripts (2099 ms) [181/594] WebUIResourceBrowserTest.MockTimerTest (7086 ms) [182/594] WebUIResourceBrowserTest.ParseHtmlSubsetTest (7348 ms) [183/594] OutOfProcessPPAPITest.TCPSocket_Backlog (8655 ms) [184/594] OutOfProcessPPAPITest.TCPSocketPrivate_Basic (8920 ms) [185/594] OutOfProcessPPAPITest.TCPSocket_ConnectError (8408 ms) [186/594] OutOfProcessPPAPITest.TCPSocket_ReadError (8660 ms) [187/594] OutOfProcessPPAPITest.TCPSocket_ListenError (8657 ms) [188/594] OutOfProcessPPAPITest.UDPSocket_SetOption (8923 ms) [189/594] OutOfProcessPPAPITest.UDPSocket_SetBroadcastDropPipe (8666 ms) [190/594] OutOfProcessPPAPITest.View_CreatedVisible (8920 ms) [191/594] OutOfProcessPPAPITest.Printing (8924 ms) [192/594] PPAPINaClNewlibTest.TCPSocket_ReadClosePipe (8941 ms) [193/594] PPAPINaClNewlibTest.TCPSocket_SetReceiveBufferSizeError (9452 ms) [194/594] PPAPINaClNewlibTest.TCPSocketPrivate_SSLWriteError (9190 ms) [195/594] PPAPINaClNewlibTest.TCPSocketPrivate_SSLReadError (9184 ms) [196/594] PPAPINaClNewlibTest.TCPServerSocketPrivate_AcceptClosePipe (8926 ms) [197/594] PPAPINaClNewlibTest.UDPSocket_Broadcast (9191 ms) [198/594] PPAPINaClNewlibTest.UDPSocketPrivate_ConnectFailure (9182 ms) [199/594] PPAPINaClNewlibTest.URLRequest_Stress (9183 ms) [200/594] PPAPINaClPNaClNonSfiTest.TCPSocket_ReadWrite (8934 ms) [201/594] PPAPINaClPNaClNonSfiTest.TCPSocket_AcceptedSocketReadError (8943 ms) [202/594] PPAPINaClPNaClNonSfiTest.UDPSocket_Multicast (9186 ms) [203/594] PPAPINaClPNaClNonSfiTest.UDPSocketPrivate_Broadcast (9447 ms) [204/594] PPAPINaClPNaClNonSfiTest.UDPSocket_DropPipeAfterBindSendToFails (9189 ms) [205/594] PPAPINaClGLibcTest.TCPSocket_AcceptClosePipe (10243 ms) [206/594] PPAPINaClGLibcTest.TCPSocketPrivate_SSLWriteError (9973 ms) [207/594] PPAPINaClGLibcTest.UDPSocket_SetOption_1_0 (9976 ms) [208/594] PPAPINaClGLibcTest.UDPSocket_Multicast (10240 ms) [209/594] PPAPIFileChooserTest.FileChooser_SaveAs_UnsafeDefaultName (8921 ms) [210/594] PPAPINaClGLibcTest.UDPSocket_DropReceiverPipeOnReceiveMore (10232 ms) [211/594] NaClBrowserTestNewlib.CrashViaExitCall (7880 ms) [212/594] NaClBrowserTestNewlib.SuccessfulLoadUMA (7617 ms) [213/594] NaClBrowserTestGLibc.ExitStatus254 (8401 ms) [214/594] NaClBrowserTestGLibc.PPAPICore (9975 ms) [215/594] NaClBrowserTestPnacl.CrashViaCheckFailure (10242 ms) [216/594] NaClBrowserTestPnacl.SysconfNprocessorsOnln (9703 ms) [217/594] NaClGdbTest.Empty (8931 ms) [218/594] MediaGalleriesPlatformAppBrowserTest.MediaGalleriesAccessAttached (7611 ms) [219/594] MediaGalleriesGalleryWatchApiTest.SetupGalleryWatchWithoutListeners (7345 ms) [220/594] ExtensionApiTest.FontSettingsIncognito (8131 ms) [221/594] ExtensionApiTest.I18NUpdate (7873 ms) [222/594] AutomationApiTest.TableProperties (8404 ms) [223/594] AutomationApiTest.LocationInWebView (9707 ms) [224/594] AutomationApiTest.QuerySelector (13115 ms) [225/594] CommandServiceTest.GetExtensionActionCommandQueryAll (8130 ms) [226/594] CommandServiceTest.GetNamedCommandsQueryActive (7105 ms) [227/594] ExtensionContextMenuApiTest.ShowExtensionNamedTopLevelItemIfAllChildrenAreHidden (6821 ms) [228/594] DeclarativeContentApiTest.RulesEvaluatedOnAddRemove (8929 ms) [229/594] DownloadExtensionTest.DownloadExtensionTest_SearchFilenameRegex (7356 ms) [230/594] DeveloperPrivateApiTest.Basics (9449 ms) [231/594] DeclarativeContentApiTest.DisabledForSplitIncognito (11283 ms) [232/594] DownloadExtensionTest.DownloadExtensionTest_SearchOrderBy (6561 ms) [233/594] ExtensionBrowserTest.ChromeExtensionSchemeNotAllowJavascript (7346 ms) [234/594] DownloadExtensionTest.DownloadExtensionTest_OnDeterminingFilename_Twice (8132 ms) [235/594] ExtensionBrowserTest.PromptToReEnableExtensionsOnNavigation (11029 ms) [236/594] PageActionApiTest.Basic (8945 ms) [237/594] FileSystemApiTest.FileSystemApiRetainEntry (11033 ms) [238/594] FileSystemApiTestForDrive.FileSystemApiOpenDirectoryWithOnlyWritePermissionTest (14958 ms) [239/594] IdentityGetAccountsFunctionTest.TwoAccountsSignedIn (9191 ms) [240/594] GetAuthTokenFunctionTest.InteractiveCacheHit (9190 ms) [241/594] FileSystemApiTestForDrive.FileSystemApiSaveExistingFileTest (15232 ms) [242/594] GetAuthTokenFunctionTest.ScopesEmailFooBar (7620 ms) [243/594] ExtensionManagementApiBrowserTest.InstallEvent (7617 ms) [244/594] ExtensionManagementTest.InstallRequiresConfirm (7623 ms) [245/594] ExtensionManagementTest.ExternalPolicyRefresh (8663 ms) [246/594] ExtensionModuleApiTest.IncognitoNoFile (7873 ms) [247/594] PasswordsPrivateApiTest.RequestPlaintextPassword (7349 ms) [248/594] PasswordsPrivateApiTest.ImportPasswords (6830 ms) [249/594] WebNavigationApiTest.CrossProcess (10766 ms) [250/594] ExtensionWebRequestApiTest.WebRequestExtraHeaders (15229 ms) [251/594] ExtensionWebRequestApiTest.WebRequestTypes (19410 ms) [252/594] ExtensionWebRequestApiTest.WithheldHostPermissionsForCrossOriginWithoutInitiator (7363 ms) [253/594] ExtensionWebRequestApiTest.WebRequestDeclarative2 (15214 ms) [254/594] WebrtcLoggingPrivateApiTest.TestStartStopAudioDebugRecordings (6048 ms) [255/594] ExtensionWebRequestApiTest.WebRequestRedirectsWithExtraHeaders (26499 ms) [256/594] ExtensionWebstorePrivateApiTest.InstallAccepted (9719 ms) [257/594] AppBackgroundPageApiTest.OpenTwoPagesWithManifest (8924 ms) [258/594] AppApiTest.AppProcessInstances (11550 ms) [259/594] ChromeAppAPITest.InstallAndRunningStateFrame (8140 ms) [260/594] ContentCapabilitiesTest.ClipboardRead (9189 ms) [261/594] ContentScriptApiTest.ContentScriptIsolatedWorlds (8929 ms) [262/594] ContentScriptApiTest.ContentScriptBlockingScriptsDontRunTwice (7108 ms) [263/594] ContentScriptApiTest.CrossOriginXhr (7617 ms) [264/594] ContentScriptCssInjectionTest.ContentScriptInjectsStyles (8147 ms) [265/594] ContentVerifierTest.DotSlashPaths (8922 ms) [266/594] ContentVerifierTest.ContentScripts (7618 ms) [267/594] ExtensionCrxInstallerTest.PackAndInstallExtensionFromDownload (8135 ms) [268/594] ExtensionCrxInstallerTest.Blacklist (7091 ms) [269/594] ExtensionCrxInstallerTest.InstallUnpackedCrx_Success (6565 ms) [270/594] ClipboardApiTest.Extension (8667 ms) [271/594] ExtensionFunctionRegistrationTest.CheckForDuplicateEntries (6834 ms) [272/594] ExtensionResourceRequestPolicyTest.ExtensionCanLoadHostedAppIcons (7612 ms) [273/594] ExtensionApiCaptureTest.CaptureNullWindow (9459 ms) [274/594] ExtensionURLLoaderThrottleBrowserTest.DoNotThrottleCachedResponse (8394 ms) [275/594] ExtensionURLRewriteBrowserTest.NewTabPageURLOverride (14173 ms) [276/594] IsolatedAppTest.CrossProcessClientRedirect (12600 ms) [277/594] LazyBackgroundPageApiTest.BroadcastEvent (9975 ms) [278/594] ProcessManagerBrowserTest.NestedURLNavigationsToExtensionBlockedInSubframe (9719 ms) [279/594] ProcessManagerBrowserTest.WebPopupFromExtensionSubframeHasValidOpener (8659 ms) [280/594] UserScriptListenerTest.NavigationWaitsForContentScriptsToLoad (7350 ms) [281/594] WakeEventPageTest.ClosedEventPage (8400 ms) [282/594] WakeEventPageTest.OpenEventPage (7888 ms) [283/594] DefaultSettingsFetcherTest.FetchingSettingsSucceeded (6562 ms) [284/594] PaymentManifestParserTest.TooManyWebAppUrls (6556 ms) [285/594] ClipboardExtensionApiTest.SetImageData (7871 ms) [286/594] ServiceWorkerPaymentAppFactoryBrowserTest.TwoAppsSameMethod (7875 ms) [287/594] ServiceWorkerPaymentAppFactoryBrowserTest.TwoAppsDifferentMethods (8409 ms) [288/594] GlobalErrorServiceBrowserTest.BubbleViewDismissedOnRemove (6821 ms) [289/594] SitePerProcessPaymentsBrowserTest.IframePaymentRequestDoesNotCrash (7609 ms) [290/594] SaveCardBubbleViewsFullFormBrowserTest.Local_ManageCardsButtonRedirects (8672 ms) [291/594] SaveCardBubbleViewsFullFormBrowserTest.Local_SynchronousCloseAfterAsynchronousClose (7609 ms) [292/594] SaveCardBubbleViewsFullFormBrowserTest.Upload_ShouldNotHaveNoThanksButton (9186 ms) [293/594] ExtensionInstallDialogViewTest.InstallButtonDelay (5793 ms) [294/594] SaveCardBubbleViewsFullFormBrowserTest.Upload_DecliningUploadDoesNotLogUserAcceptedCardOriginUMA (13645 ms) [295/594] ExtensionMessageBubbleViewBrowserTest.ExtensionBubbleAnchoredToExtensionAction (5777 ms) [296/594] SaveCardBubbleViewsFullFormBrowserTest.Upload_SubmittingFormWithExpirationDateMonthAndCurrentYear (13657 ms) [297/594] ExtensionMessageBubbleViewBrowserTest.TestDevModeBubbleIsntShownTwice (6559 ms) [298/594] ImportLockDialogViewBrowserTest.InvokeUi_default (6033 ms) [299/594] ContentSettingBubbleDialogTest.InvokeUi_midi_sysex (6032 ms) [300/594] ZoomBubbleBrowserTest.NonImmersiveFullscreen (6828 ms) [301/594] OmniboxPopupContentsViewTest.PopupMatchesLocationBarBackground (6568 ms) [302/594] PageInfoBubbleViewBrowserTest.InvokeUi_BlockAllPermissions (7877 ms) [303/594] PageInfoBubbleViewBrowserTest.ClosesOnUserNavigateToDifferentPage (7345 ms) [0212/011528.173932:ERROR:kill_posix.cc(84)] Unable to terminate process group 21701: No such process (3) [ RUN ] PaymentRequestCvcUnmaskViewControllerTest.CvcSentToResponse [1:1:0212/011524.414848:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [21701:21701:0212/011524.732889:WARNING:chrome_browser_main_chromeos.cc(557)] Running as stub user with profile dir: test-user [21701:21701:0212/011525.479104:INFO:remote_commands_service.cc(38)] Fetching remote commands. [21701:21701:0212/011525.479337:WARNING:remote_commands_service.cc(40)] Client is not registered. [21701:21701:0212/011525.479523:INFO:remote_commands_invalidator.cc(32)] Initialize RemoteCommandsInvalidator. [21701:21701:0212/011525.480218:INFO:remote_commands_invalidator.cc(57)] Starting RemoteCommandsInvalidator. [21701:21701:0212/011525.480345:INFO:remote_commands_invalidator.cc(123)] RemoteCommandsInvalidator ReloadPolicyData. [21701:21701:0212/011525.480451:INFO:remote_commands_invalidator.cc(167)] Unregister RemoteCommandsInvalidator. [21701:21701:0212/011525.731313:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [21701:21701:0212/011526.865573:FATAL:shelf_widget.cc(293)] Check failed: login_shelf_view_->visible(). #0 0x7fd015d8a901 base::debug::CollectStackTrace() #1 0x7fd015bf2c1d base::debug::StackTrace::StackTrace() #2 0x7fd015bf2bd5 base::debug::StackTrace::StackTrace() #3 0x7fd015c2d827 logging::LogMessage::~LogMessage() #4 0x7fd000e5df47 ash::ShelfWidget::GetHitTestRects() #5 0x7fd000e5ff11 ash::ShelfWindowTargeter::GetHitTestRects() #6 0x7fd008a103ae aura::WindowTargeter::EventLocationInsideBounds() #7 0x7fcfff8dd7d0 wm::EasyResizeWindowTargeter::EventLocationInsideBounds() #8 0x7fd008a0ee04 aura::WindowTargeter::SubtreeShouldBeExploredForEvent() #9 0x7fd008a10046 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #10 0x7fd008a0fef3 aura::WindowTargeter::FindTargetForLocatedEvent() #11 0x7fd000e1622b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #12 0x7fd008a0fc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #13 0x7fd008a0faa1 aura::WindowTargeter::FindTargetForEvent() #14 0x7fd008a10096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #15 0x7fd008a0fef3 aura::WindowTargeter::FindTargetForLocatedEvent() #16 0x7fd000e1622b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #17 0x7fd008a0fc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #18 0x7fd008a0faa1 aura::WindowTargeter::FindTargetForEvent() #19 0x7fd008a10096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #20 0x7fd008a0fef3 aura::WindowTargeter::FindTargetForLocatedEvent() #21 0x7fd000e1622b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #22 0x7fd008a0fc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #23 0x7fd008a0faa1 aura::WindowTargeter::FindTargetForEvent() #24 0x7fd00ac35c0c ui::EventProcessor::OnEventFromSource() #25 0x7fd00ac35fac ui::EventProcessor::OnEventFromSource() #26 0x7fcfff44aa1f ws::EventQueue::DeliverOrQueueEvent() #27 0x7fd000d8a2b8 ash::AshWindowTreeHostPlatform::DeliverEventToSink() #28 0x7fd000d8a35c ash::AshWindowTreeHostPlatform::DeliverEventToSink() #29 0x7fd00ac369f8 ui::EventSource::SendEventToSinkFromRewriter() #30 0x7fd00ac36591 ui::EventSource::SendEventToSink() #31 0x7fd008a1601d aura::WindowTreeHostPlatform::DispatchEvent() #32 0x7fd000d8a191 ash::AshWindowTreeHostPlatform::DispatchEvent() #33 0x7fd000263f55 base::internal::FunctorTraits<>::Invoke<>() #34 0x7fd000263eb6 base::internal::InvokeHelper<>::MakeItSo<>() #35 0x7fd000263e47 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui22PlatformWindowDelegateEFvPNS3_5EventEEJNS0_17UnretainedWrapperIS4_EEEEEFvS6_EE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOS6_ #36 0x7fd000263de9 base::internal::Invoker<>::RunOnce() #37 0x7fd00ac42db3 _ZNO4base12OnceCallbackIFvPN2ui5EventEEE3RunES3_ #38 0x7fd00ac42be4 ui::DispatchEventFromNativeUiEvent() #39 0x7fd0002da4bc ui::X11WindowOzone::DispatchEvent() #40 0x7fd010d0e887 ui::PlatformEventSource::DispatchEvent() #41 0x7fcfe950c4a9 ui::X11EventSourceLibevent::DispatchPlatformEvent() #42 0x7fcfe950c053 ui::X11EventSourceLibevent::ProcessXEvent() #43 0x7fcfe94fe8a5 ui::X11EventSource::ExtractCookieDataDispatchEvent() #44 0x7fcfe94fe82e ui::X11EventSource::DispatchXEvents() #45 0x7fcfe950c70f ui::X11EventSourceLibevent::OnFileCanReadWithoutBlocking() #46 0x7fd015dbdcae base::MessagePumpLibevent::FdWatchController::OnFileCanReadWithoutBlocking() #47 0x7fd015dbedcd base::MessagePumpLibevent::OnLibeventNotification() #48 0x7fd015e071fe event_process_active #49 0x7fd015e06847 event_base_loop #50 0x7fd015dbeea4 base::MessagePumpLibevent::Run() #51 0x7fd015cef02c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #52 0x7fd015c939d7 base::RunLoop::Run() #53 0x55c477be3c8e content::RunThisRunLoop() #54 0x55c477be3e33 content::RunAllPendingInMessageLoop() #55 0x55c477243111 InProcessBrowserTest::PreRunTestOnMainThread() #56 0x55c477b96cde content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #57 0x55c472d7b69d base::internal::FunctorTraits<>::Invoke<>() #58 0x55c472d7b5e1 base::internal::InvokeHelper<>::MakeItSo<>() #59 0x55c472d7b587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #60 0x55c472f4783c base::internal::Invoker<>::Run() #61 0x55c472d6ef8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #62 0x55c4772e3d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #63 0x55c4772e2b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #64 0x55c474ac54dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #65 0x7fd00e408807 content::BrowserMainLoop::PreMainMessageLoopRun() #66 0x7fd00d7e461d base::internal::FunctorTraits<>::Invoke<>() #67 0x7fd00d7e4591 base::internal::InvokeHelper<>::MakeItSo<>() #68 0x7fd00d7e4537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #69 0x7fd00e1b011c base::internal::Invoker<>::Run() #70 0x7fd00d758d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #71 0x7fd00ec1bacc content::StartupTaskRunner::RunAllTasksNow() #72 0x7fd00e406fc1 content::BrowserMainLoop::CreateStartupTasks() #73 0x7fd00e40dece content::BrowserMainRunnerImpl::Initialize() #74 0x7fd00e404361 content::BrowserMain() #75 0x7fd00f76bd2b content::RunBrowserProcessMain() #76 0x7fd00f76cfe6 content::ContentMainRunnerImpl::RunServiceManager() #77 0x7fd00f76caa0 content::ContentMainRunnerImpl::Run() #78 0x7fd00f76a589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #79 0x7fcfed02d703 service_manager::Main() #80 0x7fd00f76b835 content::ContentMain() #81 0x55c477b96a19 content::BrowserTestBase::SetUp() #82 0x55c477241f4e InProcessBrowserTest::SetUp() #83 0x55c47502063e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #84 0x55c47501c302 testing::internal::HandleExceptionsInMethodIfSupported<>() #85 0x55c47500fb94 testing::Test::Run() #86 0x55c475010282 testing::TestInfo::Run() #87 0x55c475010793 testing::TestSuite::Run() #88 0x55c475018274 testing::internal::UnitTestImpl::RunAllTests() #89 0x55c4750206ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #90 0x55c47501d152 testing::internal::HandleExceptionsInMethodIfSupported<>() #91 0x55c475017f97 testing::UnitTest::Run() #92 0x55c477261d01 RUN_ALL_TESTS() #93 0x55c477260562 base::TestSuite::Run() #94 0x55c4771c4b57 ChromeTestSuiteRunner::RunTestSuite() #95 0x55c4771c4c43 ChromeTestLauncherDelegate::RunTestSuite() #96 0x55c477bdc005 content::LaunchTests() #97 0x55c4771c4f87 LaunchChromeTests() #98 0x55c4771c49ab main #99 0x7fcfee4f2f45 __libc_start_main #100 0x55c472d1d02a _start [304/594] PaymentRequestCvcUnmaskViewControllerTest.CvcSentToResponse (CRASHED) [305/594] PaymentMethodViewControllerTest.OneCardSelected (7088 ms) [306/594] PaymentRequestPaymentMethodIdentifierTest.BasicCard_NetworkThenBasicCardWithSameNetwork (7346 ms) [307/594] PaymentRequestCanMakePaymentQueryPMITest.QueryQuotaForPaymentApps (7351 ms) [308/594] PaymentRequestDebitTest.CanMakePaymentWithDebitCard (7085 ms) [309/594] PaymentRequestJourneyLoggerMultipleShowTest.StartNewRequestWithoutPaymentAppsFeature (7871 ms) [310/594] PaymentRequestContactAddressUseStatsTest.RecordUse (8132 ms) [311/594] PaymentRequestShippingAddressEditorTest.NoCountryValidState_SyncRegionLoad (8134 ms) [312/594] TranslateBubbleViewBrowserTest.CloseBrowserWithoutTranslating (7098 ms) [313/594] ArcKioskAppManagerTest.Basic (6825 ms) [314/594] KioskAppManagerTest.AppWithRequiredPlatformVersion (7345 ms) [315/594] SelectToSpeakTest.SelectToSpeakTrayNotSpoken (8922 ms) [316/594] KioskAppManagerTest.DownloadNewApp (6842 ms) [317/594] ArcAuthServiceAccountManagerTest.AccountUpsertsAreNotPropagatedForInvalidTokens (6819 ms) [318/594] ArcRobotAccountAuthServiceTest.GetDemoAccountOnAuthTokenFetchFailureViaDeprecatedApi (6828 ms) [319/594] ArcRobotAuthCodeFetcherBrowserTest.RequestAccountInfoError (6828 ms) [320/594] ArcUserSessionServiceTest.FiresIntentOnSessionActiveTest (6827 ms) [321/594] CustomizationLocaleTest.CheckAvailableLocales (7384 ms) [322/594] AccessibilityManagerLoginTest.BrailleOnLoginScreen (28349 ms) [323/594] FileManagerPrivateApiTest.Recent (7608 ms) [324/594] AutotestPrivateApiTest.AutotestPrivate (10766 ms) [325/594] FileSystemProviderApiTest.CopyEntry (8670 ms) [326/594] LocalFileSystemExtensionApiTest.AppFileHandler (7627 ms) [327/594] FileManagerJsTest.FileTasks (9971 ms) [328/594] MultiProfileFilesAppBrowserTest.PRE_BasicDrive (12853 ms) [329/594] LocalFileSystemExtensionApiTest.FileBrowserHandlersLazy (24670 ms) [330/594] GalleryBrowserTest.TraverseSlideImagesOnDownloads (20465 ms) [331/594] GalleryBrowserTest.CropImageOnDrive (20732 ms) [332/594] FileManagerUITest.CrostiniShare (31784 ms) [333/594] GalleryBrowserTest.ExposureImageOnDownloads (21794 ms) [334/594] ImageLoaderJsTest.CacheTest (10511 ms) [335/594] GalleryBrowserTest.RenameImageInThumbnailModeOnDownloads (21271 ms) [336/594] GalleryBrowserTest.DeleteAllImagesInThumbnailModeOnDrive (18907 ms) [337/594] GalleryBrowserTest.OneImageSlideshowNoPauseButtonOnDownloads (19734 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=DemoAppLauncherTest.NoNetwork --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/results97M9a8/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dqCIsDj ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=DemoSetupTest.ShowOfflineSetupOptionOnNetworkList --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/results9ivLgL/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dHFoWIW ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=EnableDebuggingNonDevTest.NoShowInNonDevMode --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsBjQCmo/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dswSFOz ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ActiveDirectoryJoinTest.TestActiveDirectoryEnrollment_DistinguishedName --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsCO1Js1/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dmThFUc [338/594] DemoAppLauncherTest.NoNetwork (23354 ms) [339/594] ExistingUserControllerUntrustedTest.GuestLoginForbidden (4464 ms) [340/594] EnableDebuggingNonDevTest.NoShowInNonDevMode (30692 ms) [341/594] DemoSetupTest.ShowOfflineSetupOptionOnNetworkList (31217 ms) [342/594] ActiveDirectoryJoinTest.TestActiveDirectoryEnrollment_DistinguishedName (29912 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=KioskTest.KioskEnableCancel --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsSn2MFh/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dYl8q7s ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=SamlTest.HTTPRedirectDisallowed --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsYjqIMU/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dOzkee6 ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=BrowserLoginTest.PRE_BrowserActive --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsu9GTTx/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dhnRhlJ ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=OAuth2Test.TerminateOnBadMergeSessionAfterOnlineAuth --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/results0Pvk1a/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dAyYAsm [343/594] KioskTest.KioskEnableCancel (29909 ms) [344/594] BrowserLoginTest.PRE_BrowserActive (27018 ms) [345/594] SamlTest.HTTPRedirectDisallowed (32261 ms) [346/594] OAuth2Test.TerminateOnBadMergeSessionAfterOnlineAuth (35939 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=SimpleWebViewDialogTest.Interstitial --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsQeS18N/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dL9S9zZ ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=UserAddingScreenTest.PRE_ScreenVisibility --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultskBYZgr/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/djCEZHC ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=UserImageManagerTest.PRE_SaveUserImage --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsKqpep4/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dls05Pf ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=WebviewClientCertsLoginTest.SigninFrameIntermediateAuthorityUnknown --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsjS2JxH/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dJLRsYS [347/594] SimpleWebViewDialogTest.Interstitial (28872 ms) [348/594] UserAddingScreenTest.PRE_ScreenVisibility (28069 ms) [349/594] UserImageManagerTest.PRE_SaveUserImage (26493 ms) [350/594] WizardControllerKioskFlowTest.ControlFlowKioskForcedEnrollment (5247 ms) [351/594] ConsumerDeviceStatusCollectorTimeLimitDisabledTest.NotReportingVolumeInfo (1841 ms) [352/594] DownloadNotificationTest.CancelDownload (7345 ms) [353/594] WebviewClientCertsLoginTest.SigninFrameIntermediateAuthorityUnknown (30957 ms) [354/594] DriveNotificationManagerFactoryGuestBrowserTest.NoDriveNotificationManager (6822 ms) [355/594] WizardControllerDemoSetupTest.NetworkBackPressed (21776 ms) [356/594] NetworkingPrivateApiTest.ForgetNetwork (6833 ms) [357/594] NetworkingPrivateApiTestFail.GetVisibleNetworks (7616 ms) [358/594] NetworkingPrivateChromeOSApiTest.GetNetworks (7344 ms) [359/594] NetworkingPrivateChromeOSApiTest.OnCertificateListsChangedEvent (7610 ms) [360/594] VpnProviderApiTest.CreateConfigWithoutNetworkProfile (7623 ms) [0212/011906.647980:ERROR:kill_posix.cc(84)] Unable to terminate process group 28408: No such process (3) [ RUN ] VpnProviderApiTest.ConfigPersistence [1:1:0212/011902.365217:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [28408:28408:0212/011903.215917:WARNING:user_policy_manager_factory_chromeos.cc(210)] No policy loaded for known non-enterprise user [28408:28408:0212/011903.329243:WARNING:merge_session_throttling_utils.cc(143)] Loading content for a profile without session restore? [28408:28408:0212/011903.571302:WARNING:merge_session_throttling_utils.cc(143)] Loading content for a profile without session restore? [28408:28408:0212/011903.719233:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [28408:28408:0212/011904.195760:ERROR:network_profile_handler.cc(83)] Manager properties returned from Shill don't contain the field Profiles [28408:28408:0212/011904.196492:ERROR:network_sms_handler.cc(436)] NetworkSmsHandler: No list value for: Devices [28408:28408:0212/011905.186284:FATAL:shelf_widget.cc(293)] Check failed: login_shelf_view_->visible(). #0 0x7f473227c901 base::debug::CollectStackTrace() #1 0x7f47320e4c1d base::debug::StackTrace::StackTrace() #2 0x7f47320e4bd5 base::debug::StackTrace::StackTrace() #3 0x7f473211f827 logging::LogMessage::~LogMessage() #4 0x7f471d34ff47 ash::ShelfWidget::GetHitTestRects() #5 0x7f471d351f11 ash::ShelfWindowTargeter::GetHitTestRects() #6 0x7f4724f023ae aura::WindowTargeter::EventLocationInsideBounds() #7 0x7f471bdcf7d0 wm::EasyResizeWindowTargeter::EventLocationInsideBounds() #8 0x7f4724f00e04 aura::WindowTargeter::SubtreeShouldBeExploredForEvent() #9 0x7f4724f02046 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #10 0x7f4724f01ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #11 0x7f471d30822b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #12 0x7f4724f01c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #13 0x7f4724f01aa1 aura::WindowTargeter::FindTargetForEvent() #14 0x7f4724f02096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #15 0x7f4724f01ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #16 0x7f471d30822b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #17 0x7f4724f01c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #18 0x7f4724f01aa1 aura::WindowTargeter::FindTargetForEvent() #19 0x7f4724f02096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #20 0x7f4724f01ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #21 0x7f471d30822b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #22 0x7f4724f01c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #23 0x7f4724f01aa1 aura::WindowTargeter::FindTargetForEvent() #24 0x7f4727127c0c ui::EventProcessor::OnEventFromSource() #25 0x7f4727127fac ui::EventProcessor::OnEventFromSource() #26 0x7f471b93ca1f ws::EventQueue::DeliverOrQueueEvent() #27 0x7f471d27c2b8 ash::AshWindowTreeHostPlatform::DeliverEventToSink() #28 0x7f471d27c35c ash::AshWindowTreeHostPlatform::DeliverEventToSink() #29 0x7f47271289f8 ui::EventSource::SendEventToSinkFromRewriter() #30 0x7f4727128591 ui::EventSource::SendEventToSink() #31 0x7f4724f0801d aura::WindowTreeHostPlatform::DispatchEvent() #32 0x7f471d27c191 ash::AshWindowTreeHostPlatform::DispatchEvent() #33 0x7f471c755f55 base::internal::FunctorTraits<>::Invoke<>() #34 0x7f471c755eb6 base::internal::InvokeHelper<>::MakeItSo<>() #35 0x7f471c755e47 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui22PlatformWindowDelegateEFvPNS3_5EventEEJNS0_17UnretainedWrapperIS4_EEEEEFvS6_EE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOS6_ #36 0x7f471c755de9 base::internal::Invoker<>::RunOnce() #37 0x7f4727134db3 _ZNO4base12OnceCallbackIFvPN2ui5EventEEE3RunES3_ #38 0x7f4727134be4 ui::DispatchEventFromNativeUiEvent() #39 0x7f471c7cc4bc ui::X11WindowOzone::DispatchEvent() #40 0x7f472d200887 ui::PlatformEventSource::DispatchEvent() #41 0x7f47059fe4a9 ui::X11EventSourceLibevent::DispatchPlatformEvent() #42 0x7f47059fe053 ui::X11EventSourceLibevent::ProcessXEvent() #43 0x7f47059f08a5 ui::X11EventSource::ExtractCookieDataDispatchEvent() #44 0x7f47059f082e ui::X11EventSource::DispatchXEvents() #45 0x7f47059fe70f ui::X11EventSourceLibevent::OnFileCanReadWithoutBlocking() #46 0x7f47322afcae base::MessagePumpLibevent::FdWatchController::OnFileCanReadWithoutBlocking() #47 0x7f47322b0dcd base::MessagePumpLibevent::OnLibeventNotification() #48 0x7f47322f91fe event_process_active #49 0x7f47322f8847 event_base_loop #50 0x7f47322b0ea4 base::MessagePumpLibevent::Run() #51 0x7f47321e102c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #52 0x7f47321859d7 base::RunLoop::Run() #53 0x56447ef5dc8e content::RunThisRunLoop() #54 0x56447ef5de33 content::RunAllPendingInMessageLoop() #55 0x56447e5bd111 InProcessBrowserTest::PreRunTestOnMainThread() #56 0x56447ef10cde content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #57 0x56447a0f569d base::internal::FunctorTraits<>::Invoke<>() #58 0x56447a0f55e1 base::internal::InvokeHelper<>::MakeItSo<>() #59 0x56447a0f5587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #60 0x56447a2c183c base::internal::Invoker<>::Run() #61 0x56447a0e8f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #62 0x56447e65dd9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #63 0x56447e65cb52 ChromeBrowserMainParts::PreMainMessageLoopRun() #64 0x56447be3f4dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #65 0x7f472a8fa807 content::BrowserMainLoop::PreMainMessageLoopRun() #66 0x7f4729cd661d base::internal::FunctorTraits<>::Invoke<>() #67 0x7f4729cd6591 base::internal::InvokeHelper<>::MakeItSo<>() #68 0x7f4729cd6537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #69 0x7f472a6a211c base::internal::Invoker<>::Run() #70 0x7f4729c4ad5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #71 0x7f472b10dacc content::StartupTaskRunner::RunAllTasksNow() #72 0x7f472a8f8fc1 content::BrowserMainLoop::CreateStartupTasks() #73 0x7f472a8ffece content::BrowserMainRunnerImpl::Initialize() #74 0x7f472a8f6361 content::BrowserMain() #75 0x7f472bc5dd2b content::RunBrowserProcessMain() #76 0x7f472bc5efe6 content::ContentMainRunnerImpl::RunServiceManager() #77 0x7f472bc5eaa0 content::ContentMainRunnerImpl::Run() #78 0x7f472bc5c589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #79 0x7f470951f703 service_manager::Main() #80 0x7f472bc5d835 content::ContentMain() #81 0x56447ef10a19 content::BrowserTestBase::SetUp() #82 0x56447e5bbf4e InProcessBrowserTest::SetUp() #83 0x56447e552dfb extensions::ExtensionBrowserTest::SetUp() #84 0x56447c39a63e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #85 0x56447c396302 testing::internal::HandleExceptionsInMethodIfSupported<>() #86 0x56447c389b94 testing::Test::Run() #87 0x56447c38a282 testing::TestInfo::Run() #88 0x56447c38a793 testing::TestSuite::Run() #89 0x56447c392274 testing::internal::UnitTestImpl::RunAllTests() #90 0x56447c39a6ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #91 0x56447c397152 testing::internal::HandleExceptionsInMethodIfSupported<>() #92 0x56447c391f97 testing::UnitTest::Run() #93 0x56447e5dbd01 RUN_ALL_TESTS() #94 0x56447e5da562 base::TestSuite::Run() #95 0x56447e53eb57 ChromeTestSuiteRunner::RunTestSuite() #96 0x56447e53ec43 ChromeTestLauncherDelegate::RunTestSuite() #97 0x56447ef56005 content::LaunchTests() #98 0x56447e53ef87 LaunchChromeTests() #99 0x56447e53e9ab main #100 0x7f470a9e4f45 __libc_start_main #101 0x56447a09702a _start [361/594] VpnProviderApiTest.ConfigPersistence (CRASHED) [362/594] KeyboardEndToEndFocusTest.TriggerAsyncInputFocusFromUserGestureAfterBlurShowsKeyboard (10495 ms) [363/594] ArcAppDeferredLauncherBrowserTest.StartAppDeferredFromShelfButton (7883 ms) [364/594] ForceMaximizePolicyFalseTest.GeneralFirstRun (37512 ms) [365/594] LauncherPlatformAppBrowserTest.PinRunning (8144 ms) [366/594] ShelfAppBrowserTest.LaunchUnpinned (7628 ms) [367/594] TabScrubberTest.Single (7614 ms) [368/594] TabletModePageBehaviorTest.ExcludeNTPs (8403 ms) [369/594] ChromeNativeAppWindowViewsAuraAshBrowserTest.NoImmersiveOrBubbleOutsidePublicSessionDom (7883 ms) [370/594] CrostiniInstallerViewBrowserTest.InstallFlow (7632 ms) [371/594] CrostiniInstallerViewBrowserTest.ErrorThenCancel (6826 ms) [372/594] CrostiniUninstalledUninstallerViewBrowserTest.OfflineUninstallFlowWithoutTermina (6826 ms) [373/594] TopControlsSlideControllerTest.TestScrollingMaximizedPageBeforeGoingToTabletMode (7873 ms) [374/594] PluginVmLauncherViewBrowserTest.RetryAfterSetupError (6565 ms) [375/594] SBNavigationObserverBrowserTest.SingleMetaRefreshRedirectTargetBlank (7874 ms) [376/594] SBNavigationObserverBrowserTest.MultiMetaRefreshRedirects (8144 ms) [377/594] SBNavigationObserverBrowserTest.NewTabDownload (7618 ms) [378/594] SBNavigationObserverBrowserTest.TwoServerRedirects (7625 ms) [379/594] SBNavigationObserverBrowserTest.VerifySanitizeReferrerChain (6566 ms) [380/594] SBNavigationObserverBrowserTest.VerifyNumberOfRecentNavigationsToCollect (6301 ms) [381/594] InterventionsInternalsUITest.LogNewMessageExistedPageId (8670 ms) [382/594] SystemWebDialogLoginTest.PRE_NonModalTest (28612 ms) [383/594] AppManagementMetadataViewTest.All (12352 ms) [384/594] SyncInternalsWebUITest.SearchTabDoesntChangeOnItemSelect (9445 ms) [385/594] InvalidationsWebUITest.testRegisteringNewInvalidation (7886 ms) [386/594] WebUIAssertionsTest.testConstructedMessage (7613 ms) [387/594] WebUIBrowserAsyncGenDeferredTest.TestDeferRunTest (7607 ms) [388/594] BookmarksStoreTest.All (12594 ms) [389/594] NetInternalsTest.netInternalsDomainSecurityPolicyViewAddError (8944 ms) [390/594] CrSettingsRouteTest.All (10500 ms) [391/594] CrSettingsMultideviceFeatureItemTest.All (10773 ms) [392/594] CrSettingsExtensionControlledIndicatorTest.All (9707 ms) [393/594] SysInternalsBrowserTest.LineChart_SubChart (7883 ms) [394/594] WebUIAccessibilityAuditBrowserTest_TestsDisabledInFixture.testRunningAuditManually_noErrors (7346 ms) [395/594] CrExtensionsItemsTest.RemoveButton (9188 ms) [396/594] CrExtensionsActivityLogItemTest.All (9185 ms) [397/594] CrSettingsSiteDetailsTest.All (31233 ms) [398/594] CrExtensionsLoadErrorTest.RetryError (14175 ms) [399/594] CrExtensionsManagerUnitTest.UpdateItemData (14440 ms) [400/594] CrExtensionsShortcutInputTest.Basic (9984 ms) [401/594] CrExtensionsManagerTestWithActivityLogFlag.UrlNavigationToActivityLogSuccess (16276 ms) [402/594] CrExtensionsKioskModeTest.AddError (10768 ms) [403/594] PrintPreviewModelTest.GetPrintTicket (9451 ms) [404/594] CrExtensionsErrorConsoleTest.TestUpDownErrors (16805 ms) [405/594] PrintPreviewSettingsSectionsTest.SetLayout (16000 ms) [406/594] PrintPreviewDestinationItemTest.QueryName (9715 ms) [407/594] PrintPreviewDestinationDialogTest.ShowProvisionalDialog (12337 ms) [408/594] PrintPreviewDestinationSelectTest.MultipleRecentDestinations (15488 ms) [409/594] PrintPreviewDestinationListTest.FilterDestinations (10258 ms) [410/594] AppWindowApiTest.OnMaximizedEvent (8138 ms) [0212/012116.660969:ERROR:kill_posix.cc(84)] Unable to terminate process group 32749: No such process (3) [ RUN ] MimeHandlerViewTest.PostMessage [1:1:0212/012112.338360:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [32749:32749:0212/012113.206795:WARNING:user_policy_manager_factory_chromeos.cc(210)] No policy loaded for known non-enterprise user [32749:32749:0212/012113.337451:WARNING:merge_session_throttling_utils.cc(143)] Loading content for a profile without session restore? [32749:32749:0212/012113.669159:WARNING:merge_session_throttling_utils.cc(143)] Loading content for a profile without session restore? [32749:32749:0212/012113.865419:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [32749:32749:0212/012115.326905:FATAL:shelf_widget.cc(293)] Check failed: login_shelf_view_->visible(). #0 0x7fbac44a5901 base::debug::CollectStackTrace() #1 0x7fbac430dc1d base::debug::StackTrace::StackTrace() #2 0x7fbac430dbd5 base::debug::StackTrace::StackTrace() #3 0x7fbac4348827 logging::LogMessage::~LogMessage() #4 0x7fbaaf578f47 ash::ShelfWidget::GetHitTestRects() #5 0x7fbaaf57af11 ash::ShelfWindowTargeter::GetHitTestRects() #6 0x7fbab712b3ae aura::WindowTargeter::EventLocationInsideBounds() #7 0x7fbaadff87d0 wm::EasyResizeWindowTargeter::EventLocationInsideBounds() #8 0x7fbab7129e04 aura::WindowTargeter::SubtreeShouldBeExploredForEvent() #9 0x7fbab712b046 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #10 0x7fbab712aef3 aura::WindowTargeter::FindTargetForLocatedEvent() #11 0x7fbaaf53122b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #12 0x7fbab712ac8a aura::WindowTargeter::FindTargetForNonKeyEvent() #13 0x7fbab712aaa1 aura::WindowTargeter::FindTargetForEvent() #14 0x7fbab712b096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #15 0x7fbab712aef3 aura::WindowTargeter::FindTargetForLocatedEvent() #16 0x7fbaaf53122b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #17 0x7fbab712ac8a aura::WindowTargeter::FindTargetForNonKeyEvent() #18 0x7fbab712aaa1 aura::WindowTargeter::FindTargetForEvent() #19 0x7fbab712b096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #20 0x7fbab712aef3 aura::WindowTargeter::FindTargetForLocatedEvent() #21 0x7fbaaf53122b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #22 0x7fbab712ac8a aura::WindowTargeter::FindTargetForNonKeyEvent() #23 0x7fbab712aaa1 aura::WindowTargeter::FindTargetForEvent() #24 0x7fbab9350c0c ui::EventProcessor::OnEventFromSource() #25 0x7fbab9350fac ui::EventProcessor::OnEventFromSource() #26 0x7fbaadb65a1f ws::EventQueue::DeliverOrQueueEvent() #27 0x7fbaaf4a52b8 ash::AshWindowTreeHostPlatform::DeliverEventToSink() #28 0x7fbaaf4a535c ash::AshWindowTreeHostPlatform::DeliverEventToSink() #29 0x7fbab93519f8 ui::EventSource::SendEventToSinkFromRewriter() #30 0x7fbab9351591 ui::EventSource::SendEventToSink() #31 0x7fbab713101d aura::WindowTreeHostPlatform::DispatchEvent() #32 0x7fbaaf4a5191 ash::AshWindowTreeHostPlatform::DispatchEvent() #33 0x7fbaae97ef55 base::internal::FunctorTraits<>::Invoke<>() #34 0x7fbaae97eeb6 base::internal::InvokeHelper<>::MakeItSo<>() #35 0x7fbaae97ee47 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui22PlatformWindowDelegateEFvPNS3_5EventEEJNS0_17UnretainedWrapperIS4_EEEEEFvS6_EE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOS6_ #36 0x7fbaae97ede9 base::internal::Invoker<>::RunOnce() #37 0x7fbab935ddb3 _ZNO4base12OnceCallbackIFvPN2ui5EventEEE3RunES3_ #38 0x7fbab935dbe4 ui::DispatchEventFromNativeUiEvent() #39 0x7fbaae9f54bc ui::X11WindowOzone::DispatchEvent() #40 0x7fbabf429887 ui::PlatformEventSource::DispatchEvent() #41 0x7fba97c274a9 ui::X11EventSourceLibevent::DispatchPlatformEvent() #42 0x7fba97c27053 ui::X11EventSourceLibevent::ProcessXEvent() #43 0x7fba97c198a5 ui::X11EventSource::ExtractCookieDataDispatchEvent() #44 0x7fba97c1982e ui::X11EventSource::DispatchXEvents() #45 0x7fba97c2770f ui::X11EventSourceLibevent::OnFileCanReadWithoutBlocking() #46 0x7fbac44d8cae base::MessagePumpLibevent::FdWatchController::OnFileCanReadWithoutBlocking() #47 0x7fbac44d9dcd base::MessagePumpLibevent::OnLibeventNotification() #48 0x7fbac45221fe event_process_active #49 0x7fbac4521847 event_base_loop #50 0x7fbac44d9ea4 base::MessagePumpLibevent::Run() #51 0x7fbac440a02c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #52 0x7fbac43ae9d7 base::RunLoop::Run() #53 0x56387d6e4c8e content::RunThisRunLoop() #54 0x56387d6e4e33 content::RunAllPendingInMessageLoop() #55 0x56387cd44111 InProcessBrowserTest::PreRunTestOnMainThread() #56 0x56387d697cde content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #57 0x56387887c69d base::internal::FunctorTraits<>::Invoke<>() #58 0x56387887c5e1 base::internal::InvokeHelper<>::MakeItSo<>() #59 0x56387887c587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #60 0x563878a4883c base::internal::Invoker<>::Run() #61 0x56387886ff8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #62 0x56387cde4d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #63 0x56387cde3b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #64 0x56387a5c64dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #65 0x7fbabcb23807 content::BrowserMainLoop::PreMainMessageLoopRun() #66 0x7fbabbeff61d base::internal::FunctorTraits<>::Invoke<>() #67 0x7fbabbeff591 base::internal::InvokeHelper<>::MakeItSo<>() #68 0x7fbabbeff537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #69 0x7fbabc8cb11c base::internal::Invoker<>::Run() #70 0x7fbabbe73d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #71 0x7fbabd336acc content::StartupTaskRunner::RunAllTasksNow() #72 0x7fbabcb21fc1 content::BrowserMainLoop::CreateStartupTasks() #73 0x7fbabcb28ece content::BrowserMainRunnerImpl::Initialize() #74 0x7fbabcb1f361 content::BrowserMain() #75 0x7fbabde86d2b content::RunBrowserProcessMain() #76 0x7fbabde87fe6 content::ContentMainRunnerImpl::RunServiceManager() #77 0x7fbabde87aa0 content::ContentMainRunnerImpl::Run() #78 0x7fbabde85589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #79 0x7fba9b748703 service_manager::Main() #80 0x7fbabde86835 content::ContentMain() #81 0x56387d697a19 content::BrowserTestBase::SetUp() #82 0x56387cd42f4e InProcessBrowserTest::SetUp() #83 0x56387ccd9dfb extensions::ExtensionBrowserTest::SetUp() #84 0x56387ab2163e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #85 0x56387ab1d302 testing::internal::HandleExceptionsInMethodIfSupported<>() #86 0x56387ab10b94 testing::Test::Run() #87 0x56387ab11282 testing::TestInfo::Run() #88 0x56387ab11793 testing::TestSuite::Run() #89 0x56387ab19274 testing::internal::UnitTestImpl::RunAllTests() #90 0x56387ab216ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #91 0x56387ab1e152 testing::internal::HandleExceptionsInMethodIfSupported<>() #92 0x56387ab18f97 testing::UnitTest::Run() #93 0x56387cd62d01 RUN_ALL_TESTS() #94 0x56387cd61562 base::TestSuite::Run() #95 0x56387ccc5b57 ChromeTestSuiteRunner::RunTestSuite() #96 0x56387ccc5c43 ChromeTestLauncherDelegate::RunTestSuite() #97 0x56387d6dd005 content::LaunchTests() #98 0x56387ccc5f87 LaunchChromeTests() #99 0x56387ccc59ab main #100 0x7fba9cc0df45 __libc_start_main #101 0x56387881e02a _start [411/594] MimeHandlerViewTest.PostMessage (CRASHED) [412/594] AppWindowApiTest.OnRestoredEvent (7869 ms) [413/594] MimeHandlerViewTest.EmbeddedDataUrlLong (8950 ms) [414/594] ChromeVoxLibLouisTest.testGetInvalidTranslator (17060 ms) [415/594] ChromeVoxAutomationUtilE2ETest.GetUniqueAncestors (17854 ms) [416/594] ChromeVoxBackgroundTest.AriaLabel (18905 ms) [417/594] ChromeVoxBackgroundTest.Checkbox (19969 ms) [418/594] ChromeVoxBackgroundTest.NavigationSyncsSelect (21255 ms) [419/594] ChromeVoxCursorsTest.CharacterRange (20216 ms) [420/594] ChromeVoxBackgroundTest.DisappearingObject (23629 ms) [421/594] ChromeVoxCursorsTest.InlineElementOffset (19690 ms) <truncated> return Array.isArray(ar) || (typeof ar === 'object' && objectToString(ar) === '[object Array]'); } function isRegExp(re) { return typeof re === 'object' && objectToString(re) === '[object RegExp]'; } function isDate(d) { return typeof d === 'object' && objectToString(d) === '[object Date]'; } function isError(e) { return typeof e === 'object' && objectToString(e) === '[object Error]'; } function objectToString(o) { return Object.prototype.toString.call(o); } },{"./getEnumerableProperties":15,"./getName":17,"./getProperties":20}],24:[function(require,module,exports){ /*! * Chai - flag utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Module dependancies */ var inspect = require('./inspect'); var config = require('../config'); /** * ### .objDisplay (object) * * Determines if an object or an array matches * criteria to be inspected in-line for error * messages or should be truncated. * * @param {Mixed} javascript object to inspect * @name objDisplay * @api public */ module.exports = function (obj) { var str = inspect(obj) , type = Object.prototype.toString.call(obj); if (config.truncateThreshold && str.length >= config.truncateThreshold) { if (type === '[object Function]') { return !obj.name || obj.name === '' ? '[Function]' : '[Function: ' + obj.name + ']'; } else if (type === '[object Array]') { return '[ Array(' + obj.length + ') ]'; } else if (type === '[object Object]') { var keys = Object.keys(obj) , kstr = keys.length > 2 ? keys.splice(0, 2).join(', ') + ', ...' : keys.join(', '); return '{ Object (' + kstr + ') }'; } else { return str; } } else { return str; } }; },{"../config":4,"./inspect":23}],25:[function(require,module,exports){ /*! * Chai - overwriteChainableMethod utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### overwriteChainableMethod (ctx, name, method, chainingBehavior) * * Overwites an already existing chainable method * and provides access to the previous function or * property. Must return functions to be used for * name. * * utils.overwriteChainableMethod(chai.Assertion.prototype, 'length', * function (_super) { * } * , function (_super) { * } * ); * * Can also be accessed directly from `chai.Assertion`. * * chai.Assertion.overwriteChainableMethod('foo', fn, fn); * * Then can be used as any other assertion. * * expect(myFoo).to.have.length(3); * expect(myFoo).to.have.length.above(3); * * @param {Object} ctx object whose method / property is to be overwritten * @param {String} name of method / property to overwrite * @param {Function} method function that returns a function to be used for name * @param {Function} chainingBehavior function that returns a function to be used for property * @name overwriteChainableMethod * @api public */ module.exports = function (ctx, name, method, chainingBehavior) { var chainableBehavior = ctx.__methods[name]; var _chainingBehavior = chainableBehavior.chainingBehavior; chainableBehavior.chainingBehavior = function () { var result = chainingBehavior(_chainingBehavior).call(this); return result === undefined ? this : result; }; var _method = chainableBehavior.method; chainableBehavior.method = function () { var result = method(_method).apply(this, arguments); return result === undefined ? this : result; }; }; },{}],26:[function(require,module,exports){ /*! * Chai - overwriteMethod utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### overwriteMethod (ctx, name, fn) * * Overwites an already existing method and provides * access to previous function. Must return function * to be used for name. * * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) { * return function (str) { * var obj = utils.flag(this, 'object'); * if (obj instanceof Foo) { * new chai.Assertion(obj.value).to.equal(str); * } else { * _super.apply(this, arguments); * } * } * }); * * Can also be accessed directly from `chai.Assertion`. * * chai.Assertion.overwriteMethod('foo', fn); * * Then can be used as any other assertion. * * expect(myFoo).to.equal('bar'); * * @param {Object} ctx object whose method is to be overwritten * @param {String} name of method to overwrite * @param {Function} method function that returns a function to be used for name * @name overwriteMethod * @api public */ module.exports = function (ctx, name, method) { var _method = ctx[name] , _super = function () { return this; }; if (_method && 'function' === typeof _method) _super = _method; ctx[name] = function () { var result = method(_super).apply(this, arguments); return result === undefined ? this : result; } }; },{}],27:[function(require,module,exports){ /*! * Chai - overwriteProperty utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### overwriteProperty (ctx, name, fn) * * Overwites an already existing property getter and provides * access to previous value. Must return function to use as getter. * * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) { * return function () { * var obj = utils.flag(this, 'object'); * if (obj instanceof Foo) { * new chai.Assertion(obj.name).to.equal('bar'); * } else { * _super.call(this); * } * } * }); * * * Can also be accessed directly from `chai.Assertion`. * * chai.Assertion.overwriteProperty('foo', fn); * * Then can be used as any other assertion. * * expect(myFoo).to.be.ok; * * @param {Object} ctx object whose property is to be overwritten * @param {String} name of property to overwrite * @param {Function} getter function that returns a getter function to be used for name * @name overwriteProperty * @api public */ module.exports = function (ctx, name, getter) { var _get = Object.getOwnPropertyDescriptor(ctx, name) , _super = function () {}; if (_get && 'function' === typeof _get.get) _super = _get.get Object.defineProperty(ctx, name, { get: function () { var result = getter(_super).call(this); return result === undefined ? this : result; } , configurable: true }); }; },{}],28:[function(require,module,exports){ /*! * Chai - test utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Module dependancies */ var flag = require('./flag'); /** * # test(object, expression) * * Test and object for expression. * * @param {Object} object (constructed Assertion) * @param {Arguments} chai.Assertion.prototype.assert arguments */ module.exports = function (obj, args) { var negate = flag(obj, 'negate') , expr = args[0]; return negate ? !expr : expr; }; },{"./flag":13}],29:[function(require,module,exports){ /*! * Chai - transferFlags utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### transferFlags(assertion, object, includeAll = true) * * Transfer all the flags for `assertion` to `object`. If * `includeAll` is set to `false`, then the base Chai * assertion flags (namely `object`, `ssfi`, and `message`) * will not be transferred. * * * var newAssertion = new Assertion(); * utils.transferFlags(assertion, newAssertion); * * var anotherAsseriton = new Assertion(myObj); * utils.transferFlags(assertion, anotherAssertion, false); * * @param {Assertion} assertion the assertion to transfer the flags from * @param {Object} object the object to transfer the flags to; usually a new assertion * @param {Boolean} includeAll * @name transferFlags * @api private */ module.exports = function (assertion, object, includeAll) { var flags = assertion.__flags || (assertion.__flags = Object.create(null)); if (!object.__flags) { object.__flags = Object.create(null); } includeAll = arguments.length === 3 ? includeAll : true; for (var flag in flags) { if (includeAll || (flag !== 'object' && flag !== 'ssfi' && flag != 'message')) { object.__flags[flag] = flags[flag]; } } }; },{}],30:[function(require,module,exports){ /*! * assertion-error * Copyright(c) 2013 Jake Luer <jake@qualiancy.com> * MIT Licensed */ /*! * Return a function that will copy properties from * one object to another excluding any originally * listed. Returned function will create a new `{}`. * * @param {String} excluded properties ... * @return {Function} */ function exclude () { var excludes = [].slice.call(arguments); function excludeProps (res, obj) { Object.keys(obj).forEach(function (key) { if (!~excludes.indexOf(key)) res[key] = obj[key]; }); } return function extendExclude () { var args = [].slice.call(arguments) , i = 0 , res = {}; for (; i < args.length; i++) { excludeProps(res, args[i]); } return res; }; }; /*! * Primary Exports */ module.exports = AssertionError; /** * ### AssertionError * * An extension of the JavaScript `Error` constructor for * assertion and validation scenarios. * * @param {String} message * @param {Object} properties to include (optional) * @param {callee} start stack function (optional) */ function AssertionError (message, _props, ssf) { var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON') , props = extend(_props || {}); // default values this.message = message || 'Unspecified AssertionError'; this.showDiff = false; // copy from properties for (var key in props) { this[key] = props[key]; } // capture stack trace ssf = ssf || arguments.callee; if (ssf && Error.captureStackTrace) { Error.captureStackTrace(this, ssf); } else { this.stack = new Error().stack; } } /*! * Inherit from Error.prototype */ AssertionError.prototype = Object.create(Error.prototype); /*! * Statically set name */ AssertionError.prototype.name = 'AssertionError'; /*! * Ensure correct constructor */ AssertionError.prototype.constructor = AssertionError; /** * Allow errors to be converted to JSON for static transfer. * * @param {Boolean} include stack (default: `true`) * @return {Object} object that can be `JSON.stringify` */ AssertionError.prototype.toJSON = function (stack) { var extend = exclude('constructor', 'toJSON', 'stack') , props = extend({ name: this.name }, this); // include stack if exists and not turned off if (false !== stack && this.stack) { props.stack = this.stack; } return props; }; },{}],31:[function(require,module,exports){ module.exports = require('./lib/eql'); },{"./lib/eql":32}],32:[function(require,module,exports){ /*! * deep-eql * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Module dependencies */ var type = require('type-detect'); /*! * Buffer.isBuffer browser shim */ var Buffer; try { Buffer = require('buffer').Buffer; } catch(ex) { Buffer = {}; Buffer.isBuffer = function() { return false; } } /*! * Primary Export */ module.exports = deepEqual; /** * Assert super-strict (egal) equality between * two objects of any type. * * @param {Mixed} a * @param {Mixed} b * @param {Array} memoised (optional) * @return {Boolean} equal match */ function deepEqual(a, b, m) { if (sameValue(a, b)) { return true; } else if ('date' === type(a)) { return dateEqual(a, b); } else if ('regexp' === type(a)) { return regexpEqual(a, b); } else if (Buffer.isBuffer(a)) { return bufferEqual(a, b); } else if ('arguments' === type(a)) { return argumentsEqual(a, b, m); } else if (!typeEqual(a, b)) { return false; } else if (('object' !== type(a) && 'object' !== type(b)) && ('array' !== type(a) && 'array' !== type(b))) { return sameValue(a, b); } else { return objectEqual(a, b, m); } } /*! * Strict (egal) equality test. Ensures that NaN always * equals NaN and `-0` does not equal `+0`. * * @param {Mixed} a * @param {Mixed} b * @return {Boolean} equal match */ function sameValue(a, b) { if (a === b) return a !== 0 || 1 / a === 1 / b; return a !== a && b !== b; } /*! * Compare the types of two given objects and * return if they are equal. Note that an Array * has a type of `array` (not `object`) and arguments * have a type of `arguments` (not `array`/`object`). * * @param {Mixed} a * @param {Mixed} b * @return {Boolean} result */ function typeEqual(a, b) { return type(a) === type(b); } /*! * Compare two Date objects by asserting that * the time values are equal using `saveValue`. * * @param {Date} a * @param {Date} b * @return {Boolean} result */ function dateEqual(a, b) { if ('date' !== type(b)) return false; return sameValue(a.getTime(), b.getTime()); } /*! * Compare two regular expressions by converting them * to string and checking for `sameValue`. * * @param {RegExp} a * @param {RegExp} b * @return {Boolean} result */ function regexpEqual(a, b) { if ('regexp' !== type(b)) return false; return sameValue(a.toString(), b.toString()); } /*! * Assert deep equality of two `arguments` objects. * Unfortunately, these must be sliced to arrays * prior to test to ensure no bad behavior. * * @param {Arguments} a * @param {Arguments} b * @param {Array} memoize (optional) * @return {Boolean} result */ function argumentsEqual(a, b, m) { if ('arguments' !== type(b)) return false; a = [].slice.call(a); b = [].slice.call(b); return deepEqual(a, b, m); } /*! * Get enumerable properties of a given object. * * @param {Object} a * @return {Array} property names */ function enumerable(a) { var res = []; for (var key in a) res.push(key); return res; } /*! * Simple equality for flat iterable objects * such as Arrays or Node.js buffers. * * @param {Iterable} a * @param {Iterable} b * @return {Boolean} result */ function iterableEqual(a, b) { if (a.length !== b.length) return false; var i = 0; var match = true; for (; i < a.length; i++) { if (a[i] !== b[i]) { match = false; break; } } return match; } /*! * Extension to `iterableEqual` specifically * for Node.js Buffers. * * @param {Buffer} a * @param {Mixed} b * @return {Boolean} result */ function bufferEqual(a, b) { if (!Buffer.isBuffer(b)) return false; return iterableEqual(a, b); } /*! * Block for `objectEqual` ensuring non-existing * values don't get in. * * @param {Mixed} object * @return {Boolean} result */ function isValue(a) { return a !== null && a !== undefined; } /*! * Recursively check the equality of two objects. * Once basic sameness has been established it will * defer to `deepEqual` for each enumerable key * in the object. * * @param {Mixed} a * @param {Mixed} b * @return {Boolean} result */ function objectEqual(a, b, m) { if (!isValue(a) || !isValue(b)) { return false; } if (a.prototype !== b.prototype) { return false; } var i; if (m) { for (i = 0; i < m.length; i++) { if ((m[i][0] === a && m[i][1] === b) || (m[i][0] === b && m[i][1] === a)) { return true; } } } else { m = []; } try { var ka = enumerable(a); var kb = enumerable(b); } catch (ex) { return false; } ka.sort(); kb.sort(); if (!iterableEqual(ka, kb)) { return false; } m.push([ a, b ]); var key; for (i = ka.length - 1; i >= 0; i--) { key = ka[i]; if (!deepEqual(a[key], b[key], m)) { return false; } } return true; } },{"buffer":undefined,"type-detect":33}],33:[function(require,module,exports){ module.exports = require('./lib/type'); },{"./lib/type":34}],34:[function(require,module,exports){ /*! * type-detect * Copyright(c) 2013 jake luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Primary Exports */ var exports = module.exports = getType; /*! * Detectable javascript natives */ var natives = { '[object Array]': 'array' , '[object RegExp]': 'regexp' , '[object Function]': 'function' , '[object Arguments]': 'arguments' , '[object Date]': 'date' }; /** * ### typeOf (obj) * * Use several different techniques to determine * the type of object being tested. * * * @param {Mixed} object * @return {String} object type * @api public */ function getType (obj) { var str = Object.prototype.toString.call(obj); if (natives[str]) return natives[str]; if (obj === null) return 'null'; if (obj === undefined) return 'undefined'; if (obj === Object(obj)) return 'object'; return typeof obj; } exports.Library = Library; /** * ### Library * * Create a repository for custom type detection. * * ```js * var lib = new type.Library; * ``` * */ function Library () { this.tests = {}; } /** * #### .of (obj) * * Expose replacement `typeof` detection to the library. * * ```js * if ('string' === lib.of('hello world')) { * // ... * } * ``` * * @param {Mixed} object to test * @return {String} type */ Library.prototype.of = getType; /** * #### .define (type, test) * * Add a test to for the `.test()` assertion. * * Can be defined as a regular expression: * * ```js * lib.define('int', /^[0-9]+$/); * ``` * * ... or as a function: * * ```js * lib.define('bln', function (obj) { * if ('boolean' === lib.of(obj)) return true; * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ]; * if ('string' === lib.of(obj)) obj = obj.toLowerCase(); * return !! ~blns.indexOf(obj); * }); * ``` * * @param {String} type * @param {RegExp|Function} test * @api public */ Library.prototype.define = function (type, test) { if (arguments.length === 1) return this.tests[type]; this.tests[type] = test; return this; }; /** * #### .test (obj, test) * * Assert that an object is of type. Will first * check natives, and if that does not pass it will * use the user defined custom tests. * * ```js * assert(lib.test('1', 'int')); * assert(lib.test('yes', 'bln')); * ``` * * @param {Mixed} object * @param {String} type * @return {Boolean} result * @api public */ Library.prototype.test = function (obj, type) { if (type === getType(obj)) return true; var test = this.tests[type]; if (test && 'regexp' === getType(test)) { return test.test(obj); } else if (test && 'function' === getType(test)) { return test(obj); } else { throw new ReferenceError('Type test "' + type + '" not defined or invalid.'); } }; },{}],35:[function(require,module,exports){ arguments[4][33][0].apply(exports,arguments) },{"./lib/type":36,"dup":33}],36:[function(require,module,exports){ /*! * type-detect * Copyright(c) 2013 jake luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Primary Exports */ var exports = module.exports = getType; /** * ### typeOf (obj) * * Use several different techniques to determine * the type of object being tested. * * * @param {Mixed} object * @return {String} object type * @api public */ var objectTypeRegexp = /^\[object (.*)\]$/; function getType(obj) { var type = Object.prototype.toString.call(obj).match(objectTypeRegexp)[1].toLowerCase(); // Let "new String('')" return 'object' if (typeof Promise === 'function' && obj instanceof Promise) return 'promise'; // PhantomJS has type "DOMWindow" for null if (obj === null) return 'null'; // PhantomJS has type "DOMWindow" for undefined if (obj === undefined) return 'undefined'; return type; } exports.Library = Library; /** * ### Library * * Create a repository for custom type detection. * * ```js * var lib = new type.Library; * ``` * */ function Library() { if (!(this instanceof Library)) return new Library(); this.tests = {}; } /** * #### .of (obj) * * Expose replacement `typeof` detection to the library. * * ```js * if ('string' === lib.of('hello world')) { * // ... * } * ``` * * @param {Mixed} object to test * @return {String} type */ Library.prototype.of = getType; /** * #### .define (type, test) * * Add a test to for the `.test()` assertion. * * Can be defined as a regular expression: * * ```js * lib.define('int', /^[0-9]+$/); * ``` * * ... or as a function: * * ```js * lib.define('bln', function (obj) { * if ('boolean' === lib.of(obj)) return true; * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ]; * if ('string' === lib.of(obj)) obj = obj.toLowerCase(); * return !! ~blns.indexOf(obj); * }); * ``` * * @param {String} type * @param {RegExp|Function} test * @api public */ Library.prototype.define = function(type, test) { if (arguments.length === 1) return this.tests[type]; this.tests[type] = test; return this; }; /** * #### .test (obj, test) * * Assert that an object is of type. Will first * check natives, and if that does not pass it will * use the user defined custom tests. * * ```js * assert(lib.test('1', 'int')); * assert(lib.test('yes', 'bln')); * ``` * * @param {Mixed} object * @param {String} type * @return {Boolean} result * @api public */ Library.prototype.test = function(obj, type) { if (type === getType(obj)) return true; var test = this.tests[type]; if (test && 'regexp' === getType(test)) { return test.test(obj); } else if (test && 'function' === getType(test)) { return test(obj); } else { throw new ReferenceError('Type test "' + type + '" not defined or invalid.'); } }; },{}]},{},[1])(1) });; //# sourceURL=file:///b/s/w/ir/third_party/chaijs/chai.js // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview Library providing basic test framework functionality. */ // See assert.js for where this is used. this.traceAssertionsForTesting = true; var hasWindow = !!this.window; /** * Namespace for |Test|. * @type {Object} */ var testing = {}; (function(exports) { /** * Holds the original version of the |chrome| object. */ var originalChrome = null; /** * Hold the currentTestCase across between preLoad and run. * @type {TestCase} */ var currentTestCase = null; /** * Value set to true by WebUIBrowserTest if test harness should wait for user to * attach a debugger. * * @type {boolean} */ var waitUser = false; /** * The string representation of the currently running test function. * @type {?string} */ var currentTestFunction = null; /** * The arguments of the currently running test. * @type {Array} */ var currentTestArguments = []; /** * This class will be exported as testing.Test, and is provided to hold the * fixture's configuration and callback methods for the various phases of * invoking a test. It is called "Test" rather than TestFixture to roughly * mimic the gtest's class names. * @constructor */ function Test() {} /** * Make all transitions and animations take 0ms. NOTE: this will completely * disable webkitTransitionEnd events. If your code relies on them firing, it * will break. animationend events should still work. */ Test.disableAnimationsAndTransitions = function() { let all = document.body.querySelectorAll('*, * /deep/ *'); const ZERO_MS_IMPORTANT = '0ms !important'; for (let i = 0, l = all.length; i < l; ++i) { let style = all[i].style; style.animationDelay = ZERO_MS_IMPORTANT; style.animationDuration = ZERO_MS_IMPORTANT; style.transitionDelay = ZERO_MS_IMPORTANT; style.transitionDuration = ZERO_MS_IMPORTANT; } var realElementAnimate = Element.prototype.animate; Element.prototype.animate = function(keyframes, opt_options) { if (typeof opt_options == 'object') { opt_options.duration = 0; } else { opt_options = 0; } return realElementAnimate.call(this, keyframes, opt_options); }; if (document.timeline && document.timeline.play) { var realTimelinePlay = document.timeline.play; document.timeline.play = function(a) { a.timing.duration = 0; return realTimelinePlay.call(document.timeline, a); }; } }; Test.prototype = { /** * The name of the test. */ name: null, /** * When set to a string value representing a url, generate BrowsePreload * call, which will browse to the url and call fixture.preLoad of the * currentTestCase. * @type {string} */ browsePreload: null, /** * When set to a string value representing an html page in the test * directory, generate BrowsePrintPreload call, which will browse to a url * representing the file, cause print, and call fixture.preLoad of the * currentTestCase. * @type {string} */ browsePrintPreload: null, /** * When set to a function, will be called in the context of the test * generation inside the function, after AddLibrary calls and before * generated C++. * @type {function(string,string)} */ testGenPreamble: null, /** * When set to a function, will be called in the context of the test * generation inside the function, and after any generated C++. * @type {function(string,string)} */ testGenPostamble: null, /** * When set to a non-null string, auto-generate typedef before generating * TEST*: {@code typedef typedefCppFixture testFixture}. * @type {string} */ typedefCppFixture: 'WebUIBrowserTest', /** * This should be initialized by the test fixture and can be referenced * during the test run. It holds any mocked handler methods. * @type {?Mock4JS.Mock} */ mockHandler: null, /** * This should be initialized by the test fixture and can be referenced * during the test run. It holds any mocked global functions. * @type {?Mock4JS.Mock} */ mockGlobals: null, /** * Value is passed through call to C++ RunJavascriptF to invoke this test. * @type {boolean} */ isAsync: false, /** * True when the test is expected to fail for testing the test framework. * @type {boolean} */ testShouldFail: false, /** * Extra libraries to add before loading this test file. * @type {Array<string>} */ extraLibraries: [], /** * Extra libraries to add before loading this test file. * This list is in the form of Closure library style object * names. To support this, a closure deps.js file must * be specified when generating the test C++ source. * The specified libraries will be included with their transitive * dependencies according to the deps file. * @type {Array<string>} */ closureModuleDeps: [], /** * Whether to run the accessibility checks. * @type {boolean} */ runAccessibilityChecks: true, /** * Configuration for the accessibility audit. * @type {axs.AuditConfiguration} */ accessibilityAuditConfig_: null, /** * Returns the configuration for the accessibility audit, creating it * on-demand. * @return {!axs.AuditConfiguration} */ get accessibilityAuditConfig() { if (!this.accessibilityAuditConfig_) { this.accessibilityAuditConfig_ = new axs.AuditConfiguration(); this.accessibilityAuditConfig_.showUnsupportedRulesWarning = false; this.accessibilityAuditConfig_.auditRulesToIgnore = [ // The "elements with meaningful background image" accessibility // audit (AX_IMAGE_01) does not apply, since Chrome doesn't // disable background images in high-contrast mode like some // browsers do. 'elementsWithMeaningfulBackgroundImage', // Most WebUI pages are inside an IFrame, so the "web page should // have a title that describes topic or purpose" test (AX_TITLE_01) // generally does not apply. 'pageWithoutTitle', // TODO(aboxhall): re-enable when crbug.com/267035 is fixed. // Until then it's just noise. 'lowContrastElements', // TODO(apacible): re-enable when following issue is fixed. // github.com/GoogleChrome/accessibility-developer-tools/issues/251 'tableHasAppropriateHeaders', // TODO(crbug.com/657514): This rule is flaky on Linux/ChromeOS. 'requiredOwnedAriaRoleMissing', ]; } return this.accessibilityAuditConfig_; }, /** * Whether to treat accessibility issues (errors or warnings) as test * failures. If true, any accessibility issues will cause the test to fail. * If false, accessibility issues will cause a console.warn. * Off by default to begin with; as we add the ability to suppress false * positives, we will transition this to true. * @type {boolean} */ accessibilityIssuesAreErrors: false, /** * Holds any accessibility results found during the accessibility audit. * @type {Array<Object>} */ a11yResults_: [], /** * Gets the list of accessibility errors found during the accessibility * audit. Only for use in testing. * @return {Array<Object>} */ getAccessibilityResults: function() { return this.a11yResults_; }, /** * Run accessibility checks after this test completes. */ enableAccessibilityChecks: function() { this.runAccessibilityChecks = true; }, /** * Don't run accessibility checks after this test completes. */ disableAccessibilityChecks: function() { this.runAccessibilityChecks = false; }, /** * Create a new class to handle |messageNames|, assign it to * |this.mockHandler|, register its messages and return it. * @return {Mock} Mock handler class assigned to |this.mockHandler|. */ makeAndRegisterMockHandler: function(messageNames) { var MockClass = makeMockClass(messageNames); this.mockHandler = mock(MockClass); registerMockMessageCallbacks(this.mockHandler, MockClass); return this.mockHandler; }, /** * Create a new class to handle |functionNames|, assign it to * |this.mockGlobals|, register its global overrides, and return it. * @return {Mock} Mock handler class assigned to |this.mockGlobals|. * @see registerMockGlobals */ makeAndRegisterMockGlobals: function(functionNames) { var MockClass = makeMockClass(functionNames); this.mockGlobals = mock(MockClass); registerMockGlobals(this.mockGlobals, MockClass); return this.mockGlobals; }, /** * Create a container of mocked standalone functions to handle * '.'-separated |apiNames|, assign it to |this.mockApis|, register its API * overrides and return it. * @return {Mock} Mock handler class. * @see makeMockFunctions * @see registerMockApis */ makeAndRegisterMockApis: function(apiNames) { var apiMockNames = apiNames.map(function(name) { return name.replace(/\./g, '_'); }); this.mockApis = makeMockFunctions(apiMockNames); registerMockApis(this.mockApis); return this.mockApis; }, /** * Create a container of mocked standalone functions to handle * |functionNames|, assign it to |this.mockLocalFunctions| and return it. * @param {!Array<string>} functionNames * @return {Mock} Mock handler class. * @see makeMockFunctions */ makeMockLocalFunctions: function(functionNames) { this.mockLocalFunctions = makeMockFunctions(functionNames); return this.mockLocalFunctions; }, /** * Override this method to perform initialization during preload (such as * creating mocks and registering handlers). * @type {Function} */ preLoad: function() {}, /** * Override this method to perform tasks before running your test. * @type {Function} */ setUp: function() { // These should be ignored in many of the web UI tests. // user-image-stream and supervised-user-creation-image-stream are // streaming video elements used for capturing a user image so they // won't have captions and should be ignored everywhere. this.accessibilityAuditConfig.ignoreSelectors( 'videoWithoutCaptions', '.user-image-stream'); this.accessibilityAuditConfig.ignoreSelectors( 'videoWithoutCaptions', '.supervised-user-creation-image-stream'); }, /** * Override this method to perform tasks after running your test. If you * create a mock class, you must call Mock4JS.verifyAllMocks() in this * phase. * @type {Function} */ tearDown: function() { if (typeof document != 'undefined') { var noAnimationStyle = document.getElementById('no-animation'); if (noAnimationStyle) { noAnimationStyle.parentNode.removeChild(noAnimationStyle); } } Mock4JS.verifyAllMocks(); }, /** * Called to run the body from the perspective of this fixture. * @type {Function} */ runTest: function(testBody) { testBody.call(this); }, /** * Called to run the accessibility audit from the perspective of this * fixture. */ runAccessibilityAudit: function() { if (!this.runAccessibilityChecks || typeof document === 'undefined') { return; } var auditConfig = this.accessibilityAuditConfig; if (!runAccessibilityAudit(this.a11yResults_, auditConfig)) { var report = accessibilityAuditReport(this.a11yResults_); if (this.accessibilityIssuesAreErrors) { throw new Error(report); } else { console.warn(report); } } }, /** * Create a closure function for continuing the test at a later time. May be * used as a listener function. * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {Function} completion The function to call to complete the test. * @param {...*} var_args Arguments to pass when calling completionAction. * @return {function(): void} Return a function, bound to this test fixture, * which continues the test. */ continueTest: function(whenTestDone, completion) { var savedArgs = new SaveMockArguments(); var completionAction = new CallFunctionAction( this, savedArgs, completion, Array.prototype.slice.call(arguments, 2)); if (whenTestDone === WhenTestDone.DEFAULT) { whenTestDone = WhenTestDone.ASSERT; } var runAll = new RunAllAction(true, whenTestDone, [completionAction]); return function() { savedArgs.arguments = Array.prototype.slice.call(arguments); runAll.invoke(); }; }, /** * Call this during setUp to defer the call to runTest() until later. The * caller must call the returned function at some point to run the test. * @type {Function} * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {...*} var_args Arguments to pass when running the * |currentTestCase|. * @return {function(): void} A function which will run the current body of * the currentTestCase. */ deferRunTest: function(whenTestDone) { if (whenTestDone === WhenTestDone.DEFAULT) { whenTestDone = WhenTestDone.ALWAYS; } return currentTestCase.deferRunTest.apply( currentTestCase, [whenTestDone].concat(Array.prototype.slice.call(arguments, 1))); }, }; /** * This class is not exported and is available to hold the state of the * |currentTestCase| throughout preload and test run. * @param {string} name The name of the test case. * @param {Test} fixture The fixture object for this test case. * @param {Function} body The code to run for the test. * @constructor */ function TestCase(name, fixture, body) { this.name = name; this.fixture = fixture; this.body = body; } TestCase.prototype = { /** * The name of this test. * @type {string} */ name: null, /** * The test fixture to set |this| to when running the test |body|. * @type {testing.Test} */ fixture: null, /** * The test body to execute in runTest(). * @type {Function} */ body: null, /** * True when the test fixture will run the test later. * @type {boolean} * @private */ deferred_: false, /** * Called at preload time, proxies to the fixture. * @type {Function} */ preLoad: function(name) { if (this.fixture) { this.fixture.preLoad(); } }, /** * Called before a test runs. */ setUp: function() { if (this.fixture) { this.fixture.setUp(); } }, /** * Called before a test is torn down (by testDone()). */ tearDown: function() { if (this.fixture) { this.fixture.tearDown(); } }, /** * Called to run this test's body. */ runTest: function() { if (this.body && this.fixture) { this.fixture.runTest(this.body); } }, /** * Called after a test is run (in testDone) to test accessibility. */ runAccessibilityAudit: function() { if (this.fixture) { this.fixture.runAccessibilityAudit(); } }, /** * Runs this test case with |this| set to the |fixture|. * * Note: Tests created with TEST_F may depend upon |this| being set to an * instance of this.fixture. The current implementation of TEST creates a * dummy constructor, but tests created with TEST should not rely on |this| * being set. * @type {Function} */ run: function() { try { this.setUp(); } catch (e) { // Mock4JSException doesn't inherit from Error, so fall back on // toString(). console.error(e.stack || e.toString()); } if (!this.deferred_) { this.runTest(); } // tearDown called by testDone(). }, /** * Cause this TestCase to be deferred (don't call runTest()) until the * returned function is called. * @type {Function} * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {...*} var_args Arguments to pass when running the * |currentTestCase|. * @return {function(): void} A function that will run this TestCase when * called. */ deferRunTest: function(whenTestDone) { this.deferred_ = true; var savedArgs = new SaveMockArguments(); var completionAction = new CallFunctionAction( this, savedArgs, this.runTest, Array.prototype.slice.call(arguments, 1)); var runAll = new RunAllAction(true, whenTestDone, [completionAction]); return function() { savedArgs.arguments = Array.prototype.slice.call(arguments); runAll.invoke(); }; }, }; /** * Registry of javascript-defined callbacks for {@code chrome.send}. * @type {Object} */ var sendCallbacks = {}; /** * Registers the message, object and callback for {@code chrome.send} * @param {string} name The name of the message to route to this |callback|. * @param {Object} messageHandler Pass as |this| when calling the |callback|. * @param {function(...)} callback Called by {@code chrome.send}. * @see sendCallbacks */ function registerMessageCallback(name, messageHandler, callback) { sendCallbacks[name] = [messageHandler, callback]; } /** * Register all methods of {@code mockClass.prototype} with messages of the * same name as the method, using the proxy of the |mockObject| as the * |messageHandler| when registering. * @param {Mock4JS.Mock} mockObject The mock to register callbacks against. * @param {function(new:Object)} mockClAss Constructor for the mocked class. * @see registerMessageCallback * @see overrideChrome */ function registerMockMessageCallbacks(mockObject, mockClass) { if (!deferGlobalOverrides && !originalChrome) { overrideChrome(); } var mockProxy = mockObject.proxy(); for (var func in mockClass.prototype) { if (typeof mockClass.prototype[func] === 'function') { registerMessageCallback(func, mockProxy, mockProxy[func]); } } } /** * Holds the mapping of name -> global override information. * @type {Object} */ var globalOverrides = {}; /** * When preloading JavaScript libraries, this is true until the * DOMContentLoaded event has been received as globals cannot be overridden * until the page has loaded its JavaScript. * @type {boolean} */ var deferGlobalOverrides = false; /** * Override the global function |funcName| with its registered mock. This * should not be called twice for the same |funcName|. * @param {string} funcName The name of the global function to override. */ function overrideGlobal(funcName) { assertNotEquals(undefined, this[funcName]); var globalOverride = globalOverrides[funcName]; assertNotEquals(undefined, globalOverride); assertEquals(undefined, globalOverride.original); globalOverride.original = this[funcName]; this[funcName] = globalOverride.callback.bind(globalOverride.object); } /** * Registers the global function name, object and callback. * @param {string} name The name of the message to route to this |callback|. * @param {Object} object Pass as |this| when calling the |callback|. * @param {function(...)} callback Called by {@code chrome.send}. * @see overrideGlobal */ function registerMockGlobal(name, object, callback) { assertEquals(undefined, globalOverrides[name]); globalOverrides[name] = { object: object, callback: callback, }; if (!deferGlobalOverrides) { overrideGlobal(name); } } /** * Registers the mock API call and its function. * @param {string} name The '_'-separated name of the API call. * @param {function(...)} theFunction Mock function for this API call. */ function registerMockApi(name, theFunction) { var path = name.split('_'); var namespace = this; for (var i = 0; i < path.length - 1; i++) { var fieldName = path[i]; if (!namespace[fieldName]) { namespace[fieldName] = {}; } namespace = namespace[fieldName]; } var fieldName = path[path.length - 1]; namespace[fieldName] = theFunction; } /** * Empty function for use in making mocks. * @const */ function emptyFunction() {} /** * Make a mock from the supplied |methodNames| array. * @param {Array<string>} methodNames Array of names of methods to mock. * @return {Function} Constructor with prototype filled in with methods * matching |methodNames|. */ function makeMockClass(methodNames) { function MockConstructor() {} for (var i = 0; i < methodNames.length; i++) { MockConstructor.prototype[methodNames[i]] = emptyFunction; } return MockConstructor; } /** * Create a new class to handle |functionNames|, add method 'functions()' * that returns a container of standalone functions based on the mock class * members, and return it. * @return {Mock} Mock handler class. */ function makeMockFunctions(functionNames) { var MockClass = makeMockClass(functionNames); var mockFunctions = mock(MockClass); var mockProxy = mockFunctions.proxy(); mockFunctions.functions_ = {}; for (var func in MockClass.prototype) { if (typeof MockClass.prototype[func] === 'function') { mockFunctions.functions_[func] = mockProxy[func].bind(mockProxy); } } mockFunctions.functions = function() { return this.functions_; }; return mockFunctions; } /** * Register all methods of {@code mockClass.prototype} as overrides to global * functions of the same name as the method, using the proxy of the * |mockObject| to handle the functions. * @param {Mock4JS.Mock} mockObject The mock to register callbacks against. * @param {function(new:Object)} mockClass Constructor for the mocked class. * @see registerMockGlobal */ function registerMockGlobals(mockObject, mockClass) { var mockProxy = mockObject.proxy(); for (var func in mockClass.prototype) { if (typeof mockClass.prototype[func] === 'function') { registerMockGlobal(func, mockProxy, mockProxy[func]); } } } /** * Register all functions in |mockObject.functions()| as global API calls. * @param {Mock4JS.Mock} mockObject The mock to register callbacks against. * @see registerMockApi */ function registerMockApis(mockObject) { var functions = mockObject.functions(); for (var func in functions) { if (typeof functions[func] === 'function') { registerMockApi(func, functions[func]); } } } /** * Overrides {@code chrome.send} for routing messages to javascript * functions. Also falls back to sending with the original chrome object. * @param {string} messageName The message to route. */ function send(messageName) { var callback = sendCallbacks[messageName]; if (callback != undefined) { callback[1].apply(callback[0], Array.prototype.slice.call(arguments, 1)); } else { this.__proto__.send.apply(this.__proto__, arguments); } } /** * true when testDone has been called. * @type {boolean} */ var testIsDone = false; /** * Holds the errors, if any, caught by expects so that the test case can * fail. Cleared when results are reported from runTest() or testDone(). * @type {Array<Error>} */ var errors = []; /** * URL to dummy WebUI page for testing framework. * @type {string} */ var DUMMY_URL = 'chrome://DummyURL'; /** * Resets test state by clearing |errors| and |testIsDone| flags. */ function resetTestState() { errors.splice(0, errors.length); testIsDone = false; } /** * Notifies the running browser test of the test results. Clears |errors|. * @param {Array<boolean, string>=} result When passed, this is used for the * testResult message. */ function testDone(result) { if (!testIsDone) { testIsDone = true; if (currentTestCase) { var ok = true; ok = createExpect( currentTestCase.runAccessibilityAudit.bind(currentTestCase)) .call(null) && ok; ok = createExpect(currentTestCase.tearDown.bind(currentTestCase)) .call(null) && ok; if (!ok && result) { result = [false, errorsToMessage(errors, result[1])]; } currentTestCase = null; } if (!result) { result = testResult(); } if (hasWindow && window.webUiTest) { let testRunner; if (webUiTest.mojom.TestRunnerPtr) { // For mojo WebUI tests. testRunner = new webUiTest.mojom.TestRunnerPtr(); Mojo.bindInterface( webUiTest.mojom.TestRunner.name, mojo.makeRequest(testRunner).handle); } else if (webUiTest.mojom.TestRunnerProxy) { // For mojo-lite WebUI tests. testRunner = webUiTest.mojom.TestRunner.getProxy(); } else { assertNotReached( 'Mojo bindings found, but no valid test interface loaded'); } if (result[0]) { testRunner.testComplete(); } else { testRunner.testComplete(result[1]); } } else if (chrome.send) { // For WebUI and v8 unit tests. chrome.send('testResult', result); } else if (window.domAutomationController.send) { // For extension tests. valueResult = {'result': result[0], message: result[1]}; window.domAutomationController.send(JSON.stringify(valueResult)); } else { assertNotReached('No test framework available'); } errors.splice(0, errors.length); } else { console.warn('testIsDone already'); } } /** * Converts each Error in |errors| to a suitable message, adding them to * |message|, and returns the message string. * @param {Array<Error>} errors Array of errors to add to |message|. * @param {string=} opt_message Message to append error messages to. * @return {string} |opt_message| + messages of all |errors|. */ function errorsToMessage(errors, opt_message) { var message = ''; if (opt_message) { message += opt_message + '\n'; } for (var i = 0; i < errors.length; ++i) { var errorMessage = errors[i].stack || errors[i].message; message += 'Failed: ' + currentTestFunction + '(' + currentTestArguments.map(JSON.stringify) + ')\n' + errorMessage; } return message; } /** * Returns [success, message] & clears |errors|. * @param {boolean} errorsOk When true, errors are ok. * @return {Array<boolean, string>} */ function testResult(errorsOk) { var result = [true, '']; if (errors.length) { result = [!!errorsOk, errorsToMessage(errors)]; } return result; } // Asserts. // Use the following assertions to verify a condition within a test. /** * @param {boolean} value The value to check. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertTrue(value, opt_message) { chai.assert.isTrue(value, opt_message); } /** * @param {boolean} value The value to check. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertFalse(value, opt_message) { chai.assert.isFalse(value, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertGE(value1, value2, opt_message) { chai.expect(value1).to.be.at.least(value2, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertGT(value1, value2, opt_message) { chai.assert.isAbove(value1, value2, opt_message); } /** * @param {*} expected The expected value. * @param {*} actual The actual value. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertEquals(expected, actual, opt_message) { chai.assert.strictEqual(actual, expected, opt_message); } /** * @param {*} expected * @param {*} actual * {string=} opt_message * @throws {Error} */ function assertDeepEquals(expected, actual, opt_message) { chai.assert.deepEqual(actual, expected, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertLE(value1, value2, opt_message) { chai.expect(value1).to.be.at.most(value2, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertLT(value1, value2, opt_message) { chai.assert.isBelow(value1, value2, opt_message); } /** * @param {*} expected The expected value. * @param {*} actual The actual value. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertNotEquals(expected, actual, opt_message) { chai.assert.notStrictEqual(actual, expected, opt_message); } /** * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertNotReached(opt_message) { chai.assert.fail(null, null, opt_message); } /** * @param {Function} testFunction * @param {Function=|string=|RegExp=} opt_expected The expected Error * constructor, partial or complete error message string, or RegExp to * test the error message. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertThrows(testFunction, opt_expected, opt_message) { chai.assert.throws(testFunction, opt_expected, opt_message); } /** * Run an accessibility audit on the current page state. * @type {Function} * @param {Array} a11yResults * @param {axs.AuditConfiguration=} opt_config * @return {boolean} Whether there were any errors or warnings * @private */ function runAccessibilityAudit(a11yResults, opt_config) { var auditResults = axs.Audit.run(opt_config); for (var i = 0; i < auditResults.length; i++) { var auditResult = auditResults[i]; if (auditResult.result == axs.constants.AuditResult.FAIL) { var auditRule = auditResult.rule; // TODO(aboxhall): more useful error messages (sadly non-trivial) a11yResults.push(auditResult); } } // TODO(aboxhall): have strict (no errors or warnings) vs non-strict // (warnings ok) // TODO(aboxhall): some kind of info logging for warnings only?? return (a11yResults.length == 0); } /** * Concatenates the accessibility error messages for each result in * |a11yResults| and * |a11yWarnings| in to an accessibility report, appends it to the given * |message| and returns the resulting message string. * @param {Array<string>} a11yResults The list of accessibility results * @return {string} |message| + accessibility report. */ function accessibilityAuditReport(a11yResults, message) { message = message ? message + '\n\n' : '\n'; message += 'Accessibility issues found on ' + window.location.href + '\n'; message += axs.Audit.createReport(a11yResults); return message; } /** * Asserts that the current page state passes the accessibility audit. * @param {Array=} opt_results Array to fill with results, if desired. */ function assertAccessibilityOk(opt_results) { var a11yResults = opt_results || []; var auditConfig = currentTestCase.fixture.accessibilityAuditConfig; if (!runAccessibilityAudit(a11yResults, auditConfig)) { throw new Error(accessibilityAuditReport(a11yResults)); } } /** * Creates a function based upon a function that throws an exception on * failure. The new function stuffs any errors into the |errors| array for * checking by runTest. This allows tests to continue running other checks, * while failing the overall test if any errors occurred. * @param {Function} assertFunc The function which may throw an Error. * @return {function(...*):bool} A function that applies its arguments to * |assertFunc| and returns true if |assertFunc| passes. * @see errors * @see runTestFunction */ function createExpect(assertFunc) { return function() { try { assertFunc.apply(null, arguments); } catch (e) { errors.push(e); return false; } return true; }; } /** * This is the starting point for tests run by WebUIBrowserTest. If an error * occurs, it reports a failure and a message created by joining individual * error messages. This supports sync tests and async tests by calling * testDone() when |isAsync| is not true, relying on async tests to call * testDone() when they complete. * @param {boolean} isAsync When false, call testDone() with the test result * otherwise only when assertions are caught. * @param {string} testFunction The function name to call. * @param {Array} testArguments The arguments to call |testFunction| with. * @return {boolean} true always to signal successful execution (but not * necessarily successful results) of this test. * @see errors * @see runTestFunction */ function runTest(isAsync, testFunction, testArguments) { // If waiting for user to attach a debugger, retry in 1 second. if (waitUser) { setTimeout(runTest, 1000, isAsync, testFunction, testArguments); return true; } // Avoid eval() if at all possible, since it will not work on pages // that have enabled content-security-policy. var testBody = this[testFunction]; // global object -- not a method. var testName = testFunction; // Depending on how we were called, |this| might not resolve to the global // context. if (testName == 'RUN_TEST_F' && testBody === undefined) { testBody = RUN_TEST_F; } if (typeof testBody === 'undefined') { testBody = eval(testFunction); testName = testBody.toString(); } if (testBody != RUN_TEST_F) { console.log('Running test ' + testName); } // Async allow expect errors, but not assert errors. var result = runTestFunction(testFunction, testBody, testArguments, isAsync); if (!isAsync || !result[0]) { testDone(result); } return true; } /** * This is the guts of WebUIBrowserTest. It runs the test surrounded by an * expect to catch Errors. If |errors| is non-empty, it reports a failure and * a message by joining |errors|. Consumers can use this to use assert/expect * functions asynchronously, but are then responsible for reporting errors to * the browser themselves through testDone(). * @param {string} testFunction The function name to report on failure. * @param {Function} testBody The function to call. * @param {Array} testArguments The arguments to call |testBody| with. * @param {boolean} onlyAssertFails When true, only assertions cause failing * testResult. * @return {Array<boolean, string>} [test-succeeded, message-if-failed] * @see createExpect * @see testResult */ function runTestFunction( testFunction, testBody, testArguments, onlyAssertFails) { currentTestFunction = testFunction; currentTestArguments = testArguments; var ok = createExpect(testBody).apply(null, testArguments); return testResult(onlyAssertFails && ok); } /** * Creates a new test case for the given |testFixture| and |testName|. Assumes * |testFixture| describes a globally available subclass of type Test. * @param {string} testFixture The fixture for this test case. * @param {string} testName The name for this test case. * @return {TestCase} A newly created TestCase. */ function createTestCase(testFixture, testName) { var fixtureConstructor = this[testFixture]; assertTrue( !!fixtureConstructor, `The testFixture \'${testFixture}\' was not found.`); var testBody = fixtureConstructor.testCaseBodies[testName]; assertTrue( !!testBody, `Test \'${testName} was not found in \'${testFixture}\'.`); var fixture = new fixtureConstructor(); fixture.name = testFixture; return new TestCase(testName, fixture, testBody); } /** * Overrides the |chrome| object to enable mocking calls to chrome.send(). */ function overrideChrome() { if (originalChrome) { console.error('chrome object already overridden'); return; } originalChrome = chrome; chrome = { __proto__: originalChrome, send: send, originalSend: originalChrome.send.bind(originalChrome), }; } /** * Used by WebUIBrowserTest to preload the javascript libraries at the * appropriate time for javascript injection into the current page. This * creates a test case and calls its preLoad for any early initialization such * as registering handlers before the page's javascript runs it's OnLoad * method. This is called before the page is loaded, so the |chrome| object is * not yet bound and this DOMContentLoaded listener will be called first to * override |chrome| in order to route messages registered in |sendCallbacks|. * @param {string} testFixture The test fixture name. * @param {string} testName The test name. * @see sendCallbacks */ function preloadJavascriptLibraries(testFixture, testName) { deferGlobalOverrides = true; // The document seems to change from the point of preloading to the point of // events (and doesn't fire), whereas the window does not. Listening to the // capture phase allows this event to fire first. window.addEventListener('DOMContentLoaded', function() { if (chrome.send) { overrideChrome(); } // Override globals at load time so they will be defined. assertTrue(deferGlobalOverrides); deferGlobalOverrides = false; for (var funcName in globalOverrides) { overrideGlobal(funcName); } }, true); currentTestCase = createTestCase(testFixture, testName); currentTestCase.preLoad(); } /** * Sets |waitUser| to true so |runTest| function waits for user to attach a * debugger. */ function setWaitUser() { waitUser = true; console.log('Waiting for debugger...'); console.log('Run: go() in the JS console when you are ready.'); } /** * Sets |waitUser| to false, so |runTest| function stops waiting for user and * start running the tests. */ function go() { waitUser = false; } /** * During generation phase, this outputs; do nothing at runtime. */ function GEN() {} /** * During generation phase, this outputs; do nothing at runtime. */ function GEN_INCLUDE() {} /** * At runtime, register the testName with a test fixture. Since this method * doesn't have a test fixture, create a dummy fixture to hold its |name| * and |testCaseBodies|. * @param {string} testCaseName The name of the test case. * @param {string} testName The name of the test function. * @param {Function} testBody The body to execute when running this test. */ function TEST(testCaseName, testName, testBody) { var fixtureConstructor = this[testCaseName]; if (fixtureConstructor === undefined) { fixtureConstructor = function() {}; this[testCaseName] = fixtureConstructor; fixtureConstructor.prototype = { __proto__: Test.prototype, name: testCaseName, }; fixtureConstructor.testCaseBodies = {}; } fixtureConstructor.testCaseBodies[testName] = testBody; } /** * At runtime, register the testName with its fixture. Stuff the |name| into * the |testFixture|'s prototype, if needed, and the |testCaseBodies| into its * constructor. * @param {string} testFixture The name of the test fixture class. * @param {string} testName The name of the test function. * @param {Function} testBody The body to execute when running this test. * @param {string=} opt_preamble C++ code to be generated before the test. Does * nothing here in the runtime phase. */ function TEST_F(testFixture, testName, testBody, opt_preamble) { var fixtureConstructor = this[testFixture]; if (!fixtureConstructor.prototype.name) { fixtureConstructor.prototype.name = testFixture; } if (fixtureConstructor['testCaseBodies'] === undefined) { fixtureConstructor.testCaseBodies = {}; } fixtureConstructor.testCaseBodies[testName] = testBody; } /** * Similar to TEST_F above but with a mandatory |preamble|. * @param {string} preamble C++ code to be generated before the test. Does * nothing here in the runtime phase. * @param {string} testFixture The name of the test fixture class. * @param {string} testName The name of the test function. * @param {Function} testBody The body to execute when running this test. */ function TEST_F_WITH_PREAMBLE(preamble, testFixture, testName, testBody) { TEST_F(testFixture, testName, testBody); } /** * RunJavascriptTestF uses this as the |testFunction| when invoking * runTest. If |currentTestCase| is non-null at this point, verify that * |testFixture| and |testName| agree with the preloaded values. Create * |currentTestCase|, if needed, run it, and clear the |currentTestCase|. * @param {string} testFixture The name of the test fixture class. * @param {string} testName The name of the test function. * @see preloadJavascriptLibraries * @see runTest */ function RUN_TEST_F(testFixture, testName) { if (!currentTestCase) { currentTestCase = createTestCase(testFixture, testName); } assertEquals(currentTestCase.name, testName); assertEquals(currentTestCase.fixture.name, testFixture); console.log('Running TestCase ' + testFixture + '.' + testName); currentTestCase.run(); } /** * This Mock4JS matcher object pushes each |actualArgument| parameter to * match() calls onto |args|. * @param {Array} args The array to push |actualArgument| onto. * @param {Object} realMatcher The real matcher check arguments with. * @constructor * @extends {realMatcher} */ function SaveMockArgumentMatcher(args, realMatcher) { this.arguments_ = args; this.realMatcher_ = realMatcher; } SaveMockArgumentMatcher.prototype = { /** * Holds the arguments to push each |actualArgument| onto. * @type {Array} * @private */ arguments_: null, /** * The real Mock4JS matcher object to check arguments with. * @type {Object} */ realMatcher_: null, /** * Pushes |actualArgument| onto |arguments_| and call |realMatcher_|. Clears * |arguments_| on non-match. * @param {*} actualArgument The argument to match and save. * @return {boolean} Result of calling the |realMatcher|. */ argumentMatches: function(actualArgument) { this.arguments_.push(actualArgument); var match = this.realMatcher_.argumentMatches(actualArgument); if (!match) { this.arguments_.splice(0, this.arguments_.length); } return match; }, /** * Proxy to |realMatcher_| for description. * @return {string} Description of this Mock4JS matcher. */ describe: function() { return this.realMatcher_.describe(); }, }; /** * Actions invoked by Mock4JS's "will()" syntax do not receive arguments from * the mocked method. This class works with SaveMockArgumentMatcher to save * arguments so that the invoked Action can pass arguments through to the * invoked function. * @param {!Object} realMatcher The real matcher to perform matching with. * @constructor */ function SaveMockArguments() { this.arguments = []; } SaveMockArguments.prototype = { /** * Wraps the |realMatcher| with an object which will push its argument onto * |arguments| and call realMatcher. * @param {Object} realMatcher A Mock4JS matcher object for this argument. * @return {SaveMockArgumentMatcher} A new matcher which will push its * argument onto |arguments|. */ match: function(realMatcher) { return new SaveMockArgumentMatcher(this.arguments, realMatcher); }, /** * Remember the argument passed to this stub invocation. * @type {Array} */ arguments: null, }; /** * CallFunctionAction is provided to allow mocks to have side effects. * @param {Object} obj The object to set |this| to when calling |func_|. * @param {?SaveMockArguments} savedArgs when non-null, saved arguments are * passed to |func|. * @param {Function} func The function to call. * @param {Array=} args Any arguments to pass to func. * @constructor */ function CallFunctionAction(obj, savedArgs, func, args) { this.obj_ = obj; this.savedArgs_ = savedArgs; this.func_ = func; this.args_ = args ? args : []; } CallFunctionAction.prototype = { /** * Set |this| to |obj_| when calling |func_|. * @type {?Object} */ obj_: null, /** * The SaveMockArguments to hold arguments when invoking |func_|. * @type {?SaveMockArguments} * @private */ savedArgs_: null, /** * The function to call when invoked. * @type {!Function} * @private */ func_: null, /** * Arguments to pass to |func_| when invoked. * @type {!Array} */ args_: null, /** * Accessor for |func_|. * @return {Function} The function to invoke. */ get func() { return this.func_; }, /** * Called by Mock4JS when using .will() to specify actions for stubs() or * expects(). Clears |savedArgs_| so it can be reused. * @return The results of calling |func_| with the concatenation of * |savedArgs_| and |args_|. */ invoke: function() { var prependArgs = []; if (this.savedArgs_) { prependArgs = this.savedArgs_.arguments.splice(0, this.savedArgs_.arguments.length); } return this.func.apply(this.obj_, prependArgs.concat(this.args_)); }, /** * Describe this action to Mock4JS. * @return {string} A description of this action. */ describe: function() { return 'calls the given function with saved arguments and ' + this.args_; } }; /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {Function} func The function to call when the method is invoked. * @param {...*} var_args Arguments to pass when calling func. * @return {CallFunctionAction} Action for use in will. */ function callFunction(func) { return new CallFunctionAction( null, null, func, Array.prototype.slice.call(arguments, 1)); } /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {SaveMockArguments} savedArgs Arguments saved with this object * are passed to |func|. * @param {Function} func The function to call when the method is invoked. * @param {...*} var_args Arguments to pass when calling func. * @return {CallFunctionAction} Action for use in will. */ function callFunctionWithSavedArgs(savedArgs, func) { return new CallFunctionAction( null, savedArgs, func, Array.prototype.slice.call(arguments, 2)); } /** * CallGlobalAction as a subclass of CallFunctionAction looks up the original * global object in |globalOverrides| using |funcName| as the key. This allows * tests, which need to wait until a global function to be called in order to * start the test to run the original function. When used with runAllActions * or runAllActionsAsync, Mock4JS expectations may call start or continue the * test after calling the original function. * @param {?SaveMockArguments} savedArgs when non-null, saved arguments are * passed to the global function |funcName|. * @param {string} funcName The name of the global function to call. * @param {Array} args Any arguments to pass to func. * @constructor * @extends {CallFunctionAction} * @see globalOverrides */ function CallGlobalAction(savedArgs, funcName, args) { CallFunctionAction.call(this, null, savedArgs, funcName, args); } CallGlobalAction.prototype = { __proto__: CallFunctionAction.prototype, /** * Fetch and return the original global function to call. * @return {Function} The global function to invoke. * @override */ get func() { var func = globalOverrides[this.func_].original; assertNotEquals(undefined, func); return func; }, }; /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {SaveMockArguments} savedArgs Arguments saved with this object * are passed to the global function |funcName|. * @param {string} funcName The name of a registered mock global function to * call when the method is invoked. * @param {...*} var_args Arguments to pass when calling func. * @return {CallGlobalAction} Action for use in Mock4JS will(). */ function callGlobalWithSavedArgs(savedArgs, funcName) { return new CallGlobalAction( savedArgs, funcName, Array.prototype.slice.call(arguments, 2)); } /** * When to call testDone(). * @enum {number} */ var WhenTestDone = { /** * Default for the method called. */ DEFAULT: -1, /** * Never call testDone(). */ NEVER: 0, /** * Call testDone() on assert failure. */ ASSERT: 1, /** * Call testDone() if there are any assert or expect failures. */ EXPECT: 2, /** * Always call testDone(). */ ALWAYS: 3, }; /** * Runs all |actions|. * @param {boolean} isAsync When true, call testDone() on Errors. * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {Array<Object>} actions Actions to run. * @constructor */ function RunAllAction(isAsync, whenTestDone, actions) { this.isAsync_ = isAsync; this.whenTestDone_ = whenTestDone; this.actions_ = actions; } RunAllAction.prototype = { /** * When true, call testDone() on Errors. * @type {boolean} * @private */ isAsync_: false, /** * Call testDone() at appropriate time. * @type {WhenTestDone} * @private * @see WhenTestDone */ whenTestDone_: WhenTestDone.ASSERT, /** * Holds the actions to execute when invoked. * @type {Array} * @private */ actions_: null, /** * Runs all |actions_|, returning the last one. When running in sync mode, * throws any exceptions to be caught by runTest() or * runTestFunction(). Call testDone() according to |whenTestDone_| setting. */ invoke: function() { try { var result; for (var i = 0; i < this.actions_.length; ++i) { result = this.actions_[i].invoke(); } if ((this.whenTestDone_ == WhenTestDone.EXPECT && errors.length) || this.whenTestDone_ == WhenTestDone.ALWAYS) { testDone(); } return result; } catch (e) { if (!(e instanceof Error)) { e = new Error(e.toString()); } if (!this.isAsync_) { throw e; } errors.push(e); if (this.whenTestDone_ != WhenTestDone.NEVER) { testDone(); } } }, /** * Describe this action to Mock4JS. * @return {string} A description of this action. */ describe: function() { return 'Calls all actions: ' + this.actions_; }, }; /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {...Object} var_actions Actions to run. * @return {RunAllAction} Action for use in will. */ function runAllActions() { return new RunAllAction( false, WhenTestDone.NEVER, Array.prototype.slice.call(arguments)); } /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {...Object} var_actions Actions to run. * @return {RunAllAction} Action for use in will. */ function runAllActionsAsync(whenTestDone) { return new RunAllAction( true, whenTestDone, Array.prototype.slice.call(arguments, 1)); } /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * Creates an action for will() that invokes a callback that the tested code * passes to a mocked function. * @param {SaveMockArguments} savedArgs Arguments that will contain the * callback once the mocked function is called. * @param {number} callbackParameter Index of the callback parameter in * |savedArgs|. * @param {...Object} var_args Arguments to pass to the callback. * @return {CallFunctionAction} Action for use in will(). */ function invokeCallback(savedArgs, callbackParameter, var_args) { var callbackArguments = Array.prototype.slice.call(arguments, 2); return callFunction(function() { savedArgs.arguments[callbackParameter].apply(null, callbackArguments); // Mock4JS does not clear the saved args after invocation. // To allow reuse of the same SaveMockArguments for multiple // invocations with similar arguments, clear them here. savedArgs.arguments.splice(0, savedArgs.arguments.length); }); } /** * Mock4JS matcher object that matches the actual argument and the expected * value iff their JSON representations are same. * @param {Object} expectedValue * @constructor */ function MatchJSON(expectedValue) { this.expectedValue_ = expectedValue; } MatchJSON.prototype = { /** * Checks that JSON representation of the actual and expected arguments are * same. * @param {Object} actualArgument The argument to match. * @return {boolean} Result of the comparison. */ argumentMatches: function(actualArgument) { return JSON.stringify(this.expectedValue_) === JSON.stringify(actualArgument); }, /** * Describes the matcher. * @return {string} Description of this Mock4JS matcher. */ describe: function() { return 'eqJSON(' + JSON.stringify(this.expectedValue_) + ')'; }, }; /** * Builds a MatchJSON argument matcher for a given expected value. * @param {Object} expectedValue * @return {MatchJSON} Resulting Mock4JS matcher. */ function eqJSON(expectedValue) { return new MatchJSON(expectedValue); } /** * Mock4JS matcher object that matches the actual argument and the expected * value iff the the string representation of the actual argument is equal to * the expected value. * @param {string} expectedValue * @constructor */ function MatchToString(expectedValue) { this.expectedValue_ = expectedValue; } MatchToString.prototype = { /** * Checks that the the string representation of the actual argument matches * the expected value. * @param {*} actualArgument The argument to match. * @return {boolean} Result of the comparison. */ argumentMatches: function(actualArgument) { return this.expectedValue_ === String(actualArgument); }, /** * Describes the matcher. * @return {string} Description of this Mock4JS matcher. */ describe: function() { return 'eqToString("' + this.expectedValue_ + '")'; }, }; /** * Builds a MatchToString argument matcher for a given expected value. * @param {Object} expectedValue * @return {MatchToString} Resulting Mock4JS matcher. */ function eqToString(expectedValue) { return new MatchToString(expectedValue); } /** * Exports assertion methods. All assertion methods delegate to the chai.js * assertion library. */ function exportChaiAsserts() { exports.assertTrue = assertTrue; exports.assertFalse = assertFalse; exports.assertGE = assertGE; exports.assertGT = assertGT; exports.assertEquals = assertEquals; exports.assertDeepEquals = assertDeepEquals; exports.assertLE = assertLE; exports.assertLT = assertLT; exports.assertNotEquals = assertNotEquals; exports.assertNotReached = assertNotReached; exports.assertThrows = assertThrows; } /** * Exports expect methods. 'expect*' methods allow tests to run until the end * even in the presence of failures. */ function exportExpects() { exports.expectTrue = createExpect(assertTrue); exports.expectFalse = createExpect(assertFalse); exports.expectGE = createExpect(assertGE); exports.expectGT = createExpect(assertGT); exports.expectEquals = createExpect(assertEquals); exports.expectDeepEquals = createExpect(assertDeepEquals); exports.expectLE = createExpect(assertLE); exports.expectLT = createExpect(assertLT); exports.expectNotEquals = createExpect(assertNotEquals); exports.expectNotReached = createExpect(assertNotReached); exports.expectAccessibilityOk = createExpect(assertAccessibilityOk); exports.expectThrows = createExpect(assertThrows); } /** * Exports methods related to Mock4JS mocking. */ function exportMock4JsHelpers() { exports.callFunction = callFunction; exports.callFunctionWithSavedArgs = callFunctionWithSavedArgs; exports.callGlobalWithSavedArgs = callGlobalWithSavedArgs; exports.eqJSON = eqJSON; exports.eqToString = eqToString; exports.invokeCallback = invokeCallback; exports.SaveMockArguments = SaveMockArguments; // Import the Mock4JS helpers. Mock4JS.addMockSupport(exports); } // Exports. testing.Test = Test; exports.testDone = testDone; exportChaiAsserts(); exports.assertAccessibilityOk = assertAccessibilityOk; exportExpects(); exportMock4JsHelpers(); exports.preloadJavascriptLibraries = preloadJavascriptLibraries; exports.setWaitUser = setWaitUser; exports.go = go; exports.registerMessageCallback = registerMessageCallback; exports.registerMockGlobals = registerMockGlobals; exports.registerMockMessageCallbacks = registerMockMessageCallbacks; exports.resetTestState = resetTestState; exports.runAccessibilityAudit = runAccessibilityAudit; exports.runAllActions = runAllActions; exports.runAllActionsAsync = runAllActionsAsync; exports.runTest = runTest; exports.runTestFunction = runTestFunction; exports.DUMMY_URL = DUMMY_URL; exports.TEST = TEST; exports.TEST_F = TEST_F; exports.TEST_F_WITH_PREAMBLE = TEST_F_WITH_PREAMBLE; exports.RUNTIME_TEST_F = TEST_F; exports.GEN = GEN; exports.GEN_INCLUDE = GEN_INCLUDE; exports.WhenTestDone = WhenTestDone; })(this); ; //# sourceURL=file:///b/s/w/ir/chrome/test/data/webui/test_api.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Common testing utilities. /** * Shortcut for document.getElementById. * @param {string} id of the element. * @return {HTMLElement} with the id. */ function $(id) { return document.getElementById(id); } /** * @constructor */ var TestUtils = function() {}; /** * Extracts some inlined html encoded as a comment inside a function, * so you can use it like this: * * this.appendDoc(function() {/*! * <p>Html goes here</p> * * /}); * * @param {Function} commentEncodedHtml The html , embedded as a * comment inside an anonymous function - see example, above. * @param {!Array=} opt_args Optional arguments to be substituted in the form * $0, ... within the code block. * @return {string} The html text. */ TestUtils.extractHtmlFromCommentEncodedString = function( commentEncodedHtml, opt_args) { var stringified = commentEncodedHtml.toString(); if (opt_args) { for (var i = 0; i < opt_args.length; i++) stringified = stringified.replace('$' + i, opt_args[i]); } return stringified.replace(/^[^\/]+\/\*!?/, '').replace(/\*\/[^\/]+$/, ''); }; /** * Creates a data url for a document. * @param {function() : void} doc Snippet wrapped inside of a function. * @return {string} */ TestUtils.createUrlForDoc = function(doc) { var docString = TestUtils.extractHtmlFromCommentEncodedString(doc); return 'data:text/html,<!doctype html>' + encodeURIComponent(TestUtils.collapseWhitespace( docString.replace(/[\n\r]/g, '').trim())); }; /** * Collapses inner whitespace. * @param {string} str * @return {string} */ TestUtils.collapseWhitespace = function(str) { return str.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, ''); }; /** * Similar to |TEST_F|. Generates a test for the given |testFixture|, * |testName|, and |testFunction|. * Used this variant when an |isAsync| fixture wants to temporarily mix in an * sync test. * @param {string} testFixture Fixture name. * @param {string} testName Test name. * @param {function} testFunction The test impl. */ function SYNC_TEST_F(testFixture, testName, testFunction) { TEST_F(testFixture, testName, function() { this.newCallback(testFunction)(); }); } ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/common.js // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Creates wrappers for callbacks and calls testDone() when all callbacks * have been invoked. * @param {testing.Test} fixture */ function CallbackHelper(fixture) { /** @type {Object} fixture */ this.fixture_ = fixture; /** @type {number} */ this.pendingCallbacks_ = 0; } CallbackHelper.prototype = { /** * @param {Function=} opt_callback * @return {Function} */ wrap: function(opt_callback) { var callback = opt_callback || function() {}; var savedArgs = new SaveMockArguments(); var lastCall = null; var completionAction = callFunctionWithSavedArgs(savedArgs, function() { if (lastCall) { throw new Error('Called more than once, first call here: ' + lastCall); } else { lastCall = new Error().stack; } callback.apply(this.fixture_, arguments); if (--this.pendingCallbacks_ <= 0) CallbackHelper.testDone_(); }.bind(this)); // runAllActionsAsync catches exceptions and puts them in the test // framework's list of errors and fails the test if appropriate. var runAll = runAllActionsAsync(WhenTestDone.ASSERT, completionAction); ++this.pendingCallbacks_; return function() { savedArgs.arguments = Array.prototype.slice.call(arguments); runAll.invoke(); }; } }; /** * @private */ CallbackHelper.testDone_ = this.testDone; // Remove testDone for public use since directly using it conflicts with // this callback helper. delete this.testDone; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/callback_helper.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. GEN_INCLUDE(['common.js', 'callback_helper.js']); /** * Base test fixture for ChromeVox end to end tests. * * These tests run against production ChromeVox inside of the extension's * background page context. * @constructor */ function ChromeVoxE2ETest() { this.callbackHelper_ = new CallbackHelper(this); } ChromeVoxE2ETest.prototype = { __proto__: testing.Test.prototype, /** * @override * No UI in the background context. */ runAccessibilityChecks: false, /** @override */ isAsync: true, /** @override */ browsePreload: null, /** @override */ testGenCppIncludes: function() { GEN(` #include "ash/accessibility/accessibility_delegate.h" #include "ash/shell.h" #include "base/bind.h" #include "base/callback.h" #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" #include "chrome/common/extensions/extension_constants.h" `); }, /** @override */ testGenPreamble: function() { GEN(` base::Closure load_cb = base::Bind(&chromeos::AccessibilityManager::EnableSpokenFeedback, base::Unretained(chromeos::AccessibilityManager::Get()), true); WaitForExtension(extension_misc::kChromeVoxExtensionId, load_cb); `); }, /** * Launch a new tab, wait until tab status complete, then run callback. * @param {function() : void} doc Snippet wrapped inside of a function. * @param {function()} callback Called once the document is ready. */ runWithLoadedTab: function(doc, callback) { this.launchNewTabWithDoc(doc, function(tab) { chrome.tabs.onUpdated.addListener(function(tabId, changeInfo) { if (tabId == tab.id && changeInfo.status == 'complete') { callback(tabId); } }); }); }, /** * Launches the given document in a new tab. * @param {function() : void} doc Snippet wrapped inside of a function. * @param {function(url: string)} opt_callback Called once the * document is created. */ runWithTab: function(doc, opt_callback) { var url = TestUtils.createUrlForDoc(doc); var createParams = {active: true, url: url}; chrome.tabs.create(createParams, function(tab) { if (opt_callback) opt_callback(tab.url); }); }, /** * Increment the selected index of a select control. * @param {number} tabId Of the page. * @param {string} elementQueryString */ incrementSelectedIndex: function(tabId, elementQueryString) { var code = TestUtils.extractHtmlFromCommentEncodedString( function() { /*! var target = document.body.querySelector('$0'); target.focus(); target.selectedIndex++; */ }, [elementQueryString]); chrome.tabs.executeScript(tabId, {code: code}); }, /** * Creates a callback that optionally calls {@code opt_callback} when * called. If this method is called one or more times, then * {@code testDone()} will be called when all callbacks have been called. * @param {Function=} opt_callback Wrapped callback that will have its this * reference bound to the test fixture. * @return {Function} */ newCallback: function(opt_callback) { return this.callbackHelper_.wrap(opt_callback); } }; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Include test fixture. GEN_INCLUDE(['chromevox_e2e_test_base.js']); /** * Base test fixture for ChromeVox Next end to end tests. * * These tests are identical to ChromeVoxE2ETests except for performing the * necessary setup to run ChromeVox Next. * @constructor * @extends {ChromeVoxE2ETest} */ function ChromeVoxNextE2ETest() { ChromeVoxE2ETest.call(this); if (this.runtimeDeps.length > 0) { chrome.extension.getViews().forEach(function(w) { this.runtimeDeps.forEach(function(dep) { if (w[dep]) window[dep] = w[dep]; }.bind(this)); }.bind(this)); } // For tests, enable announcement of events we trigger via automation. DesktopAutomationHandler.announceActions = true; this.originalOutputContextValues_ = {}; for (var role in Output.ROLE_INFO_) { this.originalOutputContextValues_[role] = Output.ROLE_INFO_[role]['outputContextFirst']; } } ChromeVoxNextE2ETest.prototype = { __proto__: ChromeVoxE2ETest.prototype, /** * Dependencies defined on a background window other than this one. * @type {!Array<string>} */ runtimeDeps: [], /** * Gets the desktop from the automation API and Launches a new tab with * the given document, and runs |callback| when a load complete fires. * Arranges to call |testDone()| after |callback| returns. * NOTE: Callbacks creatd instide |opt_callback| must be wrapped with * |this.newCallback| if passed to asynchonous calls. Otherwise, the test * will be finished prematurely. * @param {function() : void} doc Snippet wrapped inside of a function. * @param {function(chrome.automation.AutomationNode)} callback * Called once the document is ready. * @param {string=} opt_url Optional url to wait for. Defaults to undefined. */ runWithLoadedTree: function(doc, callback, opt_url) { callback = this.newCallback(callback); chrome.automation.getDesktop(function(r) { var url = opt_url || TestUtils.createUrlForDoc(doc); var listener = function(evt) { if (evt.target.root.url != url) return; if (!evt.target.root.docLoaded) return; r.removeEventListener('focus', listener, true); r.removeEventListener('loadComplete', listener, true); CommandHandler.onCommand('nextObject'); callback && callback(evt.target); callback = null; }; r.addEventListener('focus', listener, true); r.addEventListener('loadComplete', listener, true); var createParams = {active: true, url: url}; chrome.tabs.create(createParams); }.bind(this)); }, listenOnce: function(node, eventType, callback, capture) { var innerCallback = this.newCallback(function() { node.removeEventListener(eventType, innerCallback, capture); callback.apply(this, arguments); }); node.addEventListener(eventType, innerCallback, capture); }, /** * Forces output to place context utterances at the end of output. This eases * rebaselining when changing context ordering for a specific role. */ forceContextualLastOutput: function() { for (var role in Output.ROLE_INFO_) Output.ROLE_INFO_[role]['outputContextFirst'] = undefined; }, /** * Forces output to place context utterances at the beginning of output. */ forceContextualFirstOutput: function() { for (var role in Output.ROLE_INFO_) Output.ROLE_INFO_[role]['outputContextFirst'] = true; }, /** Resets contextual output values to their defaults. */ resetContextualOutput: function() { for (var role in Output.ROLE_INFO_) { Output.ROLE_INFO_[role]['outputContextFirst'] = this.originalOutputContextValues_[role]; } } }; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Asserts that a given argument's value is undefined. * @param {object} a The argument to check. */ function assertUndefined(a) { if (a !== undefined) { throw new Error('Assertion failed: expected undefined'); } } /** * Asserts that the argument is neither null nor undefined. * @param {object} obj The argument to check. * @param {string=} opt_message Error message if the condition is not met. */ function assertNotNullNorUndefined(obj, opt_message) { if (obj === undefined || obj === null) { throw new Error( 'Can\'t be null or undefined: ' + (opt_message || '') + '\n' + 'Actual: ' + obj); } } /** * Asserts that a given function call throws an exception. * @param {string} msg Message to print if exception not thrown. * @param {Function} fn The function to call. * @param {string} error The name of the exception we expect {@code fn} to * throw. */ function assertException(msg, fn, error) { try { fn(); } catch (e) { if (error && e.name != error) { throw new Error( 'Expected to throw ' + error + ' but threw ' + e.name + ' - ' + msg); } return; } throw new Error('Expected to throw exception ' + error + ' - ' + msg); } /** * Asserts that two arrays of strings are equal. * @param {Array<string>} array1 The expected array. * @param {Array<string>} array2 The test array. */ function assertEqualStringArrays(array1, array2) { var same = true; if (array1.length != array2.length) { same = false; } for (var i = 0; i < Math.min(array1.length, array2.length); i++) { if (array1[i].trim() != array2[i].trim()) { same = false; } } if (!same) { throw new Error( 'Expected ' + JSON.stringify(array1) + ', got ' + JSON.stringify(array2)); } } /** * Asserts that two objects have the same JSON serialization. * @param {Object} expected The expected object. * @param {Object} actual The actual object. * @param {string=} opt_message Message used for errors. */ function assertEqualsJSON(expected, actual, opt_message) { if (JSON.stringify(actual) !== JSON.stringify(expected)) { throw new Error( (opt_message ? opt_message + '\n' : '') + 'Expected ' + JSON.stringify(expected) + '\n' + 'Got ' + JSON.stringify(actual)); } } /** * Asserts that two ArrayBuffers have the same content. * @param {ArrayBuffer} arrayBufA The expected ArrayBuffer. * @param {ArrayBuffer} arrayBufB The test ArrayBuffer. */ function assertArrayBuffersEquals(arrayBufA, arrayBufB) { var view1 = new Uint8Array(arrayBufA); var view2 = new Uint8Array(arrayBufB); assertEquals(JSON.stringify(view1), JSON.stringify(view2)); } /** * Asserts that two Arrays have the same content. * @param {ArrayBuffer} arrayA The expected array. * @param {ArrayBuffer} arrayB The test array. */ function assertArraysEquals(arrayA, arrayB) { assertEquals(JSON.stringify(arrayA), JSON.stringify(arrayB)); } /** * Asserts and fails immediately once called. */ function assertNotReached() { assertFalse(true); } /** * Asserts an actual DOM equals an expected stringified DOM. * @param {string} expected * @param {Node} actual */ function assertEqualsDOM(expected, actual) { expected = expected.replace(/>\s+</gm, '><').trim(/\s/gm); var actualStr = actual.outerHTML; actualStr = actualStr.replace(/>\s+</gm, '><').trim(/\s/gm); for (var i = 0; i < expected.length; i++) assertEquals( expected[i], actualStr[i], 'Mismatch at index ' + i + ' in expected:\n' + expected + '\nactual:\n' + actualStr + '\n'); } assertSame = assertEquals; assertNotSame = assertNotEquals; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/assert_additions.js // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview This file contains the |MockFeedback| class which is * a combined mock class for speech, braille, and earcon feedback. A * test that uses this class may add expectations for speech * utterances, braille display content to be output, and earcons * played (by name). The |install| method sets appropriate mock * classes as the |cvox.ChromeVox.tts|, |cvox.ChromeVox.braille| and * |cvox.ChromeVox.earcons| objects, respectively. Output sent to * those objects will then be collected in an internal queue. * * Expectations can be added using the |expectSpeech|, * |expectBraille|, and |expectEarcon| methods. These methods take * either strings or regular expressions to match against. Strings * must match a full utterance (or display content) exactly, while a * regular expression must match a substring (use anchor operators if * needed). * * Function calls may be inserted in the stream of expectations using the * |call| method. Such callbacks are called after all preceding expectations * have been met, and before any further expectations are matched. Callbacks * are called in the order they were added to the mock. * * The |replay| method starts processing any pending utterances, * braille display content, and earcons and will try to match * expectations as new feedback enters the queue asynchronously. When * all expectations have been met and callbacks called, the finish * callback, if any was provided to the constructor, is called. * * This mock class is lean, meaning that feedback that doesn't match * any expectations is silently ignored. * * NOTE: for asynchronous tests, the processing will never finish if there * are unmet expectations. To help debugging in such situations, the mock * will output its pending state if there are pending expectations and no * output is received within a few seconds. * * See mock_feedback_test.js for example usage of this class. */ /** * Combined mock class for braille and speech output. * @param {function=} opt_finishedCallback Called when all expectations have * been met. * @constructor */ var MockFeedback = function(opt_finishedCallback) { /** * @type {function} * @private */ this.finishedCallback_ = opt_finishedCallback || null; /** * True when |replay| has been called and actions are being replayed. * @type {boolean} * @private */ this.replaying_ = false; /** * True when inside the |process| function to prevent nested calls. * @type {boolean} * @private */ this.inProcess_ = false; /** * Pending expectations and callbacks. * @type {Array<{perform: function(): boolean, toString: function(): string}>} * @private */ this.pendingActions_ = []; /** * Pending speech utterances. * @type {Array<{text: string, callback: (function|undefined)}>} * @private */ this.pendingUtterances_ = []; /** * Pending braille output. * @type {Array<{text: string, callback: (function|undefined)}>} * @private */ this.pendingBraille_ = []; /** * Pending earcons. * @type {Array<{text: string, callback: (function|undefined)}>} * @private */ this.pendingEarcons_ = []; /** * Handle for the timeout set for debug logging. * @type {number} * @private */ this.logTimeoutId_ = 0; /** * @type {cvox.NavBraille} * @private */ this.lastMatchedBraille_ = null; }; MockFeedback.prototype = { /** * Install mock objects as |cvox.ChromeVox.tts| and |cvox.ChromeVox.braille| * to collect feedback. */ install: function() { assertFalse(this.replaying_); var MockTts = function() {}; MockTts.prototype = { __proto__: cvox.TtsInterface.prototype, speak: this.addUtterance_.bind(this) }; cvox.ChromeVox.tts = new MockTts(); var MockBraille = function() {}; MockBraille.prototype = { __proto__: cvox.BrailleInterface.prototype, write: this.addBraille_.bind(this) }; cvox.ChromeVox.braille = new MockBraille(); var MockEarcons = function() {}; MockEarcons.prototype = { __proto__: cvox.AbstractEarcons.prototype, playEarcon: this.addEarcon_.bind(this) }; // cvox.ChromeVox.earcons is a getter that switches between Classic and // Next; replace it with MockEarcons. delete cvox.ChromeVox.earcons; cvox.ChromeVox.earcons = new MockEarcons(); }, /** * Adds an expectation for one or more spoken utterances. * @param {...(string|RegExp)} var_args One or more utterance to add as * expectations. * @return {MockFeedback} |this| for chaining */ expectSpeech: function() { assertFalse(this.replaying_); Array.prototype.forEach.call(arguments, function(text) { this.pendingActions_.push({ perform: function() { return !!MockFeedback.matchAndConsume_( text, {}, this.pendingUtterances_); }.bind(this), toString: function() { return 'Speak \'' + text + '\''; } }); }.bind(this)); return this; }, /** * Adds an expectation for one spoken utterance that will be enqueued * with a given queue mode. * @param {string|RegExp} text One utterance expectation. * @param {cvox.QueueMode} queueMode The expected queue mode. * @return {MockFeedback} |this| for chaining */ expectSpeechWithQueueMode: function(text, queueMode) { assertFalse(this.replaying_); this.pendingActions_.push({ perform: function() { return !!MockFeedback.matchAndConsume_( text, {queueMode: queueMode}, this.pendingUtterances_); }.bind(this), toString: function() { return 'Speak \'' + text + '\' with mode ' + queueMode; } }); return this; }, /** * Adds an expectation for one spoken utterance that will be queued. * @param {string|RegExp} text One utterance expectation. * @return {MockFeedback} |this| for chaining */ expectQueuedSpeech: function(text) { return this.expectSpeechWithQueueMode(text, cvox.QueueMode.QUEUE); }, /** * Adds an expectation for one spoken utterance that will be flushed. * @param {string|RegExp} text One utterance expectation. * @return {MockFeedback} |this| for chaining */ expectFlushingSpeech: function(text) { return this.expectSpeechWithQueueMode(text, cvox.QueueMode.FLUSH); }, /** * Adds an expectation for one spoken utterance that will be queued * with the category flush mode. * @param {string|RegExp} text One utterance expectation. * @return {MockFeedback} |this| for chaining */ expectCategoryFlushSpeech: function(text) { return this.expectSpeechWithQueueMode(text, cvox.QueueMode.CATEGORY_FLUSH); }, /** * Adds expectations for spoken utterances with specified language. * @param {string} language The expected output language for utterances. * @param {...(string)} rest One or more utterances to add as expectations. * @return {MockFeedback} |this| for chaining */ expectSpeechWithLanguage: function(language, ...rest) { assertFalse(this.replaying_); Array.prototype.forEach.call(rest, function(text) { this.pendingActions_.push({ perform: function() { return !!MockFeedback.matchAndConsume_( text, {lang: language}, this.pendingUtterances_); }.bind(this), toString: function() { return 'Speak \'' + text + '\' with language ' + language; } }); }.bind(this)); return this; }, /** * Adds an expectation that the next spoken utterances do *not* match * the given arguments. * * This is only guaranteed to work for the immediately following utterance. * If you use it to check an utterance other than the immediately following * one the results may be flaky. * * @param {...(string|RegExp)} var_args One or more utterance to add as * negative expectations. * @return {MockFeedback} |this| for chaining */ expectNextSpeechUtteranceIsNot: function() { assertFalse(this.replaying_); Array.prototype.forEach.call(arguments, function(text) { this.pendingActions_.push({ perform: function() { if (this.pendingUtterances_.length == 0) return false; if (MockFeedback.matchAndConsume_( text, {}, this.pendingUtterances_)) { throw new Error('Got disallowed utterance "' + text + '".'); } return true; }.bind(this), toString: function() { return 'Do not speak \'' + text + '\''; } }); }.bind(this)); return this; }, /** * Adds an expectation for braille output. * @param {string|RegExp} text * @param {Object=} opt_props Additional properties to match in the * |NavBraille| * @return {MockFeedback} |this| for chaining */ expectBraille: function(text, opt_props) { assertFalse(this.replaying_); var props = opt_props || {}; this.pendingActions_.push({ perform: function() { var match = MockFeedback.matchAndConsume_(text, props, this.pendingBraille_); if (match) this.lastMatchedBraille_ = match; return !!match; }.bind(this), toString: function() { return 'Braille \'' + text + '\' ' + JSON.stringify(props); } }); return this; }, /** * Adds an expectation for a played earcon. * @param {string} earconName The name of the earcon. * @return {MockFeedback} |this| for chaining */ expectEarcon: function(earconName, opt_props) { assertFalse(this.replaying_); this.pendingActions_.push({ perform: function() { var match = MockFeedback.matchAndConsume_(earconName, {}, this.pendingEarcons_); return !!match; }.bind(this), toString: function() { return 'Earcon \'' + earconName + '\''; } }); return this; }, /** * Arranges for a callback to be invoked when all expectations that were * added before this call have been met. Callbacks are called in the * order they are added. * @param {Function} callback * @return {MockFeedback} |this| for chaining */ call: function(callback) { assertFalse(this.replaying_); this.pendingActions_.push({ perform: function() { callback(); return true; }, toString: function() { return 'Callback'; } }); return this; }, /** * Clears all pending output. Useful in cases where previous output might * overlap with future expectations. * @return {MockFeedback} |this| for chaining */ clearPendingOutput: function() { this.call(function() { this.pendingUtterances_.length = 0; this.pendingBraille_.length = 0; this.pendingEarcons_.length = 0; }.bind(this)); return this; }, /** * Processes any feedback that has been received so far and treis to * satisfy the registered expectations. Any feedback that is received * after this call (via the installed mock objects) is processed immediately. * When all expectations are satisfied and registered callbacks called, * the finish callbcak, if any, is called. * This function may only be called once. */ replay: function() { assertFalse(this.replaying_); this.replaying_ = true; this.process_(); }, /** * Returns the |NavBraille| that matched an expectation. This is * intended to be used by a callback to invoke braille commands that * depend on display contents. * @type {cvox.NavBraille} */ get lastMatchedBraille() { assertTrue(this.replaying_); return this.lastMatchedBraille_; }, /** * @param {string} textString * @param {cvox.QueueMode} queueMode * @param {Object=} properties * @private */ addUtterance_: function(textString, queueMode, properties) { var callback; if (properties && (properties.startCallback || properties.endCallback)) { var startCallback = properties.startCallback; var endCallback = properties.endCallback; callback = function() { startCallback && startCallback(); endCallback && endCallback(); }; } this.pendingUtterances_.push({ text: textString, queueMode: queueMode, lang: properties ? properties['lang'] : undefined, callback: callback }); this.process_(); }, /** @private */ addBraille_: function(navBraille) { this.pendingBraille_.push(navBraille); this.process_(); }, /** @private */ addEarcon_: function(earconName) { this.pendingEarcons_.push({text: earconName}); this.process_(); }, /*** @private */ process_: function() { if (!this.replaying_ || this.inProcess_) return; try { this.inProcess_ = true; while (this.pendingActions_.length > 0) { var action = this.pendingActions_[0]; if (action.perform()) { this.pendingActions_.shift(); if (this.logTimeoutId_) { window.clearTimeout(this.logTimeoutId_); this.logTimeoutId_ = 0; } } else { break; } } if (this.pendingActions_.length == 0) { if (this.finishedCallback_) { this.finishedCallback_(); this.finishedCallback_ = null; } } else { // If there are pending actions and no matching feedback for a few // seconds, log the pending state to ease debugging. if (!this.logTimeoutId_) { this.logTimeoutId_ = window.setTimeout(this.logPendingState_.bind(this), 2000); } } } finally { this.inProcess_ = false; } }, /** @private */ logPendingState_: function() { if (this.pendingActions_.length > 0) console.log('Still waiting for ' + this.pendingActions_[0].toString()); function logPending(desc, list) { if (list.length > 0) console.log( 'Pending ' + desc + ':\n ' + list.map(function(i) { var ret = '\'' + i.text + '\''; if ('startIndex' in i) ret += ' startIndex=' + i.startIndex; if ('endIndex' in i) ret += ' endIndex=' + i.endIndex; return ret; }) .join('\n ') + '\n '); } logPending('speech utterances', this.pendingUtterances_); logPending('braille', this.pendingBraille_); logPending('earcons', this.pendingEarcons_); this.logTimeoutId_ = 0; }, }; /** * @param {string} text * @param {Object} props * @param {Array<{text: (string|RegExp), callback: (function|undefined)}>} * pending * @return {Object} * @private */ MockFeedback.matchAndConsume_ = function(text, props, pending) { for (var i = 0, candidate; candidate = pending[i]; ++i) { var candidateText = candidate.text; if (typeof(candidateText) != 'string') candidateText = candidateText.toString(); if (text === candidateText || (text instanceof RegExp && text.test(candidateText)) || (typeof (text) == 'function' && text(candidate))) { var matched = true; for (prop in props) { if (candidate[prop] !== props[prop]) { matched = false; break; } } if (matched) break; } } if (candidate) { var consumed = pending.splice(0, i + 1); consumed.forEach(function(item) { if (item.callback) item.callback(); }); } return candidate; }; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/mock_feedback.js // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Include test fixture. GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js', '../../testing/assert_additions.js']); GEN_INCLUDE(['../../testing/mock_feedback.js']); /** * Test fixture for editing tests. * @constructor * @extends {ChromeVoxNextE2ETest} */ function ChromeVoxEditingTest() { ChromeVoxNextE2ETest.call(this); window.RoleType = chrome.automation.RoleType; } ChromeVoxEditingTest.prototype = { __proto__: ChromeVoxNextE2ETest.prototype, /** * @return {!MockFeedback} */ createMockFeedback: function() { var mockFeedback = new MockFeedback(this.newCallback(), this.newCallback.bind(this)); mockFeedback.install(); return mockFeedback; }, press: function(keyCode, modifiers) { return function() { BackgroundKeyboardHandler.sendKeyPress(keyCode, modifiers); }; }, }; var doc = function() {/*! <label for='singleLine'>singleLine</label> <input type='text' id='singleLine' value='Single line field'><br> <label for='textarea'>textArea</label> <textarea id='textarea'> Line 1&#xa; line 2&#xa; line 3 </textarea> */}; TEST_F('ChromeVoxEditingTest', 'Focus', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(doc, function(root) { var singleLine = root.find({role: RoleType.TEXT_FIELD, attributes: {name: 'singleLine'}}); var textarea = root.find({role: RoleType.TEXT_FIELD, attributes: {name: 'textArea'}}); singleLine.focus(); mockFeedback .expectSpeech('singleLine', 'Single line field', 'Edit text') .expectBraille('singleLine Single line field ed', {startIndex: 11, endIndex: 11}) .call(textarea.focus.bind(textarea)) .expectSpeech('textArea', 'Line 1\nline 2\nline 3', 'Text area') .expectBraille('textArea Line 1\nline 2\nline 3 mled', {startIndex: 9, endIndex: 9}); mockFeedback.replay(); }); }); TEST_F('ChromeVoxEditingTest', 'Multiline', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(doc, function(root) { var textarea = root.find({role: RoleType.TEXT_FIELD, attributes: {name: 'textArea'}}); textarea.focus(); mockFeedback .expectSpeech('textArea', 'Line 1\nline 2\nline 3', 'Text area') .expectBraille('textArea Line 1\nline 2\nline 3 mled', {startIndex: 9, endIndex: 9}) .call(textarea.setSelection.bind(textarea, 1, 1)) .expectSpeech('i') .expectBraille('Line 1\nmled', {startIndex: 1, endIndex: 1}) .call(textarea.setSelection.bind(textarea, 7, 7)) .expectSpeech('line 2') .expectBraille('line 2\n', {startIndex: 0, endIndex: 0}) .call(textarea.setSelection.bind(textarea, 7, 13)) .expectSpeech('line 2', 'selected') .expectBraille('line 2\n', {startIndex: 0, endIndex: 6}); mockFeedback.replay(); }); }); TEST_F('ChromeVoxEditingTest', 'TextButNoSelectionChange', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( function() {/*! <h1>Test doc</h1> <input type='text' id='input' value='text1'> <!-- We don't seem to get an event in js when the automation setSelection function is called, so poll for the actual change. --> <script> var timer; var input = document.getElementById('input'); function poll(e) { if (input.selectionStart == 0) return; console.log('TIM' + 'ER'); input.value = 'text2'; window.clearInterval(timer); } timer = window.setInterval(poll, 200); </script> */}, function(root) { var input = root.find({role: RoleType.TEXT_FIELD}); input.focus(); mockFeedback .expectSpeech('text1', 'Edit text') .expectBraille('text1 ed', {startIndex: 0, endIndex: 0}) .call(input.setSelection.bind(input, 5, 5)) .expectBraille('text2 ed', {startIndex: 5, endIndex: 5}) mockFeedback.replay(); }); }); TEST_F('ChromeVoxEditingTest', 'RichTextMoveByLine', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div role="textbox" contenteditable> <h2>hello</h2> <div><br></div> <p>This is a <a href="#test">test</a> of rich text</p> </div> <button id="go">Go</button> <script> var dir = 'forward'; var line = 0; document.getElementById('go').addEventListener('click', function() { var sel = getSelection(); sel.modify('move', dir, 'line'); if (dir == 'forward') line++; else line--; if (line == 0) dir = 'forward'; if (line == 2) dir = 'backward'; }, true); </script> */}, function(root) { var input = root.find({role: RoleType.TEXT_FIELD}); var go = root.find({role: RoleType.BUTTON}); var moveByLine = go.doDefault.bind(go); this.listenOnce(input, 'focus', function() { mockFeedback.call(moveByLine) .expectSpeech('\n') .expectBraille('\n') .call(moveByLine) .expectSpeech('This is a ', 'test', 'Link', ' of rich text') .expectBraille('This is a test of rich text') .call(moveByLine) .expectSpeech('\n') .expectBraille('\n') .call(moveByLine) .expectSpeech('hello', 'Heading 2') .expectBraille('hello h2 mled') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'RichTextMoveByCharacter', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div role="textbox" contenteditable>This <b>is</b> a test.</div> <button id="go">Go</button> <script> var dir = 'forward'; var char = 0; document.getElementById('go').addEventListener('click', function() { var sel = getSelection(); sel.modify('move', dir, 'character'); if (dir == 'forward') char++; else char--; if (char == 0) dir = 'forward'; if (line == 16) dir = 'backward'; }, true); </script> */}, function(root) { var input = root.find({role: RoleType.TEXT_FIELD}); var go = root.find({role: RoleType.BUTTON}); var moveByChar = go.doDefault.bind(go); var lineText = 'This is a test. mled'; this.listenOnce(input, 'focus', function() { mockFeedback.call(moveByChar) .expectSpeech('h') .expectBraille(lineText, { startIndex: 1, endIndex: 1 }) .call(moveByChar) .expectSpeech('i') .expectBraille(lineText, { startIndex: 2, endIndex: 2 }) .call(moveByChar) .expectSpeech('s') .expectBraille(lineText, { startIndex: 3, endIndex: 3 }) .call(moveByChar) .expectSpeech(' ') .expectBraille(lineText, { startIndex: 4, endIndex: 4 }) .call(moveByChar) .expectSpeech('i') .expectSpeech('Bold start') .expectBraille(lineText, { startIndex: 5, endIndex: 5 }) .call(moveByChar) .expectSpeech('s') .expectSpeech('Bold end') .expectBraille(lineText, { startIndex: 6, endIndex: 6 }) .call(moveByChar) .expectSpeech(' ') .expectBraille(lineText, { startIndex: 7, endIndex: 7 }) .call(moveByChar) .expectSpeech('a') .expectBraille(lineText, { startIndex: 8, endIndex: 8 }) .call(moveByChar) .expectSpeech(' ') .expectBraille(lineText, { startIndex: 9, endIndex: 9 }) .replay(); }); input.focus(); }); }); // Tests specifically for cursor workarounds. TEST_F('ChromeVoxEditingTest', 'RichTextMoveByCharacterNodeWorkaround', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div role="textbox" contenteditable>hello <b>world</b></div> <button id="go">Go</button> <script> document.getElementById('go').addEventListener('click', function() { var sel = getSelection(); sel.modify('move', 'forward', 'character'); }, true); </script> */}, function(root) { var input = root.find({role: RoleType.TEXT_FIELD}); var go = root.find({role: RoleType.BUTTON}); var moveByChar = go.doDefault.bind(go); var lineText = 'hello world mled'; this.listenOnce(input, 'focus', function() { mockFeedback.call(moveByChar) .expectSpeech('e') .expectBraille(lineText, { startIndex: 1, endIndex: 1 }) .call(moveByChar) .expectSpeech('l') .expectBraille(lineText, { startIndex: 2, endIndex: 2 }) .call(moveByChar) .expectSpeech('l') .expectBraille(lineText, { startIndex: 3, endIndex: 3 }) .call(moveByChar) .expectSpeech('o') .expectBraille(lineText, { startIndex: 4, endIndex: 4 }) .call(moveByChar) .expectSpeech(' ') .expectBraille(lineText, { startIndex: 5, endIndex: 5 }) .call(moveByChar) .expectSpeech('w') .expectBraille(lineText, { startIndex: 6, endIndex: 6 }) .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'RichTextMoveByCharacterEndOfLine', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div role="textbox" contenteditable>Test</div> <button id="go">Go</button> <script> document.getElementById('go').addEventListener('click', function() { var sel = getSelection(); sel.modify('move', 'forward', 'character'); }, true); </script> */}, function(root) { var input = root.find({role: RoleType.TEXT_FIELD}); var go = root.find({role: RoleType.BUTTON}); var moveByChar = go.doDefault.bind(go); var lineText = 'Test mled'; this.listenOnce(input, 'focus', function() { mockFeedback.call(moveByChar) .expectSpeech('e') .expectBraille(lineText, { startIndex: 1, endIndex: 1 }) .call(moveByChar) .expectSpeech('s') .expectBraille(lineText, { startIndex: 2, endIndex: 2 }) .call(moveByChar) .expectSpeech('t') .expectBraille(lineText, { startIndex: 3, endIndex: 3 }) .call(moveByChar) .expectSpeech('\n') .expectBraille(lineText, { startIndex: 4, endIndex: 4 }) .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'RichTextLinkOutput', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div role="textbox" contenteditable>a <a href="#">test</a></div> <button id="go">Go</button> <script> document.getElementById('go').addEventListener('click', function() { var sel = getSelection(); sel.modify('move', 'forward', 'character'); }, true); </script> */}, function(root) { var input = root.find({role: RoleType.TEXT_FIELD}); var go = root.find({role: RoleType.BUTTON}); var moveByChar = go.doDefault.bind(go); var lineText = 'a test mled'; var lineOnLinkText = 'a test lnk mled'; this.listenOnce(input, 'focus', function() { mockFeedback.call(moveByChar) .expectSpeech(' ') .expectBraille(lineText, { startIndex: 1, endIndex: 1 }) .call(moveByChar) .expectSpeech('t') .expectSpeech('Link start') .expectSpeech('Underline start') .expectBraille(lineOnLinkText, { startIndex: 2, endIndex: 2 }) .call(moveByChar) .expectSpeech('e') .expectBraille(lineOnLinkText, { startIndex: 3, endIndex: 3 }) .call(moveByChar) .expectSpeech('s') .expectBraille(lineOnLinkText, { startIndex: 4, endIndex: 4 }) .call(moveByChar) .expectSpeech('t') .expectSpeech('Link end') .expectSpeech('Underline end') .expectBraille(lineOnLinkText, { startIndex: 5, endIndex: 5 }) .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'RichTextExtendByCharacter', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div role="textbox" contenteditable>Te<br>st</div> <button id="go">Go</button> <script> document.getElementById('go').addEventListener('click', function() { var sel = getSelection(); sel.modify('extend', 'forward', 'character'); }, true); </script> */}, function(root) { var input = root.find({role: RoleType.TEXT_FIELD}); var go = root.find({role: RoleType.BUTTON}); var moveByChar = go.doDefault.bind(go); this.listenOnce(input, 'focus', function() { mockFeedback.call(moveByChar) .expectSpeech('T', 'selected') .call(moveByChar) .expectSpeech('e', 'added to selection') .call(moveByChar) .expectSpeech('selected') .call(moveByChar) // This gets described by the line logic in EditableLine. .expectSpeech('s', 'selected') .call(moveByChar) .expectSpeech('t', 'added to selection') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'RichTextImageByCharacter', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <p contenteditable> <img alt="dog"></img> is a <img alt="cat"</img> test </p> <button id="go">Go</button> <script> document.getElementById('go').addEventListener('click', function() { var sel = getSelection(); sel.modify('move', 'forward', 'character'); }, true); </script> */}, function(root) { var input = root.find({role: RoleType.PARAGRAPH}); var go = root.find({role: RoleType.BUTTON}); var moveByChar = go.doDefault.bind(go); this.listenOnce(input, 'focus', function() { var lineText = 'dog is a cat test mled'; var lineOnDogText = 'dog img is a cat test mled'; var lineOnCatText = 'dog is a cat img test'; mockFeedback // This is initial output from focusing the contenteditable (which has // no role). .expectSpeech('dog', 'Image', ' is a ', 'cat', 'Image', ' test') .expectBraille('dog img is a cat img test') .clearPendingOutput() .call(moveByChar) .expectSpeech('dog', 'Image') .expectBraille(lineOnDogText, {startIndex: 1, endIndex: 1}) .call(moveByChar) .expectSpeech('og ') .expectBraille(lineText, {startIndex: 4, endIndex: 4}) .call(moveByChar) .expectSpeech('s') .expectBraille(lineText, {startIndex: 5, endIndex: 5}) .call(moveByChar) .expectSpeech(' ') .expectBraille(lineText, {startIndex: 6, endIndex: 6}) .call(moveByChar) .expectSpeech('a') .expectBraille(lineText, {startIndex: 7, endIndex: 7}) .call(moveByChar) .expectSpeech(' ') .expectBraille(lineText, {startIndex: 8, endIndex: 8}) .call(moveByChar) // This is technically wrong because we're actually over the entire // image. This is broken because of bad node offsets. .expectSpeech('c') .expectBraille(lineOnCatText, {startIndex: 9, endIndex: 9}) // Unfortunately, the node offset being wrong here means there's no // output for the next character move. Fix Once node offsets get fixed // in Blink. .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'RichTextSelectByLine', function() { var mockFeedback = this.createMockFeedback(); // Use digit strings like "11111" and "22222" because the character widths // of digits are always the same. This means the test can move down one line // middle of "11111" and reliably hit a given character position in "22222", // regardless of font configuration. https://crbug.com/898213 this.runWithLoadedTree(function() {/*! <div> <button id="go">Go</button> </div> <p contenteditable> 11111 line<br> 22222 line<br> 33333 line<br> </p> <script> var commands = [ ['extend', 'forward', 'character'], ['extend', 'forward', 'character'], ['extend', 'forward', 'line'], ['extend', 'forward', 'line'], ['extend', 'backward', 'line'], ['extend', 'backward', 'line'], ['extend', 'forward', 'documentBoundary'], ['move', 'forward', 'character'], ['move', 'backward', 'character'], ['move', 'backward', 'character'], ['extend', 'backward', 'line'], ['extend', 'backward', 'line'], ['extend', 'forward', 'line'], ]; document.getElementById('go').addEventListener('click', function() { var sel = getSelection(); sel.modify.apply(sel, commands.shift()); }, true); </script> */}, function(root) { var input = root.find({role: RoleType.PARAGRAPH}); var go = root.find({role: RoleType.BUTTON}); var move = go.doDefault.bind(go); this.listenOnce(input, 'focus', function() { // By character. mockFeedback.call(move) .expectSpeech('1', 'selected') .expectBraille('11111 line\nmled', {startIndex: 0, endIndex: 1}) .call(move) .expectSpeech('1', 'added to selection') .expectBraille('11111 line\nmled', {startIndex: 0, endIndex: 2}) // Forward selection. // Growing. // By line (notice the partial selections from the first and second // lines). .call(move) .expectSpeech('111 line \n 22', 'selected') .expectBraille('22222 line\n', {startIndex: 0, endIndex: 2}) .call(move) .expectSpeech('222 line \n 33', 'selected') .expectBraille('33333 line\n', {startIndex: 0, endIndex: 2}) // Shrinking. .call(move) .expectSpeech('222 line \n 33', 'unselected') .expectBraille('22222 line\n', {startIndex: 0, endIndex: 2}) .call(move) .expectSpeech('11', 'selected') .expectBraille('11111 line\nmled', {startIndex: 0, endIndex: 2}) // Document boundary. .call(move) .expectSpeech('111 line \n 22222 line \n 33333 line \n \n', 'selected') .expectBraille('33333 line\n', {startIndex: 0, endIndex: 10}) // The script repositions the caret to the 'n' of the third line. .call(move) .expectSpeech('33333 line') .expectBraille('33333 line\n', {startIndex: 10, endIndex: 10}) .call(move) .expectSpeech('e') .expectBraille('33333 line\n', {startIndex: 9, endIndex: 9}) .call(move) .expectSpeech('n') .expectBraille('33333 line\n', {startIndex: 8, endIndex: 8}) // Backward selection. // Growing. .call(move) .expectSpeech('ne \n 33333 li', 'selected') .expectBraille('22222 line\n', {startIndex: 8, endIndex: 11}) .call(move) .expectSpeech('ne \n 22222 li', 'selected') .expectBraille('11111 line\n', {startIndex: 8, endIndex: 11}) // Shrinking. .call(move) .expectSpeech('ne \n 22222 li', 'unselected') .expectBraille('22222 line\n', {startIndex: 8, endIndex: 11}) .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'EditableLineOneStaticText', function() { this.runWithLoadedTree(function() {/*! <p contenteditable style="word-spacing:100000px">this is a test</p> */}, function(root) { var staticText = root.find({role: RoleType.STATIC_TEXT}); var e = new editing.EditableLine(staticText, 0, staticText, 0); assertEquals('this ', e.text); assertEquals(0, e.startOffset); assertEquals(0, e.endOffset); assertEquals(0, e.localStartOffset); assertEquals(0, e.localEndOffset); assertEquals(0, e.containerStartOffset); assertEquals(4, e.containerEndOffset); e = new editing.EditableLine(staticText, 1, staticText, 1); assertEquals('this ', e.text); assertEquals(1, e.startOffset); assertEquals(1, e.endOffset); assertEquals(1, e.localStartOffset); assertEquals(1, e.localEndOffset); assertEquals(0, e.containerStartOffset); assertEquals(4, e.containerEndOffset); e = new editing.EditableLine(staticText, 5, staticText, 5); assertEquals('is ', e.text); assertEquals(0, e.startOffset); assertEquals(0, e.endOffset); assertEquals(5, e.localStartOffset); assertEquals(5, e.localEndOffset); assertEquals(0, e.containerStartOffset); assertEquals(2, e.containerEndOffset); e = new editing.EditableLine(staticText, 7, staticText, 7); assertEquals('is ', e.text); assertEquals(2, e.startOffset); assertEquals(2, e.endOffset); assertEquals(7, e.localStartOffset); assertEquals(7, e.localEndOffset); assertEquals(0, e.containerStartOffset); assertEquals(2, e.containerEndOffset); }); }); TEST_F('ChromeVoxEditingTest', 'EditableLineTwoStaticTexts', function() { this.runWithLoadedTree(function() {/*! <p contenteditable>hello <b>world</b></p> */}, function(root) { var text = root.find({role: RoleType.STATIC_TEXT}); var bold = text.nextSibling; var e = new editing.EditableLine(text, 0, text, 0); assertEquals('hello world', e.text); assertEquals(0, e.startOffset); assertEquals(0, e.endOffset); assertEquals(0, e.localStartOffset); assertEquals(0, e.localEndOffset); assertEquals(0, e.containerStartOffset); assertEquals(5, e.containerEndOffset); e = new editing.EditableLine(text, 5, text, 5); assertEquals('hello world', e.text); assertEquals(5, e.startOffset); assertEquals(5, e.endOffset); assertEquals(5, e.localStartOffset); assertEquals(5, e.localEndOffset); assertEquals(0, e.containerStartOffset); assertEquals(5, e.containerEndOffset); e = new editing.EditableLine(bold, 0, bold, 0); assertEquals('hello world', e.text); assertEquals(6, e.startOffset); assertEquals(6, e.endOffset); assertEquals(0, e.localStartOffset); assertEquals(0, e.localEndOffset); assertEquals(6, e.containerStartOffset); assertEquals(10, e.containerEndOffset); e = new editing.EditableLine(bold, 4, bold, 4); assertEquals('hello world', e.text); assertEquals(10, e.startOffset); assertEquals(10, e.endOffset); assertEquals(4, e.localStartOffset); assertEquals(4, e.localEndOffset); assertEquals(6, e.containerStartOffset); assertEquals(10, e.containerEndOffset); }); }); TEST_F('ChromeVoxEditingTest', 'EditableLineEquality', function() { this.runWithLoadedTree(function() {/*! <div contenteditable role="textbox"> <p style="word-spacing:100000px">this is a test</p> <p>hello <b>world</b></p> </div> */}, function(root) { var thisIsATest = root.findAll({role: RoleType.PARAGRAPH})[0].firstChild; var hello = root.findAll({role: RoleType.PARAGRAPH})[1].firstChild; var world = root.findAll({role: RoleType.PARAGRAPH})[1].lastChild; // The same position -- sanity check. var e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 0); assertEquals('this ', e1.text); assertTrue(e1.isSameLine(e1)); // Offset into the same soft line. var e2 = new editing.EditableLine(thisIsATest, 1, thisIsATest, 1); assertTrue(e1.isSameLine(e2)); // Boundary. e2 = new editing.EditableLine(thisIsATest, 4, thisIsATest, 4); assertTrue(e1.isSameLine(e2)); // Offsets into different soft lines. e2 = new editing.EditableLine(thisIsATest, 5, thisIsATest, 5); assertEquals('is ', e2.text); assertFalse(e1.isSameLine(e2)); // Sanity check; second soft line. assertTrue(e2.isSameLine(e2)); // Different offsets into second soft line. e1 = new editing.EditableLine(thisIsATest, 6, thisIsATest, 6); assertTrue(e1.isSameLine(e2)); // Boundary. e1 = new editing.EditableLine(thisIsATest, 7, thisIsATest, 7); assertTrue(e1.isSameLine(e2)); // Third line. e1 = new editing.EditableLine(thisIsATest, 8, thisIsATest, 8); assertEquals('a ', e1.text); assertFalse(e1.isSameLine(e2)); // Last line. e2 = new editing.EditableLine(thisIsATest, 10, thisIsATest, 10); assertEquals('test', e2.text); assertFalse(e1.isSameLine(e2)); // Boundary. e1 = new editing.EditableLine(thisIsATest, 13, thisIsATest, 13); assertTrue(e1.isSameLine(e2)); // Cross into new paragraph. e2 = new editing.EditableLine(hello, 0, hello, 0); assertEquals('hello world', e2.text); assertFalse(e1.isSameLine(e2)); // On same node, with multi-static text line. e1 = new editing.EditableLine(hello, 1, hello, 1); assertTrue(e1.isSameLine(e2)); // On same node, with multi-static text line; boundary. e1 = new editing.EditableLine(hello, 5, hello, 5); assertTrue(e1.isSameLine(e2)); // On different node, with multi-static text line. e1 = new editing.EditableLine(world, 1, world, 1); assertTrue(e1.isSameLine(e2)); // Another mix of lines. e2 = new editing.EditableLine(thisIsATest, 9, thisIsATest, 9); assertFalse(e1.isSameLine(e2)); }); }); TEST_F('ChromeVoxEditingTest', 'EditableLineStrictEquality', function() { this.runWithLoadedTree(function() {/*! <div contenteditable role="textbox"> <p style="word-spacing:100000px">this is a test</p> <p>hello <b>world</b></p> </div> */}, function(root) { var thisIsATest = root.findAll({role: RoleType.PARAGRAPH})[0].firstChild; var hello = root.findAll({role: RoleType.PARAGRAPH})[1].firstChild; var world = root.findAll({role: RoleType.PARAGRAPH})[1].lastChild; // The same position -- sanity check. var e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 0); assertEquals('this ', e1.text); assertTrue(e1.isSameLineAndSelection(e1)); // Offset into the same soft line. var e2 = new editing.EditableLine(thisIsATest, 1, thisIsATest, 1); assertFalse(e1.isSameLineAndSelection(e2)); // Boundary. e2 = new editing.EditableLine(thisIsATest, 4, thisIsATest, 4); assertFalse(e1.isSameLineAndSelection(e2)); // Offsets into different soft lines. e2 = new editing.EditableLine(thisIsATest, 5, thisIsATest, 5); assertEquals('is ', e2.text); assertFalse(e1.isSameLineAndSelection(e2)); // Sanity check; second soft line. assertTrue(e2.isSameLineAndSelection(e2)); // Different offsets into second soft line. e1 = new editing.EditableLine(thisIsATest, 6, thisIsATest, 6); assertFalse(e1.isSameLineAndSelection(e2)); // Boundary. e1 = new editing.EditableLine(thisIsATest, 7, thisIsATest, 7); assertFalse(e1.isSameLineAndSelection(e2)); // Cross into new paragraph. e2 = new editing.EditableLine(hello, 0, hello, 0); assertEquals('hello world', e2.text); assertFalse(e1.isSameLineAndSelection(e2)); // On same node, with multi-static text line. e1 = new editing.EditableLine(hello, 1, hello, 1); assertFalse(e1.isSameLineAndSelection(e2)); // On same node, with multi-static text line; boundary. e1 = new editing.EditableLine(hello, 5, hello, 5); assertFalse(e1.isSameLineAndSelection(e2)); }); }); TEST_F('ChromeVoxEditingTest', 'EditableLineBaseLineAnchorOrFocus', function() { this.runWithLoadedTree(function() {/*! <div contenteditable role="textbox"> <p style="word-spacing:100000px">this is a test</p> <p>hello <b>world</b></p> </div> */}, function(root) { var thisIsATest = root.findAll({role: RoleType.PARAGRAPH})[0].firstChild; var hello = root.findAll({role: RoleType.PARAGRAPH})[1].firstChild; var world = root.findAll({role: RoleType.PARAGRAPH})[1].lastChild; // The same position -- sanity check. var e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 0, true); assertEquals('this ', e1.text); // Offsets into different soft lines; base on focus (default). e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 6); assertEquals('is ', e1.text); // Notice that the offset is truncated at the beginning of the line. assertEquals(0, e1.startOffset); // Notice that the end offset is properly retained. assertEquals(1, e1.endOffset); // Offsets into different soft lines; base on anchor. e1 = new editing.EditableLine(thisIsATest, 0, thisIsATest, 6, true); assertEquals('this ', e1.text); assertEquals(0, e1.startOffset); // Notice that the end offset is truncated up to the end of line. assertEquals(5, e1.endOffset); // Across paragraph selection with base line on focus. e1 = new editing.EditableLine(thisIsATest, 5, hello, 2); assertEquals('hello world', e1.text); assertEquals(0, e1.startOffset); assertEquals(2, e1.endOffset); // Across paragraph selection with base line on anchor. e1 = new editing.EditableLine(thisIsATest, 5, hello, 2, true); assertEquals('is ', e1.text); assertEquals(0, e1.startOffset); assertEquals(3, e1.endOffset); }) }); TEST_F('ChromeVoxEditingTest', 'IsValidLine', function() { this.runWithLoadedTree(function() {/*! <div contenteditable role="textbox"> <p style="word-spacing:100000px">this is a test</p> <p>end</p> </div> */}, function(root) { // Each word is on its own line, but parented by a static text. var text, endText; [text, endText] = root.findAll({role: RoleType.STATIC_TEXT}); // The EditableLine object automatically adjusts to surround the line no // matter what the input is. var line = new editing.EditableLine(text, 0, text, 0); assertTrue(line.isValidLine()); // During the course of editing operations, this line may become // invalidted. For example, if a user starts typing into the line, the // bounding nodes might change. // Simulate that here by modifying private state. // This puts the line at offset 8 (|this is a|). line.localLineStartContainerOffset_ = 0; line.localLineEndContainerOffset_ = 8; assertFalse(line.isValidLine()); // This puts us in the first line. line.localLineStartContainerOffset_ = 0; line.localLineEndContainerOffset_ = 4; assertTrue(line.isValidLine()); // This is still fine (for our purposes) because the line is still intact. line.localLineStartContainerOffset_ = 0; line.localLineEndContainerOffset_ = 2; assertTrue(line.isValidLine()); // The line has changed. The end has been moved for some reason. line.lineEndContainer_ = endText; assertFalse(line.isValidLine()); }) }); TEST_F('ChromeVoxEditingTest', 'TelTrimsWhitespace', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div id="go"></div> <input id="input" type="tel"></input> <script> var data = [ '6 ', '60 ', '601 ', '60 ' ]; var go = document.getElementById('go'); var input = document.getElementById('input'); var index = 0; go.addEventListener('click', function() { input.value = data[index]; index++; input.selectionStart = index; input.selectionEnd = index; }, true); </script> */}, function(root) { var input = root.find({role: RoleType.TEXT_FIELD}); var go = root.find({role: RoleType.GENERIC_CONTAINER}); var enterKey = go.doDefault.bind(go); this.listenOnce(input, 'focus', function() { mockFeedback.call(enterKey) .expectSpeech('6') .call(enterKey) .expectSpeech('0') .call(enterKey) .expectSpeech('1') // Deletion. .call(enterKey) .expectSpeech('1') .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'BackwardWordDelete', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div style='max-width: 5px; overflow-wrap: normal' contenteditable role="textbox"> this is a test </div> */}, function(root) { var input = root.find({role: RoleType.TEXT_FIELD}); this.listenOnce(input, 'focus', function() { mockFeedback.call(this.press(35 /* end */, {ctrl: true})) .call(this.press(8 /* backspace */, {ctrl: true})) .expectSpeech('test, deleted') .expectBraille('a\u00a0', {startIndex: 2, endIndex: 2}) .call(this.press(8 /* backspace */, {ctrl: true})) .expectSpeech('a , deleted') .expectBraille('is\u00a0', {startIndex: 3, endIndex: 3}) .call(this.press(8 /* backspace */, {ctrl: true})) .expectSpeech('is , deleted') .expectBraille('this\u00a0mled', {startIndex: 5, endIndex: 5}) .call(this.press(8 /* backspace */, {ctrl: true})) .expectSpeech('this , deleted') .expectBraille(' ed mled', {startIndex: 0, endIndex: 0}) .replay(); }); input.focus(); }); }); TEST_F('ChromeVoxEditingTest', 'BackwardWordDeleteAcrossParagraphs', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div style='max-width: 5px; overflow-wrap: normal' contenteditable role="textbox"> <p>first line</p> <p>second line</p> </div> */}, function(root) { var input = root.find({role: RoleType.TEXT_FIELD}); this.listenOnce(input, 'focus', function() { mockFeedback.call(this.press(35 /* end */, {ctrl: true})) .expectSpeech('line') .call(this.press(8 /* backspace */, {ctrl: true})) .expectSpeech('line, deleted') .call(this.press(8 /* backspace */, {ctrl: true})) .expectSpeech('second , deleted') .call(this.press(8 /* backspace */, {ctrl: true})) .expectSpeech('first\u00a0') .call(this.press(8 /* backspace */, {ctrl: true})) .expectSpeech('first , deleted') .replay(); }); input.focus(); }); }); ; //# sourceURL=file:///b/s/w/ir/out/Debug/test_data/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing_test.extjs runTest(true,"RUN_TEST_F",["ChromeVoxEditingTest","RichTextLinkOutput"]); Stack trace: #0 0x7fceb12d0bd5 base::debug::StackTrace::StackTrace() #1 0x55c9076d28d0 StackTraceGetter::CurrentStackTrace() #2 0x55c9076dd537 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop() #3 0x55c9076dd0c3 testing::internal::AssertHelper::operator=() #4 0x55c90964933a extensions::browsertest_util::ExecuteScriptInBackgroundPage() #5 0x55c9098a91aa ExtensionJSBrowserTest::RunJavascriptTestF() #6 0x55c9096a4de8 ChromeVoxEditingTest_RichTextLinkOutput_Test::RunTestOnMainThread() #7 0x55c90a26ae13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #8 0x55c90544f69d base::internal::FunctorTraits<>::Invoke<>() #9 0x55c90544f5e1 base::internal::InvokeHelper<>::MakeItSo<>() #10 0x55c90544f587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #11 0x55c90561b83c base::internal::Invoker<>::Run() #12 0x55c905442f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #13 0x55c9099b7d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #14 0x55c9099b6b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #15 0x55c9071994dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #16 0x7fcea9ae6807 content::BrowserMainLoop::PreMainMessageLoopRun() #17 0x7fcea8ec261d base::internal::FunctorTraits<>::Invoke<>() #18 0x7fcea8ec2591 base::internal::InvokeHelper<>::MakeItSo<>() #19 0x7fcea8ec2537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #20 0x7fcea988e11c base::internal::Invoker<>::Run() #21 0x7fcea8e36d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #22 0x7fceaa2f9acc content::StartupTaskRunner::RunAllTasksNow() #23 0x7fcea9ae4fc1 content::BrowserMainLoop::CreateStartupTasks() #24 0x7fcea9aebece content::BrowserMainRunnerImpl::Initialize() #25 0x7fcea9ae2361 content::BrowserMain() #26 0x7fceaae49d2b content::RunBrowserProcessMain() #27 0x7fceaae4afe6 content::ContentMainRunnerImpl::RunServiceManager() #28 0x7fceaae4aaa0 content::ContentMainRunnerImpl::Run() #29 0x7fceaae48589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #30 0x7fce8870b703 service_manager::Main() #31 0x7fceaae49835 content::ContentMain() #32 0x55c90a26aa19 content::BrowserTestBase::SetUp() #33 0x55c909915f4e InProcessBrowserTest::SetUp() BrowserTestBase received signal: Segmentation fault. Backtrace: #0 0x7fceb1468901 base::debug::CollectStackTrace() #1 0x7fceb12d0c1d base::debug::StackTrace::StackTrace() #2 0x7fceb12d0bd5 base::debug::StackTrace::StackTrace() #3 0x55c90a26b81d content::(anonymous namespace)::DumpStackTraceSignalHandler() #4 0x7fce89be5cb0 <unknown> #5 0x55c90544712c gfx::Size::width() #6 0x55c9098a920d ExtensionJSBrowserTest::RunJavascriptTestF() #7 0x55c9096a4de8 ChromeVoxEditingTest_RichTextLinkOutput_Test::RunTestOnMainThread() #8 0x55c90a26ae13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #9 0x55c90544f69d base::internal::FunctorTraits<>::Invoke<>() #10 0x55c90544f5e1 base::internal::InvokeHelper<>::MakeItSo<>() #11 0x55c90544f587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #12 0x55c90561b83c base::internal::Invoker<>::Run() #13 0x55c905442f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #14 0x55c9099b7d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #15 0x55c9099b6b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #16 0x55c9071994dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #17 0x7fcea9ae6807 content::BrowserMainLoop::PreMainMessageLoopRun() #18 0x7fcea8ec261d base::internal::FunctorTraits<>::Invoke<>() #19 0x7fcea8ec2591 base::internal::InvokeHelper<>::MakeItSo<>() #20 0x7fcea8ec2537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #21 0x7fcea988e11c base::internal::Invoker<>::Run() #22 0x7fcea8e36d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #23 0x7fceaa2f9acc content::StartupTaskRunner::RunAllTasksNow() #24 0x7fcea9ae4fc1 content::BrowserMainLoop::CreateStartupTasks() #25 0x7fcea9aebece content::BrowserMainRunnerImpl::Initialize() #26 0x7fcea9ae2361 content::BrowserMain() #27 0x7fceaae49d2b content::RunBrowserProcessMain() #28 0x7fceaae4afe6 content::ContentMainRunnerImpl::RunServiceManager() #29 0x7fceaae4aaa0 content::ContentMainRunnerImpl::Run() #30 0x7fceaae48589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #31 0x7fce8870b703 service_manager::Main() #32 0x7fceaae49835 content::ContentMain() #33 0x55c90a26aa19 content::BrowserTestBase::SetUp() #34 0x55c909915f4e InProcessBrowserTest::SetUp() #35 0x55c9076f463e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #36 0x55c9076f0302 testing::internal::HandleExceptionsInMethodIfSupported<>() #37 0x55c9076e3b94 testing::Test::Run() #38 0x55c9076e4282 testing::TestInfo::Run() #39 0x55c9076e4793 testing::TestSuite::Run() #40 0x55c9076ec274 testing::internal::UnitTestImpl::RunAllTests() #41 0x55c9076f46ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #42 0x55c9076f1152 testing::internal::HandleExceptionsInMethodIfSupported<>() #43 0x55c9076ebf97 testing::UnitTest::Run() #44 0x55c909935d01 RUN_ALL_TESTS() #45 0x55c909934562 base::TestSuite::Run() #46 0x55c909898b57 ChromeTestSuiteRunner::RunTestSuite() #47 0x55c909898c43 ChromeTestLauncherDelegate::RunTestSuite() #48 0x55c90a2b0005 content::LaunchTests() #49 0x55c909898f87 LaunchChromeTests() #50 0x55c9098989ab main #51 0x7fce89bd0f45 __libc_start_main #52 0x55c9053f102a _start [422/594] ChromeVoxEditingTest.RichTextLinkOutput (CRASHED) [423/594] ChromeVoxCursorsTest.SelectionAdjustmentsRichText (18637 ms) [424/594] ChromeVoxLanguageSwitchingTest.ButtonAndLinkTest (19958 ms) [425/594] ChromeVoxEditingTest.RichTextMoveByCharacter (24953 ms) [426/594] ChromeVoxLiveRegionsTest.LiveRegionAddElement (19956 ms) [427/594] ChromeVoxLiveRegionsTest.LiveRegionCategoryFlush (19704 ms) [428/594] ChromeVoxLiveRegionsTest.SimulateTreeChanges (19679 ms) [429/594] ChromeVoxOutputE2ETest.NestedList (19941 ms) [430/594] ChromeVoxNavigationManagerUnitTest.SimpleStaticHTML (9977 ms) [431/594] ChromeVoxNavigationManagerUnitTest.Scrollbar (9452 ms) [432/594] ChromeVoxBrailleTextHandlerUnitTest.UpdateByUser (7618 ms) [433/594] ChromeVoxNavigationManagerUnitTest.LeftRightSentenceNavigation (9455 ms) [434/594] ChromeVoxBrailleUtilUnitTest.NameTemplate (7869 ms) [435/594] ChromeVoxDomUtilUnitTest.IsDisabled (7612 ms) [436/594] ChromeVoxDomUtilUnitTest.HasLongDesc (7614 ms) [437/594] ChromeVoxDomUtilUnitTest.AccessKey (7905 ms) [438/594] ChromeVoxKeySequenceUnitTest.StickyEquality (7611 ms) [439/594] ChromeVoxDomUtilUnitTest.Memoization (9708 ms) [440/594] ChromeVoxKeySequenceUnitTest.ShiftPrefixEquality (7093 ms) [441/594] ChromeVoxSelectionUtilUnitTest.SimpleFindPos (7356 ms) [442/594] ChromeVoxSpannableUnitTest.RemoveSpan (7083 ms) [443/594] MockFeedbackUnitTest.startAndEndCallbacks (7090 ms) [444/594] MockFeedbackUnitTest.SpeechWithLanguage (7634 ms) [445/594] SelectToSpeakMouseSelectionTest.SpeaksNodeAfterTrayTapAndMouseClick (9461 ms) [446/594] WebViewScrollBubbling/WebViewGuestScrollTest.ScrollLatchingPreservedInGuests/0 (9180 ms) [447/594] AutofillAutocompleteTest.SubmitSimpleValue_Saves/0 (7649 ms) [448/594] AutofillAutocompleteTest.SubmitSimpleValue_Saves/1 (7878 ms) [449/594] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/7 (7357 ms) [450/594] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/41 (7355 ms) [451/594] AutofillAutocompleteTest.SubmitSimpleValue_OTR_DoesNotSave/0 (8672 ms) [452/594] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/43 (7609 ms) [453/594] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/54 (7613 ms) [454/594] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/60 (7606 ms) [455/594] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/52 (8401 ms) [456/594] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/65 (7880 ms) [457/594] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/130 (7352 ms) [458/594] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/110 (7873 ms) [459/594] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/155 (7882 ms) [460/594] EncodingAliases/BrowserEncodingTest.TestEncodingAliasMapping/10 (7105 ms) [461/594] ChromeOriginTrialsDisabledFeaturesTest.PRE_DisabledFeaturesSetOnCommandLine/3 (6853 ms) [462/594] BrowsingDataRemoverBrowserTestP.EmptyFileSystemDeletion/0 (7612 ms) [463/594] ChromeServiceWorkerNavigationPreloadTest.TopFrameWithThirdPartyBlocking/2 (8134 ms) [464/594] CookieSettingsTest.PRE_BlockCookies/2 (10517 ms) [465/594] MediaEngagementAutoplayBrowserTest.HasHighScoreThreshold/0 (7870 ms) [466/594] UkmBrowserTest.NetworkProviderPopulatesSystemProfile/1 (8399 ms) [467/594] MSE_ClearKey/EncryptedMediaTest.Playback_VideoAudio_WebM_Opus/0 (12327 ms) [468/594] OnDiskApp/NetworkContextConfigurationBrowserTest.BasicRequest/0 (6586 ms) [469/594] ProfileMainNetworkContext/NetworkContextConfigurationBrowserTest.UploadFile/0 (6577 ms) [470/594] OnDiskApp/NetworkContextConfigurationFixedPortBrowserTest.TestingFixedPort/0 (6296 ms) [471/594] InMemoryApp/NetworkContextConfigurationFtpPacBrowserTest.FtpPac/0 (7361 ms) [472/594] NetworkRequestMetricsBrowserTest.InterruptedBeforeHeaders/3 (7088 ms) [473/594] NetworkRequestMetricsBrowserTest.SuccessWithBody/0 (6825 ms) [474/594] NetworkRequestMetricsBrowserTest.Download/1 (6824 ms) [475/594] MainFrameDownloadFlagsBrowserTest.Download/7 (7878 ms) [476/594] SubframeDownloadFlagsBrowserTest.Download/8 (7877 ms) [477/594] SubframeDownloadFlagsBrowserTest.Download/13 (7876 ms) [478/594] SubframeDownloadFlagsBrowserTest.Download/19 (7615 ms) [479/594] SubframeDownloadFlagsBrowserTest.Download/21 (8408 ms) [480/594] SubframeDownloadFlagsBrowserTest.Download/24 (7869 ms) [481/594] SubframeDownloadFlagsBrowserTest.Download/44 (8142 ms) [482/594] SSLPolicyTestCommittedInterstitials.SafeBrowsingExtendedReportingPolicyManaged/1 (7875 ms) [483/594] PrefHashBrowserTestClearedAtomicInstance/PrefHashBrowserTestClearedAtomic.PRE_ClearedAtomic/0 (6343 ms) [484/594] PrefHashBrowserTestUntrustedInitializedInstance/PrefHashBrowserTestUntrustedInitialized.PRE_UntrustedInitialized/2 (6050 ms) [485/594] PrefHashBrowserTestUntrustedAdditionToPrefsInstance/PrefHashBrowserTestUntrustedAdditionToPrefs.PRE_UntrustedAdditionToPrefs/2 (6034 ms) [486/594] PrefHashBrowserTestUntrustedAdditionToPrefsAfterWipeInstance/PrefHashBrowserTestUntrustedAdditionToPrefsAfterWipe.PRE_UntrustedAdditionToPrefsAfterWipe/3 (5774 ms) [487/594] SecureOriginWhitelistBrowsertest/SecureOriginWhitelistBrowsertest.SecurityIndicators/4 (7106 ms) [488/594] SecurityStateTabHelperTest.UMADoesNotLogOnMinorError/1 (7350 ms) [489/594] SecurityStateTabHelperTest.SecurityLevelDowngradedOnDataUrl/1 (6822 ms) [490/594] SecurityStateTabHelperTest.MixedContent/0 (9713 ms) [491/594] SecurityStateTabHelperTest.DefaultSecurityLevelOnBlobUrl/0 (7354 ms) [492/594] SSLUITest.TestClientAuthSigningFails/0 (7876 ms) [493/594] SSLUITest.TestRunsCachedInsecureContent/0 (7880 ms) [494/594] SSLUITestCommitted.InAppTestHTTPSExpiredCertAndPreviouslyProceeded/0 (10532 ms) [495/594] SSLUITestWithExtendedReporting.TestBrokenHTTPSProceedReporting/1 (8400 ms) [496/594] SSLNetworkTimeBrowserTest.CloseTabBeforeNetworkFetchCompletes/0 (8438 ms) [497/594] SSLNetworkTimeBrowserTest.CloseTabBeforeNetworkFetchCompletes/1 (8439 ms) [498/594] AdTaggingEventWithScriptInStackBrowserTest.WindowOpenWithScriptInStack/1 (7354 ms) [499/594] SitePerProcess/TaskManagerOOPIFBrowserTest.LeavePageWithCrossSiteIframes/0 (9188 ms) [500/594] HostedAppTest.ShouldShowToolbarForHTTPSAppSameOrigin/4 (8418 ms) [501/594] HostedAppTest.ShouldShowToolbarForAppWithoutWWW/6 (9451 ms) [502/594] HostedAppTest.SubframeRedirectsToHostedApp/4 (6561 ms) [503/594] HostedAppTest.EmptyTitlesDoNotDisplayUrl/2 (8401 ms) [504/594] HostedAppCustomTabBarOnlyTest.InScopeHttpUrlsDisplayAppTitle/2 (7613 ms) [505/594] HostedAppPWAOnlyTest.OpenInChrome/0 (7608 ms) [506/594] HostedAppProcessModelTest.BackgroundPageWithAppCoveringDifferentSites/1 (11557 ms) [507/594] FlashEmbeds/ChromeContentRendererClientBrowserTest.RewriteYouTubeFlashEmbed/2 (7618 ms) [508/594] HostedAppSitePerProcessTest.DoNotShareProcessWhenOverProcessLimit/1 (9456 ms) [509/594] IntentPickerBubbleViewBrowserTest.NavigationInAppWindowToInScopeLinkDoesNotShowIntentPickerWhenDesktopPWAsStayInWindowDisabled/1 (8923 ms) [510/594] DeclarativeNetRequestBrowserTest.BlockRequests_Separator/1 (13127 ms) [511/594] DeclarativeNetRequestBrowserTest.Enable_Disable_Reload_Uninstall/0 (12599 ms) [512/594] DeclarativeNetRequestBrowserTest_Packed.CorruptedIndexedRuleset/0 (11555 ms) [513/594] DeclarativeNetRequestBrowserTest.RedirectPriority/1 (13117 ms) [514/594] BookmarkAppNavigationThrottleExperimentalLinkBrowserTest.OutOfScopeUrlSelf/3 (8408 ms) [515/594] BookmarkAppNavigationThrottleCommonFormSubmissionBrowserTest.FormSubmission/3 (8142 ms) [516/594] BookmarkAppNavigationThrottleExperimentalWindowOpenBrowserTest.WindowOpenInApp/1 (9983 ms) [517/594] BookmarkAppNavigationThrottleCommonLinkBrowserTest.InAppInScopeNavigation/6 (8444 ms) [518/594] ExtensionBindingsApiTest.HandlerFunctionTypeChecking/0 (7627 ms) [519/594] ExtensionBindingsUserGestureTest.UserGestureInExtensionAPICallback/2 (7612 ms) [520/594] NativeBindings/MessagingApiTest.LargeMessages/0 (8918 ms) [521/594] NativeBindings/ExternallyConnectableMessagingTest.FromIncognitoDenyExtensionAndApp/0 (9711 ms) [522/594] NativeBindingsNoChannelID/ExternallyConnectableMessagingTestNoChannelID.TlsChannelIdEmptyWhenDisabled/0 (8137 ms) [523/594] JavaScriptBindings/ExternallyConnectableMessagingTest.WebConnectableAndNotConnectable/0 (10781 ms) [524/594] ServiceWorkerTestWithJSBindings/ServiceWorkerBasedBackgroundTest.OnInstalledEvent/0 (7617 ms) [525/594] ServiceWorkerTestWithNativeBindings/ServiceWorkerTest.TabsCreate/0 (8143 ms) [526/594] ServiceWorkerTestWithNativeBindings/ServiceWorkerTest.Events/0 (8668 ms) [527/594] ServiceWorkerTestWithJSBindings/ServiceWorkerTest.SWServedBackgroundPageReceivesEvent/0 (8659 ms) [528/594] Parameterized/UpdateServiceTest.TwoUpdateCheckErrors/0 (8922 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=SelectFileDialogExtensionBrowserTest/SelectFileDialogExtensionBrowserTest.SelectFileAndOpen/0 --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/results5EVm9K/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dLgsZeW ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=SelectFileDialogExtensionBrowserTest/SelectFileDialogExtensionBrowserTest.SelectFileVirtualKeyboard_TabletMode/1 --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsieGgYo/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/deeWN3z ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=SelectFileDialogExtensionBrowserTest/SelectFileDialogExtensionBrowserTest.OpenSingletonTabAndCancel/0 --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsO53kN2/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dOkbNSd ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=SelectFileDialogExtensionBrowserTest/SelectFileDialogExtensionBrowserTest.OpenTwoDialogs/1 --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsvZ0zCG/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dm6JWHR [529/594] SelectFileDialogExtensionBrowserTest/SelectFileDialogExtensionBrowserTest.SelectFileAndOpen/0 (25452 ms) [530/594] SelectFileDialogExtensionBrowserTest/SelectFileDialogExtensionBrowserTest.OpenSingletonTabAndCancel/0 (24662 ms) [531/594] SelectFileDialogExtensionBrowserTest/SelectFileDialogExtensionBrowserTest.OpenTwoDialogs/1 (24414 ms) [532/594] SelectFileDialogExtensionBrowserTest/SelectFileDialogExtensionBrowserTest.SelectFileVirtualKeyboard_TabletMode/1 (28091 ms) [533/594] TestAsNormalAndGuestUser/SpokenFeedbackTest.ChromeVoxNextTabRecovery/1 (21802 ms) [534/594] FileDisplay/FilesAppBrowserTest.Test/fileDisplayDrive_TabletMode (28614 ms) [535/594] FileDisplay/FilesAppBrowserTest.Test/fileSearch_MyFilesVolume (28602 ms) [536/594] FileDisplay/FilesAppBrowserTest.Test/fileDisplayWithoutDownloadsVolume_MyFilesVolume (27047 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=CreateNewFolder/FilesAppBrowserTest.Test/selectCreateFolderDownloads --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsaHeyNT/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dgkSsS4 ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ContextMenu/FilesAppBrowserTest.Test/checkDeleteDisabledForReadOnlyFolder --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsTy0RDx/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dykhHII ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ContextMenu/FilesAppBrowserTest.Test/checkContextMenusForInputElements --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultszYFmub/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dTxD6ym ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=QuickView/FilesAppBrowserTest.Test/openQuickViewScrollHtml --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsFIL1kP/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dQRwGp0 [537/594] CreateNewFolder/FilesAppBrowserTest.Test/selectCreateFolderDownloads (30734 ms) [538/594] ContextMenu/FilesAppBrowserTest.Test/checkContextMenusForInputElements (23358 ms) [539/594] ContextMenu/FilesAppBrowserTest.Test/checkDeleteDisabledForReadOnlyFolder (24137 ms) [540/594] QuickView/FilesAppBrowserTest.Test/openQuickViewScrollHtml (27812 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=DirectoryTreeContextMenu/FilesAppBrowserTest.Test/dirCutWithContextMenu_MyFilesVolume --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsWlPRbt/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/d633qgE ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=DirectoryTreeContextMenu/FilesAppBrowserTest.Test/dirPasteWithContextMenu_MyFilesVolume --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsCN2S26/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/d1LEm7h ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=DirectoryTreeContextMenu/FilesAppBrowserTest.Test/dirRenameToExisting_GuestMode --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsLye5TK/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/d5RitYV ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=RestoreGeometry/FilesAppBrowserTest.Test/restoreGeometry_GuestMode --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/resultsC6gsLo/test_results.xml --test-launcher-summary-output=/b/s/w/iopCc93e/output.json --user-data-dir=/b/s/w/itcWZ6xb/.org.chromium.Chromium.e7Je9p/dgkVKPz [541/594] DirectoryTreeContextMenu/FilesAppBrowserTest.Test/dirCutWithContextMenu_MyFilesVolume (28369 ms) [542/594] DirectoryTreeContextMenu/FilesAppBrowserTest.Test/dirRenameToExisting_GuestMode (27550 ms) [543/594] DirectoryTreeContextMenu/FilesAppBrowserTest.Test/dirPasteWithContextMenu_MyFilesVolume (28862 ms) [544/594] RestoreGeometry/FilesAppBrowserTest.Test/restoreGeometry_GuestMode (34900 ms) [545/594] ShareAndManageDialog/FilesAppBrowserTest.Test/shareDirectoryDrive (28873 ms) [546/594] Traverse/FilesAppBrowserTest.Test/traverseDrive (29122 ms) [547/594] ShareAndManageDialog/FilesAppBrowserTest.Test/shareFileTeamDrive (30708 ms) [548/594] TabIndex/FilesAppBrowserTest.Test/tabindexOpenDialogDownloads (27046 ms) [549/594] FileDialog/FilesAppBrowserTest.Test/openFileDialogUnload (24171 ms) [550/594] FileDialog/FilesAppBrowserTest.Test/openFileDialogCancelDownloads (26531 ms) [551/594] FileDialog/FilesAppBrowserTest.Test/openFileDialogCancelDrive (29141 ms) [552/594] GearMenu/FilesAppBrowserTest.Test/showSendFeedbackAction (24425 ms) [553/594] CopyBetweenWindows/FilesAppBrowserTest.Test/copyBetweenWindowsLocalToDrive_DriveFs (36222 ms) [554/594] PolicyDisplayRotationDefault/DisplayRotationDefaultTest.UserInteraction/0 (6048 ms) [555/594] PolicyDisplayRotationDefault/DisplayRotationDefaultTest.SetAndUnsetPolicyWithUserInteraction/1 (5269 ms) [556/594] Recents/FilesAppBrowserTest.Test/recentsDrive (24414 ms) [557/594] SigninProfileAppsPolicyPerChannelTest.ExtensionInstallation/2 (6302 ms) [558/594] Metadata/FilesAppBrowserTest.Test/metadataLargeDrive (25452 ms) [559/594] BrowserTestTabbedOrApp/BrowserTestParam.TabbedOrAppBrowserWindowAutoManagementTest/0 (7108 ms) [560/594] ImmersiveModeBrowserViewTest.TestCaptionButtonsReceiveEventsInBrowserImmersiveMode/0 (7080 ms) [561/594] ImmersiveModeBrowserViewTest.LockedFullscreenDisablesImmersive/0 (6038 ms) [562/594] HostedAppNonClientFrameViewAshTest.PageInfoBubblePosition/0 (7082 ms) [563/594] HostedAppNonClientFrameViewAshTest.FindIcon/0 (7350 ms) [564/594] UserCloudPolicyManagerNonEnterpriseTest.NoPolicyForConsumer/0 (37253 ms) [565/594] CertificateReportingServiceBrowserTest.DontSendOldReports/0 (21274 ms) [566/594] UserCloudPolicyManagerTest.MigrateForExistingUser/0 (40135 ms) [567/594] CertificateReportingServiceBrowserTest.Delayed_Resumed_ServiceShutdown/0 (8145 ms) [568/594] CertificateReportingServiceBrowserTest.DontSendOldReports/1 (21775 ms) [569/594] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.Proceed/3 (7618 ms) [570/594] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.VisitWhitePaper/2 (8671 ms) [571/594] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.IframeOptInAndReportThreatDetails/0 (8135 ms) [572/594] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.WhitelistUnsaved/0 (9707 ms) [573/594] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.VerifyHitReportNotSentOnIncognito/4 (8458 ms) [574/594] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.SecurityState_HTTP/5 (7878 ms) [575/594] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.CommittedInterstitialShows/2 (7099 ms) [576/594] SupervisedUserTest.DontShowInterstitialTwice/1 (8658 ms) [577/594] SupervisedUserBlockModeTest.OpenBlockedURLInNewTab/1 (8393 ms) [578/594] SupervisedUserBlockModeTest.NavigateFromBlockedPageToBlockedPage/0 (8656 ms) [579/594] MimeHandlerViewCrossProcessTest.EmbedWithInitialFrameAcceptBeforeUnloadDialog/1 (9195 ms) [580/594] ContinueWhereILeftOffTest.Post (7350 ms) [581/594] ContinueWhereILeftOffTest.SessionStorage (7608 ms) [582/594] SessionRestoreTestChromeOS.RestoreAppsV1 (9706 ms) [583/594] IncognitoSSLHostStateDelegateTest.AfterRestart (6836 ms) [584/594] MultiProfileFilesAppBrowserTest.BasicDrive (17853 ms) [585/594] BrowserLoginTest.BrowserActive (24404 ms) [586/594] UserAddingScreenTest.ScreenVisibility (25461 ms) [587/594] ChromeOriginTrialsDisabledFeaturesTest.DisabledFeaturesSetOnCommandLine/3 (6568 ms) [588/594] UserImageManagerTest.SaveUserImage (26498 ms) [589/594] CookieSettingsTest.BlockCookies/2 (5774 ms) [590/594] PrefHashBrowserTestClearedAtomicInstance/PrefHashBrowserTestClearedAtomic.ClearedAtomic/0 (5515 ms) [591/594] PrefHashBrowserTestUntrustedInitializedInstance/PrefHashBrowserTestUntrustedInitialized.UntrustedInitialized/2 (5517 ms) [592/594] PrefHashBrowserTestUntrustedAdditionToPrefsInstance/PrefHashBrowserTestUntrustedAdditionToPrefs.UntrustedAdditionToPrefs/2 (5251 ms) [593/594] SystemWebDialogLoginTest.NonModalTest (23096 ms) [594/594] PrefHashBrowserTestUntrustedAdditionToPrefsAfterWipeInstance/PrefHashBrowserTestUntrustedAdditionToPrefsAfterWipe.UntrustedAdditionToPrefsAfterWipe/3 (4991 ms) Retrying 7 tests (retry #1) [595/601] ChromeVoxEditingTest.RichTextLinkOutput (13374 ms) [596/601] MimeHandlerViewTest.PostMessage (5507 ms) [597/601] PaymentRequestCvcUnmaskViewControllerTest.CvcSentToResponse (5775 ms) [598/601] TaskManagerBrowserTest.NoticeExtensionTabChanges (5770 ms) [599/601] TranslateManagerBrowserTest.PageLanguageDetection (5508 ms) [600/601] VpnProviderApiTest.ConfigPersistence (4983 ms) [601/601] WebViewTest.ReloadAfterCrash (6557 ms) SUCCESS: all tests passed. 42f9c39ad0a45810: exit 0 3 files remaining... Additional test environment: CHROME_DEVEL_SANDBOX=/opt/chromium/chrome_sandbox CHROME_HEADLESS=1 LANG=en_US.UTF-8 Command: ./browser_tests --test-launcher-bot-mode --cfi-diag=0 --disable-features=SingleProcessMash --override-use-software-gl-for-tests --test-launcher-summary-output=/b/s/w/ioc04886/output.json IMPORTANT DEBUGGING NOTE: each test is run inside its own process. For debugging a test inside a debugger, use the --gtest_filter=<your_test_name> flag along with either --single_process (to run the test in one launcher/browser process) or --single-process (to do the above, and also run Chrome in single-process mode). Using sharding settings from environment. This is shard 1/20 Using 4 parallel jobs. Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=PlatformAppBrowserTest.OnLaunchedEvent --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsCxFuIW/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dltc9MU ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=PlatformAppBrowserTest.AppWithContextMenu --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsEa5Qu2/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dr8gVDY ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=WebViewTest.Shim_TestAllowTransparencyAttribute --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/results5garj8/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/d7nERq4 ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=WebViewTest.Shim_TestInvalidChromeExtensionURL --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsc9L09d/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dyy27fa [1/601] PlatformAppBrowserTest.OnLaunchedEvent (17836 ms) [2/601] PlatformAppBrowserTest.AppWithContextMenu (18094 ms) [3/601] WebViewTest.Shim_TestInvalidChromeExtensionURL (18620 ms) [4/601] WebViewTest.Shim_TestAllowTransparencyAttribute (18886 ms) [5/601] WebViewTest.Shim_TestRemoveWebviewOnExit (8129 ms) [6/601] WebViewTest.Shim_TestReassignSrcAttribute (8662 ms) [7/601] WebViewTest.Shim_TestDisabledZoomMode (8133 ms) [8/601] WebViewSurfaceSynchronizationTest.AutosizeRemoveAttributes (8131 ms) [9/601] AutocompleteBrowserTest.FocusSearch (6559 ms) [10/601] AutofillAutocompleteRetentionDisabledTest.RetentionPolicy_DoesNot_RemoveExpiredEntry (6834 ms) [11/601] AutofillTest.ProfilesAggregatedWithSubmitHandler (6818 ms) [12/601] AutofillMetricsBrowserTest.CorrectSourceForCrossSiteEmbeddedUnownedCreditCardCheckout (7080 ms) [13/601] ContentAutofillDriverBrowserTest.SubframeNavigationDoesntHideAutofillPopup (7086 ms) [14/601] BackgroundFetchBrowserTest.OfflineItemCollection_SingleFileMetadata (6821 ms) [15/601] BackgroundFetchBrowserTest.DownloadService_Acceptance (7080 ms) [16/601] BitmapFetcherBrowserTest.OnURLFetchFailureTest (6035 ms) [17/601] BackgroundFetchBrowserTest.FetchFromChildFrameWithPermissions (6818 ms) [18/601] BrowsingDataRemoverBrowserTest.PRE_PRE_StorageRemovedFromDisk (6294 ms) [19/601] ConditionalCacheCountingHelperBrowserTest.Count (8654 ms) [20/601] NavigationEntryRemoverTest.RecentTabWindowDeletion (7080 ms) [21/601] SignInIsolationBrowserTest.NavigateToSignInPage (6297 ms) [22/601] ChromeOriginTrialsTest.NoPublicKeySet (5246 ms) [23/601] BackgroundFetchBrowserTest.FetchesRunToCompletionAndUpdateTitle_Failed (31468 ms) [24/601] ChromeSecurityExploitBrowserTestMojoBlobURLs.CreateBlobInExtensionOrigin (7605 ms) [25/601] BackgroundFetchBrowserTest.FetchFromServiceWorker (31211 ms) [26/601] ChromeSitePerProcessTest.PluginWithRemoteTopFrame (6555 ms) [27/601] SitePerProcessHighDPIExpiredCertBrowserTest.InterstitialLoadsWithCorrectDeviceScaleFactor (7092 ms) [28/601] ClientHintsBrowserTest.ClientHintsThirdPartyNotAllowed/1 (6836 ms) [29/601] ChromeSitePerProcessTest.UserActivationConsumptionAcrossFrames (8397 ms) [30/601] ClientHintsBrowserTest.ClientHintsLifetimeCookiesNotAllowed/0 (7078 ms) [31/601] ClientHintsBrowserTest.ClientHintsLifetimeFollowedByRedirectToNoClientHint/1 (7341 ms) [32/601] ContentSettingsTest.RedirectCrossOrigin (6306 ms) [33/601] DataReductionProxyBrowsertest.ChromeProxyEctHeaderSet (6561 ms) [34/601] DataSaverForWorkerBrowserTest.SharedWorker_Off (6557 ms) [35/601] ClientHintsBrowserTest.ClientHintsLifetimeFollowedByNoClientHintIncognito/1 (8132 ms) [36/601] AndroidUsbCountTest.TestNoMultipleCallsRemoveAddWhileQueued (6820 ms) [37/601] DownloadTest.CrxInstallDenysPermissions (6818 ms) [38/601] DomDistillerTabUtilsBrowserTest.TestDistillIntoWebContents (7343 ms) [39/601] DevToolsSanityTest.TestNetworkPushTime (12064 ms) [40/601] DownloadTest.CrxInstallAcceptPermissions (7087 ms) [41/601] DownloadDangerPromptBrowserTest.InvokeUi_DangerousFileFromApi (6034 ms) [42/601] ContentFaviconDriverTest.AssociateIconWithInitialPageDespiteMetaRefreshTagAndLandingPageCached (8916 ms) [43/601] ContentFaviconDriverTest.DoNotAssociateIconWithInitialPageAfterHrefAssign (7081 ms) [44/601] InstallableManagerBrowserTest.ManifestUrlChangeFlushesState (6295 ms) [45/601] GeolocationBrowserTest.IFramesWithFreshPosition (7091 ms) [46/601] BrowserCloseManagerBrowserTest.AddBeforeUnloadDuringClosing (9189 ms) [47/601] DeferredMediaBrowserTest.BackgroundMediaIsDeferred (7347 ms) [48/601] MediaEngagementBrowserTest.DoNotRecordEngagement_NotTime_AudioOnly (7089 ms) [49/601] EncryptedMediaSupportedTypesClearKeyTest.SessionType (7612 ms) [50/601] MediaEngagementBrowserTest.RecordSingleVisitOnSameOrigin (7369 ms) [51/601] IndependentOTRProfileManagerTest.CreateTwoFromSameProfile (6559 ms) [52/601] MediaFileValidatorTest.ValidAudio (6556 ms) [53/601] TabReactivationTrackerTest.CorrectTracking (6830 ms) [54/601] DnsProbeBrowserTest.CorrectionsDisabled (7345 ms) [55/601] DNSErrorPageTest.DNSError_DoClickLink (8130 ms) [56/601] ErrorPageOfflineTest.CheckEasterEggIsDisabled (7345 ms) [57/601] DNSErrorPageTest.StaleCacheStatus (9180 ms) [58/601] NetworkQualityTrackerBrowserTest.NetworkQualityTracker (5776 ms) [59/601] VariationsHttpHeadersBrowserTest.TestStrippingHeadersFromRequestUsingSimpleURLLoaderWithGlobalSystemNetworkContext (6299 ms) [60/601] FtpBrowserTest.BasicFtpUrlAuthentication (7607 ms) [61/601] VariationsHttpHeadersBrowserTest.ServiceWorkerScript (6555 ms) [62/601] AdsPageLoadMetricsObserverBrowserTest.SubresourceFilter (8926 ms) [63/601] HttpsEngagementPageLoadMetricsBrowserTest.AlwaysInBackground (8403 ms) [64/601] PageLoadMetricsBrowserTest.IgnoreDownloads (7086 ms) [65/601] PageLoadMetricsBrowserTest.PaintInMainAndChildFrame (8663 ms) [66/601] PasswordManagerBrowserTest.DontPromptForPasswordFormWithReadonlyPasswordField (7343 ms) [67/601] PasswordManagerBrowserTest.ChangePwdFormPushStateBubbleShown (7344 ms) [68/601] SessionRestorePageLoadMetricsBrowserTest.InitialVisibilityOfSingleRestoredTab (7876 ms) [69/601] PasswordManagerBrowserTest.PasswordRetryFormUpdateBubbleShown (7608 ms) [70/601] PasswordManagerBrowserTest.ExistingAboutBlankPasswordsAreNotUsed (7871 ms) [71/601] PDFExtensionTest.Basic (10500 ms) [72/601] PDFExtensionTest.PostMessageForZeroSizedEmbed (9965 ms) [73/601] PDFExtensionTest.PdfZoomWithoutBubble (10494 ms) [74/601] PermissionRequestManagerBrowserTest.BackgroundTabNavigation (7605 ms) [ RUN ] PluginPowerSaverBrowserTest.BlockTinyPlugins [1:1:0212/010744.955432:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [7658:7658:0212/010745.223265:WARNING:chrome_browser_main_chromeos.cc(557)] Running as stub user with profile dir: test-user [7658:7658:0212/010745.925446:INFO:remote_commands_service.cc(38)] Fetching remote commands. [7658:7658:0212/010745.925670:WARNING:remote_commands_service.cc(40)] Client is not registered. [7658:7658:0212/010745.925867:INFO:remote_commands_invalidator.cc(32)] Initialize RemoteCommandsInvalidator. [7658:7658:0212/010745.926000:INFO:remote_commands_invalidator.cc(57)] Starting RemoteCommandsInvalidator. [7658:7658:0212/010745.926756:INFO:remote_commands_invalidator.cc(123)] RemoteCommandsInvalidator ReloadPolicyData. [7658:7658:0212/010745.927142:INFO:remote_commands_invalidator.cc(167)] Unregister RemoteCommandsInvalidator. [7658:7658:0212/010746.186016:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [7658:7658:0212/010747.511927:FATAL:shelf_widget.cc(293)] Check failed: login_shelf_view_->visible(). #0 0x7f9a9c3c7901 base::debug::CollectStackTrace() #1 0x7f9a9c22fc1d base::debug::StackTrace::StackTrace() #2 0x7f9a9c22fbd5 base::debug::StackTrace::StackTrace() #3 0x7f9a9c26a827 logging::LogMessage::~LogMessage() #4 0x7f9a8749af47 ash::ShelfWidget::GetHitTestRects() #5 0x7f9a8749cf11 ash::ShelfWindowTargeter::GetHitTestRects() #6 0x7f9a8f04d3ae aura::WindowTargeter::EventLocationInsideBounds() #7 0x7f9a85f1a7d0 wm::EasyResizeWindowTargeter::EventLocationInsideBounds() #8 0x7f9a8f04be04 aura::WindowTargeter::SubtreeShouldBeExploredForEvent() #9 0x7f9a8f04d046 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #10 0x7f9a8f04cef3 aura::WindowTargeter::FindTargetForLocatedEvent() #11 0x7f9a8745322b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #12 0x7f9a8f04cc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #13 0x7f9a8f04caa1 aura::WindowTargeter::FindTargetForEvent() #14 0x7f9a8f04d096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #15 0x7f9a8f04cef3 aura::WindowTargeter::FindTargetForLocatedEvent() #16 0x7f9a8745322b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #17 0x7f9a8f04cc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #18 0x7f9a8f04caa1 aura::WindowTargeter::FindTargetForEvent() #19 0x7f9a8f04d096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #20 0x7f9a8f04cef3 aura::WindowTargeter::FindTargetForLocatedEvent() #21 0x7f9a8745322b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #22 0x7f9a8f04cc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #23 0x7f9a8f04caa1 aura::WindowTargeter::FindTargetForEvent() #24 0x7f9a91272c0c ui::EventProcessor::OnEventFromSource() #25 0x7f9a91272fac ui::EventProcessor::OnEventFromSource() #26 0x7f9a85a87a1f ws::EventQueue::DeliverOrQueueEvent() #27 0x7f9a873c72b8 ash::AshWindowTreeHostPlatform::DeliverEventToSink() #28 0x7f9a873c735c ash::AshWindowTreeHostPlatform::DeliverEventToSink() #29 0x7f9a912739f8 ui::EventSource::SendEventToSinkFromRewriter() #30 0x7f9a91273591 ui::EventSource::SendEventToSink() #31 0x7f9a8f05301d aura::WindowTreeHostPlatform::DispatchEvent() #32 0x7f9a873c7191 ash::AshWindowTreeHostPlatform::DispatchEvent() #33 0x7f9a868a0f55 base::internal::FunctorTraits<>::Invoke<>() #34 0x7f9a868a0eb6 base::internal::InvokeHelper<>::MakeItSo<>() #35 0x7f9a868a0e47 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui22PlatformWindowDelegateEFvPNS3_5EventEEJNS0_17UnretainedWrapperIS4_EEEEEFvS6_EE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOS6_ #36 0x7f9a868a0de9 base::internal::Invoker<>::RunOnce() #37 0x7f9a9127fdb3 _ZNO4base12OnceCallbackIFvPN2ui5EventEEE3RunES3_ #38 0x7f9a9127fbe4 ui::DispatchEventFromNativeUiEvent() #39 0x7f9a869174bc ui::X11WindowOzone::DispatchEvent() #40 0x7f9a9734b887 ui::PlatformEventSource::DispatchEvent() #41 0x7f9a6fb494a9 ui::X11EventSourceLibevent::DispatchPlatformEvent() #42 0x7f9a6fb49053 ui::X11EventSourceLibevent::ProcessXEvent() #43 0x7f9a6fb3b8a5 ui::X11EventSource::ExtractCookieDataDispatchEvent() #44 0x7f9a6fb3b82e ui::X11EventSource::DispatchXEvents() #45 0x7f9a6fb4970f ui::X11EventSourceLibevent::OnFileCanReadWithoutBlocking() #46 0x7f9a9c3facae base::MessagePumpLibevent::FdWatchController::OnFileCanReadWithoutBlocking() #47 0x7f9a9c3fbdcd base::MessagePumpLibevent::OnLibeventNotification() #48 0x7f9a9c4441fe event_process_active #49 0x7f9a9c443847 event_base_loop #50 0x7f9a9c3fbea4 base::MessagePumpLibevent::Run() #51 0x7f9a9c32c02c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #52 0x7f9a9c2d09d7 base::RunLoop::Run() #53 0x55b54a332c8e content::RunThisRunLoop() #54 0x55b54a332e33 content::RunAllPendingInMessageLoop() #55 0x55b549992111 InProcessBrowserTest::PreRunTestOnMainThread() #56 0x55b54a2e5cde content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #57 0x55b5454ca69d base::internal::FunctorTraits<>::Invoke<>() #58 0x55b5454ca5e1 base::internal::InvokeHelper<>::MakeItSo<>() #59 0x55b5454ca587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #60 0x55b54569683c base::internal::Invoker<>::Run() #61 0x55b5454bdf8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #62 0x55b549a32d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #63 0x55b549a31b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #64 0x55b5472144dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #65 0x7f9a94a45807 content::BrowserMainLoop::PreMainMessageLoopRun() #66 0x7f9a93e2161d base::internal::FunctorTraits<>::Invoke<>() #67 0x7f9a93e21591 base::internal::InvokeHelper<>::MakeItSo<>() #68 0x7f9a93e21537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #69 0x7f9a947ed11c base::internal::Invoker<>::Run() #70 0x7f9a93d95d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #71 0x7f9a95258acc content::StartupTaskRunner::RunAllTasksNow() #72 0x7f9a94a43fc1 content::BrowserMainLoop::CreateStartupTasks() #73 0x7f9a94a4aece content::BrowserMainRunnerImpl::Initialize() #74 0x7f9a94a41361 content::BrowserMain() #75 0x7f9a95da8d2b content::RunBrowserProcessMain() #76 0x7f9a95da9fe6 content::ContentMainRunnerImpl::RunServiceManager() #77 0x7f9a95da9aa0 content::ContentMainRunnerImpl::Run() #78 0x7f9a95da7589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #79 0x7f9a7366a703 service_manager::Main() #80 0x7f9a95da8835 content::ContentMain() #81 0x55b54a2e5a19 content::BrowserTestBase::SetUp() #82 0x55b549990f4e InProcessBrowserTest::SetUp() #83 0x55b545a3a85e PluginPowerSaverBrowserTest::SetUp() #84 0x55b54776f63e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #85 0x55b54776b302 testing::internal::HandleExceptionsInMethodIfSupported<>() #86 0x55b54775eb94 testing::Test::Run() #87 0x55b54775f282 testing::TestInfo::Run() #88 0x55b54775f793 testing::TestSuite::Run() #89 0x55b547767274 testing::internal::UnitTestImpl::RunAllTests() #90 0x55b54776f6ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #91 0x55b54776c152 testing::internal::HandleExceptionsInMethodIfSupported<>() #92 0x55b547766f97 testing::UnitTest::Run() #93 0x55b5499b0d01 RUN_ALL_TESTS() #94 0x55b5499af562 base::TestSuite::Run() #95 0x55b549913b57 ChromeTestSuiteRunner::RunTestSuite() #96 0x55b549913c43 ChromeTestLauncherDelegate::RunTestSuite() #97 0x55b54a32b005 content::LaunchTests() #98 0x55b549913f87 LaunchChromeTests() #99 0x55b5499139ab main #100 0x7f9a74b2ff45 __libc_start_main #101 0x55b54546c02a _start [75/601] PluginPowerSaverBrowserTest.BlockTinyPlugins (CRASHED) [76/601] PermissionRequestManagerBrowserTest.KillSwitchGeolocation (6558 ms) [77/601] CloudPolicyTest.FetchPolicyWithRotatedKey (7346 ms) [78/601] KeyRotationComponentCloudPolicyTest.Basic (7876 ms) [79/601] ArcPolicyTest.ArcBackupRestoreServiceEnabled (6038 ms) [80/601] PolicyTest.SavingBrowserHistoryDisabled (6558 ms) [81/601] LoadingPredictorBrowserTest.PreconnectNonCorsAndFetchCors (6817 ms) [0212/010801.806889:ERROR:kill_posix.cc(84)] Unable to terminate process group 8266: No such process (3) [ RUN ] PrerenderBrowserTest.AutosigninInPrerenderer [1:1:0212/010757.863203:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [8266:8266:0212/010758.259197:WARNING:chrome_browser_main_chromeos.cc(557)] Running as stub user with profile dir: test-user [8266:8266:0212/010758.939441:INFO:remote_commands_service.cc(38)] Fetching remote commands. [8266:8266:0212/010758.939680:WARNING:remote_commands_service.cc(40)] Client is not registered. [8266:8266:0212/010758.939859:INFO:remote_commands_invalidator.cc(32)] Initialize RemoteCommandsInvalidator. [8266:8266:0212/010758.940009:INFO:remote_commands_invalidator.cc(57)] Starting RemoteCommandsInvalidator. [8266:8266:0212/010758.940122:INFO:remote_commands_invalidator.cc(123)] RemoteCommandsInvalidator ReloadPolicyData. [8266:8266:0212/010758.940225:INFO:remote_commands_invalidator.cc(167)] Unregister RemoteCommandsInvalidator. [8266:8266:0212/010759.226537:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [8266:8266:0212/010800.446458:FATAL:shelf_widget.cc(293)] Check failed: login_shelf_view_->visible(). #0 0x7f07c6a7a901 base::debug::CollectStackTrace() #1 0x7f07c68e2c1d base::debug::StackTrace::StackTrace() #2 0x7f07c68e2bd5 base::debug::StackTrace::StackTrace() #3 0x7f07c691d827 logging::LogMessage::~LogMessage() #4 0x7f07b1b4df47 ash::ShelfWidget::GetHitTestRects() #5 0x7f07b1b4ff11 ash::ShelfWindowTargeter::GetHitTestRects() #6 0x7f07b97003ae aura::WindowTargeter::EventLocationInsideBounds() #7 0x7f07b05cd7d0 wm::EasyResizeWindowTargeter::EventLocationInsideBounds() #8 0x7f07b96fee04 aura::WindowTargeter::SubtreeShouldBeExploredForEvent() #9 0x7f07b9700046 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #10 0x7f07b96ffef3 aura::WindowTargeter::FindTargetForLocatedEvent() #11 0x7f07b1b0622b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #12 0x7f07b96ffc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #13 0x7f07b96ffaa1 aura::WindowTargeter::FindTargetForEvent() #14 0x7f07b9700096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #15 0x7f07b96ffef3 aura::WindowTargeter::FindTargetForLocatedEvent() #16 0x7f07b1b0622b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #17 0x7f07b96ffc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #18 0x7f07b96ffaa1 aura::WindowTargeter::FindTargetForEvent() #19 0x7f07b9700096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #20 0x7f07b96ffef3 aura::WindowTargeter::FindTargetForLocatedEvent() #21 0x7f07b1b0622b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #22 0x7f07b96ffc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #23 0x7f07b96ffaa1 aura::WindowTargeter::FindTargetForEvent() #24 0x7f07bb925c0c ui::EventProcessor::OnEventFromSource() #25 0x7f07bb925fac ui::EventProcessor::OnEventFromSource() #26 0x7f07b013aa1f ws::EventQueue::DeliverOrQueueEvent() #27 0x7f07b1a7a2b8 ash::AshWindowTreeHostPlatform::DeliverEventToSink() #28 0x7f07b1a7a35c ash::AshWindowTreeHostPlatform::DeliverEventToSink() #29 0x7f07bb9269f8 ui::EventSource::SendEventToSinkFromRewriter() #30 0x7f07bb926591 ui::EventSource::SendEventToSink() #31 0x7f07b970601d aura::WindowTreeHostPlatform::DispatchEvent() #32 0x7f07b1a7a191 ash::AshWindowTreeHostPlatform::DispatchEvent() #33 0x7f07b0f53f55 base::internal::FunctorTraits<>::Invoke<>() #34 0x7f07b0f53eb6 base::internal::InvokeHelper<>::MakeItSo<>() #35 0x7f07b0f53e47 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui22PlatformWindowDelegateEFvPNS3_5EventEEJNS0_17UnretainedWrapperIS4_EEEEEFvS6_EE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOS6_ #36 0x7f07b0f53de9 base::internal::Invoker<>::RunOnce() #37 0x7f07bb932db3 _ZNO4base12OnceCallbackIFvPN2ui5EventEEE3RunES3_ #38 0x7f07bb932be4 ui::DispatchEventFromNativeUiEvent() #39 0x7f07b0fca4bc ui::X11WindowOzone::DispatchEvent() #40 0x7f07c19fe887 ui::PlatformEventSource::DispatchEvent() #41 0x7f079a1fc4a9 ui::X11EventSourceLibevent::DispatchPlatformEvent() #42 0x7f079a1fc053 ui::X11EventSourceLibevent::ProcessXEvent() #43 0x7f079a1ee8a5 ui::X11EventSource::ExtractCookieDataDispatchEvent() #44 0x7f079a1ee82e ui::X11EventSource::DispatchXEvents() #45 0x7f079a1fc70f ui::X11EventSourceLibevent::OnFileCanReadWithoutBlocking() #46 0x7f07c6aadcae base::MessagePumpLibevent::FdWatchController::OnFileCanReadWithoutBlocking() #47 0x7f07c6aaedcd base::MessagePumpLibevent::OnLibeventNotification() #48 0x7f07c6af71fe event_process_active #49 0x7f07c6af6847 event_base_loop #50 0x7f07c6aaeea4 base::MessagePumpLibevent::Run() #51 0x7f07c69df02c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #52 0x7f07c69839d7 base::RunLoop::Run() #53 0x55a6952b2c8e content::RunThisRunLoop() #54 0x55a6952b2e33 content::RunAllPendingInMessageLoop() #55 0x55a694912111 InProcessBrowserTest::PreRunTestOnMainThread() #56 0x55a695265cde content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #57 0x55a69044a69d base::internal::FunctorTraits<>::Invoke<>() #58 0x55a69044a5e1 base::internal::InvokeHelper<>::MakeItSo<>() #59 0x55a69044a587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #60 0x55a69061683c base::internal::Invoker<>::Run() #61 0x55a69043df8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #62 0x55a6949b2d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #63 0x55a6949b1b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #64 0x55a6921944dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #65 0x7f07bf0f8807 content::BrowserMainLoop::PreMainMessageLoopRun() #66 0x7f07be4d461d base::internal::FunctorTraits<>::Invoke<>() #67 0x7f07be4d4591 base::internal::InvokeHelper<>::MakeItSo<>() #68 0x7f07be4d4537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #69 0x7f07beea011c base::internal::Invoker<>::Run() #70 0x7f07be448d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #71 0x7f07bf90bacc content::StartupTaskRunner::RunAllTasksNow() #72 0x7f07bf0f6fc1 content::BrowserMainLoop::CreateStartupTasks() #73 0x7f07bf0fdece content::BrowserMainRunnerImpl::Initialize() #74 0x7f07bf0f4361 content::BrowserMain() #75 0x7f07c045bd2b content::RunBrowserProcessMain() #76 0x7f07c045cfe6 content::ContentMainRunnerImpl::RunServiceManager() #77 0x7f07c045caa0 content::ContentMainRunnerImpl::Run() #78 0x7f07c045a589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #79 0x7f079dd1d703 service_manager::Main() #80 0x7f07c045b835 content::ContentMain() #81 0x55a695265a19 content::BrowserTestBase::SetUp() #82 0x55a694910f4e InProcessBrowserTest::SetUp() #83 0x55a6926ef63e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #84 0x55a6926eb302 testing::internal::HandleExceptionsInMethodIfSupported<>() #85 0x55a6926deb94 testing::Test::Run() #86 0x55a6926df282 testing::TestInfo::Run() #87 0x55a6926df793 testing::TestSuite::Run() #88 0x55a6926e7274 testing::internal::UnitTestImpl::RunAllTests() #89 0x55a6926ef6ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #90 0x55a6926ec152 testing::internal::HandleExceptionsInMethodIfSupported<>() #91 0x55a6926e6f97 testing::UnitTest::Run() #92 0x55a694930d01 RUN_ALL_TESTS() #93 0x55a69492f562 base::TestSuite::Run() #94 0x55a694893b57 ChromeTestSuiteRunner::RunTestSuite() #95 0x55a694893c43 ChromeTestLauncherDelegate::RunTestSuite() #96 0x55a6952ab005 content::LaunchTests() #97 0x55a694893f87 LaunchChromeTests() #98 0x55a6948939ab main #99 0x7f079f1e2f45 __libc_start_main #100 0x55a6903ec02a _start [82/601] PrerenderBrowserTest.AutosigninInPrerenderer (CRASHED) [83/601] PrerenderBrowserTest.PrerenderSSLErrorTopLevel (6819 ms) [84/601] PrerenderBrowserTest.PrerenderKeepSubresourceExtensionScheme (7080 ms) [85/601] PrerenderBrowserTest.FirstContentfulPaintHidden (6818 ms) [86/601] NoStatePrefetchBrowserTest.PrefetchCrossDomain (6827 ms) [87/601] NoStatePrefetchBrowserTest.PrerenderSafeBrowsingSubresource (6819 ms) [88/601] NoStatePrefetchBrowserTest.PrefetchSimultaneous (7343 ms) [89/601] ResourceLoadingHintsBrowserTest.ResourceLoadingHintsHttpsNoWhitelisted (6824 ms) [90/601] PushMessagingBrowserTest.PushEventNoServiceWorker (6569 ms) [91/601] PushMessagingBrowserTest.LocalResetNotificationsPermissionUnsubscribes (6820 ms) [92/601] ReferrerPolicyTest.HttpsRedirect (6829 ms) [93/601] ReferrerPolicyTest.HttpLeftClickRedirectDefaultNoFlag (7085 ms) [94/601] LocalSiteCharacteristicsDatabaseTest.NoFeatureUsed (8398 ms) [95/601] TabActivityWatcherUkmTest.SwitchWindows (7868 ms) [96/601] TabRestoreTest.DontLoadRestoredTab (7876 ms) [97/601] PopupTrackerBrowserTest.NoPopup_NoTracker (6302 ms) [98/601] TabRestoreTest.TabsFromRestoredWindowsAreLoadedGradually (12849 ms) [99/601] SiteDetailsBrowserTest.ExtensionWithTwoWebIframes (7612 ms) [100/601] SafeBrowsingTriggeredPopupBlockerBrowserTest.DrivenByEnterprisePolicy (8669 ms) [101/601] TtsApiTest.PlatformSpeakInterrupt (6319 ms) [102/601] TtsApiTest.PlatformSpeakQueueInterrupt (6819 ms) [103/601] TtsApiTest.PlatformSpeakError (6823 ms) [104/601] SpellcheckServiceBrowserTest.KeepSpellcheckLanguagesInAcceptLanguages (5770 ms) [105/601] CertVerifierBrowserTest.MockCertVerifierSmokeTest (7081 ms) [106/601] TypedNavigationTimingThrottleBrowserTest.HistogramUpdatedWhenRedirected (6571 ms) [107/601] AdDelayBrowserTest.NonIsolatedAdRequest_IsDelayed (6571 ms) [108/601] MinimalAdDelayBrowserTest.AdRequest_IsNotBlackholed (6294 ms) [109/601] SubresourceFilterPopupBrowserTest.AllowCreatingNewWindows_NoLogToConsole (7085 ms) [110/601] AdTaggingBrowserTest.VerifyCrossOriginWithoutNavigate (7611 ms) [111/601] SubresourceFilterSettingsBrowserTest.ContentSettingsAllowWithNoPageActivation_DoNotActivate (7083 ms) [112/601] TranslateManagerBrowserTest.PageLanguageDetectionConflict (7080 ms) [113/601] SaveCardBubbleControllerImplTest.InvokeUi_Server (6034 ms) [114/601] BookmarkBrowsertest.DragMultipleBookmarks (6039 ms) [115/601] KioskModeTest.EnableKioskModeTest (5769 ms) [116/601] BrowserTest.RenderIdleTime (6301 ms) [117/601] BrowserCommandsTest.BookmarkCurrentPageAfterCloseTabs (6294 ms) [118/601] BrowserNavigatorTest.AppInstalled_OpenAppWindowIfPossible_False (6294 ms) [119/601] BrowserNavigatorTest.Disposition_Incognito (7086 ms) [120/601] FullscreenControllerTest.FastMouseLockUnlockRelock (6821 ms) [121/601] FullscreenControllerTest.KeyboardLockExitsOnEscPressWhenEscNotLocked (7081 ms) [122/601] FindInPageControllerTest.SelectChangesOrdinal_Issue20883 (6823 ms) [123/601] JavaScriptDialogTest.ReloadDoesntHang (6831 ms) [124/601] JavaScriptDialogTest.DismissalCauseUkm (7088 ms) [125/601] FindInPageControllerTest.FindDisappearOnNewTabAndHistory (9443 ms) [126/601] LoginPromptBrowserTest.TestCancelAuth_OnBack (7352 ms) [127/601] BrowserNavigatorTest.NavigateFromNTPToOptionsPageInSameTab (29908 ms) [128/601] LocalNTPTest.SpareProcessDoesntInterfereWithSearchAPI (8932 ms) [129/601] LocalNTPDoodleTest.ShouldBeUnchangedOnLogoFetchCancelled (8920 ms) [130/601] LocalNTPJavascriptTest.CustomBackgroundsTests (11032 ms) [131/601] SettingsWindowManagerTest.OpenChromePages (9709 ms) [132/601] ContentSettingBubbleContentsBrowserTest.HidesAtWebContentsClose (9708 ms) [133/601] BookmarkAppTest.EngagementHistogramTwoApps (9723 ms) [134/601] UnloadTest.CrossSiteInfiniteUnloadAsync (7604 ms) [135/601] InterstitialUITest.UnwantedSoftwareInterstitial (9463 ms) [136/601] UnloadTest.BrowserCloseInfiniteUnload (7343 ms) [137/601] AutofillRendererTest.DontCrashWhileAssociatingForms (1835 ms) [138/601] FormAutocompleteTest.AjaxSucceeded_NoLongerVisible (2360 ms) [139/601] FormAutofillTest.WebFormControlElementToFormFieldLongSelect (2885 ms) [140/601] UnloadTest.BrowserListForceCloseAfterNormalClose (5245 ms) [141/601] FormAutofillTest.InvalidLabels (2360 ms) [142/601] FormAutofillTest.LabelsInferredFromTableWithSpecialElements (1836 ms) [143/601] FormAutofillTest.ClearSectionWithNodeContainingSelectOneForUnownedForm (1837 ms) [144/601] FormControlClickDetectionTest.InputRightClicked (1836 ms) [145/601] PagePasswordsAnalyserTest.PasswordFormWithoutUsernameField (1836 ms) [146/601] PasswordAutofillAgentTest.AutocompletePasswordForReadonlyUsernamePrefixMatched (1836 ms) [147/601] PasswordAutofillAgentTest.NoAutocompleteForFilledFieldUnmatched (1835 ms) [148/601] WebUIRequiringGestureBrowserTest.MessageRequiringGestureIgnoresRendererOnlyGesture (17309 ms) [149/601] PasswordAutofillAgentTest.WaitUsername (1835 ms) [150/601] PasswordAutofillAgentTest.PasswordNotClearedOnEdit (2098 ms) [151/601] PasswordAutofillAgentTest.SendPasswordFormsTest_PasswordChangeForm (1836 ms) [152/601] PasswordAutofillAgentTest.GestureRequiredTest (1835 ms) [153/601] PasswordAutofillAgentTest.FillIntoFocusedFieldForNonClickFocus (1835 ms) [154/601] PasswordAutofillAgentTest.FillOnAccountSelectOnlyReadonlyUsername (1836 ms) [155/601] PasswordAutofillAgentTest.RememberFieldPropertiesOnSameDocumentNavigation_2 (2096 ms) [156/601] PasswordAutofillAgentTest.FillOnAccountSelectOnlyNoUsername (1836 ms) [157/601] PasswordAutofillAgentTest.NoForm_PromptForAJAXSubmitWithoutNavigation (2097 ms) [158/601] PasswordGenerationAgentTest.MessagesAfterAccountSignupFormFound (1836 ms) [159/601] PasswordGenerationAgentTest.JavascriptClearedTheField (1834 ms) [160/601] ContentSettingsObserverBrowserTest.ContentSettingsNoscriptTag (1836 ms) [161/601] TranslateHelperBrowserTest.LanguageMetaTagCase (1836 ms) [162/601] TranslateScriptBrowserTest.TranslateSuccess (1834 ms) [163/601] WebUIResourceBrowserTest.EventTargetTest (6296 ms) [164/601] TestChromeWebUIControllerFactoryTest.TestWebUIProvider (6822 ms) [165/601] OriginPolicyBrowserTest.ErrorPolicy307Redirect (6558 ms) [166/601] OutOfProcessPPAPITest.TCPSocket_ConnectHangs (8128 ms) [0212/011012.281410:ERROR:kill_posix.cc(84)] Unable to terminate process group 13905: No such process (3) [ RUN ] OutOfProcessPPAPITest.TCPSocket_ListenHangs [1:1:0212/011008.590013:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [13905:13905:0212/011008.849423:WARNING:chrome_browser_main_chromeos.cc(557)] Running as stub user with profile dir: test-user [13905:13905:0212/011009.448181:INFO:remote_commands_service.cc(38)] Fetching remote commands. [13905:13905:0212/011009.448470:WARNING:remote_commands_service.cc(40)] Client is not registered. [13905:13905:0212/011009.448647:INFO:remote_commands_invalidator.cc(32)] Initialize RemoteCommandsInvalidator. [13905:13905:0212/011009.448788:INFO:remote_commands_invalidator.cc(57)] Starting RemoteCommandsInvalidator. [13905:13905:0212/011009.448903:INFO:remote_commands_invalidator.cc(123)] RemoteCommandsInvalidator ReloadPolicyData. [13905:13905:0212/011009.449007:INFO:remote_commands_invalidator.cc(167)] Unregister RemoteCommandsInvalidator. [13905:13905:0212/011009.709071:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [13905:13905:0212/011010.985771:FATAL:shelf_widget.cc(293)] Check failed: login_shelf_view_->visible(). #0 0x7fc09347f901 base::debug::CollectStackTrace() #1 0x7fc0932e7c1d base::debug::StackTrace::StackTrace() #2 0x7fc0932e7bd5 base::debug::StackTrace::StackTrace() #3 0x7fc093322827 logging::LogMessage::~LogMessage() #4 0x7fc07e552f47 ash::ShelfWidget::GetHitTestRects() #5 0x7fc07e554f11 ash::ShelfWindowTargeter::GetHitTestRects() #6 0x7fc0861053ae aura::WindowTargeter::EventLocationInsideBounds() #7 0x7fc07cfd27d0 wm::EasyResizeWindowTargeter::EventLocationInsideBounds() #8 0x7fc086103e04 aura::WindowTargeter::SubtreeShouldBeExploredForEvent() #9 0x7fc086105046 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #10 0x7fc086104ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #11 0x7fc07e50b22b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #12 0x7fc086104c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #13 0x7fc086104aa1 aura::WindowTargeter::FindTargetForEvent() #14 0x7fc086105096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #15 0x7fc086104ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #16 0x7fc07e50b22b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #17 0x7fc086104c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #18 0x7fc086104aa1 aura::WindowTargeter::FindTargetForEvent() #19 0x7fc086105096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #20 0x7fc086104ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #21 0x7fc07e50b22b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #22 0x7fc086104c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #23 0x7fc086104aa1 aura::WindowTargeter::FindTargetForEvent() #24 0x7fc08832ac0c ui::EventProcessor::OnEventFromSource() #25 0x7fc08832afac ui::EventProcessor::OnEventFromSource() #26 0x7fc07cb3fa1f ws::EventQueue::DeliverOrQueueEvent() #27 0x7fc07e47f2b8 ash::AshWindowTreeHostPlatform::DeliverEventToSink() #28 0x7fc07e47f35c ash::AshWindowTreeHostPlatform::DeliverEventToSink() #29 0x7fc08832b9f8 ui::EventSource::SendEventToSinkFromRewriter() #30 0x7fc08832b591 ui::EventSource::SendEventToSink() #31 0x7fc08610b01d aura::WindowTreeHostPlatform::DispatchEvent() #32 0x7fc07e47f191 ash::AshWindowTreeHostPlatform::DispatchEvent() #33 0x7fc07d958f55 base::internal::FunctorTraits<>::Invoke<>() #34 0x7fc07d958eb6 base::internal::InvokeHelper<>::MakeItSo<>() #35 0x7fc07d958e47 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui22PlatformWindowDelegateEFvPNS3_5EventEEJNS0_17UnretainedWrapperIS4_EEEEEFvS6_EE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOS6_ #36 0x7fc07d958de9 base::internal::Invoker<>::RunOnce() #37 0x7fc088337db3 _ZNO4base12OnceCallbackIFvPN2ui5EventEEE3RunES3_ #38 0x7fc088337be4 ui::DispatchEventFromNativeUiEvent() #39 0x7fc07d9cf4bc ui::X11WindowOzone::DispatchEvent() #40 0x7fc08e403887 ui::PlatformEventSource::DispatchEvent() #41 0x7fc066c014a9 ui::X11EventSourceLibevent::DispatchPlatformEvent() #42 0x7fc066c01053 ui::X11EventSourceLibevent::ProcessXEvent() #43 0x7fc066bf38a5 ui::X11EventSource::ExtractCookieDataDispatchEvent() #44 0x7fc066bf382e ui::X11EventSource::DispatchXEvents() #45 0x7fc066c0170f ui::X11EventSourceLibevent::OnFileCanReadWithoutBlocking() #46 0x7fc0934b2cae base::MessagePumpLibevent::FdWatchController::OnFileCanReadWithoutBlocking() #47 0x7fc0934b3dcd base::MessagePumpLibevent::OnLibeventNotification() #48 0x7fc0934fc1fe event_process_active #49 0x7fc0934fb847 event_base_loop #50 0x7fc0934b3ea4 base::MessagePumpLibevent::Run() #51 0x7fc0933e402c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #52 0x7fc0933889d7 base::RunLoop::Run() #53 0x55a772655c8e content::RunThisRunLoop() #54 0x55a772655e33 content::RunAllPendingInMessageLoop() #55 0x55a771cb5111 InProcessBrowserTest::PreRunTestOnMainThread() #56 0x55a772608cde content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #57 0x55a76d7ed69d base::internal::FunctorTraits<>::Invoke<>() #58 0x55a76d7ed5e1 base::internal::InvokeHelper<>::MakeItSo<>() #59 0x55a76d7ed587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #60 0x55a76d9b983c base::internal::Invoker<>::Run() #61 0x55a76d7e0f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #62 0x55a771d55d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #63 0x55a771d54b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #64 0x55a76f5374dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #65 0x7fc08bafd807 content::BrowserMainLoop::PreMainMessageLoopRun() #66 0x7fc08aed961d base::internal::FunctorTraits<>::Invoke<>() #67 0x7fc08aed9591 base::internal::InvokeHelper<>::MakeItSo<>() #68 0x7fc08aed9537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #69 0x7fc08b8a511c base::internal::Invoker<>::Run() #70 0x7fc08ae4dd5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #71 0x7fc08c310acc content::StartupTaskRunner::RunAllTasksNow() #72 0x7fc08bafbfc1 content::BrowserMainLoop::CreateStartupTasks() #73 0x7fc08bb02ece content::BrowserMainRunnerImpl::Initialize() #74 0x7fc08baf9361 content::BrowserMain() #75 0x7fc08ce60d2b content::RunBrowserProcessMain() #76 0x7fc08ce61fe6 content::ContentMainRunnerImpl::RunServiceManager() #77 0x7fc08ce61aa0 content::ContentMainRunnerImpl::Run() #78 0x7fc08ce5f589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #79 0x7fc06a722703 service_manager::Main() #80 0x7fc08ce60835 content::ContentMain() #81 0x55a772608a19 content::BrowserTestBase::SetUp() #82 0x55a771cb3f4e InProcessBrowserTest::SetUp() #83 0x55a771cc0abb PPAPITestBase::SetUp() #84 0x55a76fa9263e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #85 0x55a76fa8e302 testing::internal::HandleExceptionsInMethodIfSupported<>() #86 0x55a76fa81b94 testing::Test::Run() #87 0x55a76fa82282 testing::TestInfo::Run() #88 0x55a76fa82793 testing::TestSuite::Run() #89 0x55a76fa8a274 testing::internal::UnitTestImpl::RunAllTests() #90 0x55a76fa926ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #91 0x55a76fa8f152 testing::internal::HandleExceptionsInMethodIfSupported<>() #92 0x55a76fa89f97 testing::UnitTest::Run() #93 0x55a771cd3d01 RUN_ALL_TESTS() #94 0x55a771cd2562 base::TestSuite::Run() #95 0x55a771c36b57 ChromeTestSuiteRunner::RunTestSuite() #96 0x55a771c36c43 ChromeTestLauncherDelegate::RunTestSuite() #97 0x55a77264e005 content::LaunchTests() #98 0x55a771c36f87 LaunchChromeTests() #99 0x55a771c369ab main #100 0x7fc06bbe7f45 __libc_start_main #101 0x55a76d78f02a _start [167/601] OutOfProcessPPAPITest.TCPSocket_ListenHangs (CRASHED) [168/601] OutOfProcessPPAPITest.TCPSocket_WriteClosePipe (7608 ms) [169/601] OutOfProcessPPAPITest.UDPSocket_Broadcast (7868 ms) [170/601] PPAPIBrokerInfoBarTest.Deny (9184 ms) [0212/011020.643283:ERROR:kill_posix.cc(84)] Unable to terminate process group 14267: No such process (3) [ RUN ] PPAPINaClNewlibTest.InputEvent [1:1:0212/011016.452500:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [14267:14267:0212/011016.816796:WARNING:chrome_browser_main_chromeos.cc(557)] Running as stub user with profile dir: test-user [14267:14267:0212/011017.679895:INFO:remote_commands_service.cc(38)] Fetching remote commands. [14267:14267:0212/011017.684234:WARNING:remote_commands_service.cc(40)] Client is not registered. [14267:14267:0212/011017.684449:INFO:remote_commands_invalidator.cc(32)] Initialize RemoteCommandsInvalidator. [14267:14267:0212/011017.686225:INFO:remote_commands_invalidator.cc(57)] Starting RemoteCommandsInvalidator. [14267:14267:0212/011017.686355:INFO:remote_commands_invalidator.cc(123)] RemoteCommandsInvalidator ReloadPolicyData. [14267:14267:0212/011017.686455:INFO:remote_commands_invalidator.cc(167)] Unregister RemoteCommandsInvalidator. [14267:14267:0212/011018.056164:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [14267:14267:0212/011019.324550:FATAL:shelf_widget.cc(293)] Check failed: login_shelf_view_->visible(). #0 0x7ff40bc86901 base::debug::CollectStackTrace() #1 0x7ff40baeec1d base::debug::StackTrace::StackTrace() #2 0x7ff40baeebd5 base::debug::StackTrace::StackTrace() #3 0x7ff40bb29827 logging::LogMessage::~LogMessage() #4 0x7ff3f6d59f47 ash::ShelfWidget::GetHitTestRects() #5 0x7ff3f6d5bf11 ash::ShelfWindowTargeter::GetHitTestRects() #6 0x7ff3fe90c3ae aura::WindowTargeter::EventLocationInsideBounds() #7 0x7ff3f57d97d0 wm::EasyResizeWindowTargeter::EventLocationInsideBounds() #8 0x7ff3fe90ae04 aura::WindowTargeter::SubtreeShouldBeExploredForEvent() #9 0x7ff3fe90c046 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #10 0x7ff3fe90bef3 aura::WindowTargeter::FindTargetForLocatedEvent() #11 0x7ff3f6d1222b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #12 0x7ff3fe90bc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #13 0x7ff3fe90baa1 aura::WindowTargeter::FindTargetForEvent() #14 0x7ff3fe90c096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #15 0x7ff3fe90bef3 aura::WindowTargeter::FindTargetForLocatedEvent() #16 0x7ff3f6d1222b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #17 0x7ff3fe90bc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #18 0x7ff3fe90baa1 aura::WindowTargeter::FindTargetForEvent() #19 0x7ff3fe90c096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #20 0x7ff3fe90bef3 aura::WindowTargeter::FindTargetForLocatedEvent() #21 0x7ff3f6d1222b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #22 0x7ff3fe90bc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #23 0x7ff3fe90baa1 aura::WindowTargeter::FindTargetForEvent() #24 0x7ff400b31c0c ui::EventProcessor::OnEventFromSource() #25 0x7ff400b31fac ui::EventProcessor::OnEventFromSource() #26 0x7ff3f5346a1f ws::EventQueue::DeliverOrQueueEvent() #27 0x7ff3f6c862b8 ash::AshWindowTreeHostPlatform::DeliverEventToSink() #28 0x7ff3f6c8635c ash::AshWindowTreeHostPlatform::DeliverEventToSink() #29 0x7ff400b329f8 ui::EventSource::SendEventToSinkFromRewriter() #30 0x7ff400b32591 ui::EventSource::SendEventToSink() #31 0x7ff3fe91201d aura::WindowTreeHostPlatform::DispatchEvent() #32 0x7ff3f6c86191 ash::AshWindowTreeHostPlatform::DispatchEvent() #33 0x7ff3f615ff55 base::internal::FunctorTraits<>::Invoke<>() #34 0x7ff3f615feb6 base::internal::InvokeHelper<>::MakeItSo<>() #35 0x7ff3f615fe47 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui22PlatformWindowDelegateEFvPNS3_5EventEEJNS0_17UnretainedWrapperIS4_EEEEEFvS6_EE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOS6_ #36 0x7ff3f615fde9 base::internal::Invoker<>::RunOnce() #37 0x7ff400b3edb3 _ZNO4base12OnceCallbackIFvPN2ui5EventEEE3RunES3_ #38 0x7ff400b3ebe4 ui::DispatchEventFromNativeUiEvent() #39 0x7ff3f61d64bc ui::X11WindowOzone::DispatchEvent() #40 0x7ff406c0a887 ui::PlatformEventSource::DispatchEvent() #41 0x7ff3df4084a9 ui::X11EventSourceLibevent::DispatchPlatformEvent() #42 0x7ff3df408053 ui::X11EventSourceLibevent::ProcessXEvent() #43 0x7ff3df3fa8a5 ui::X11EventSource::ExtractCookieDataDispatchEvent() #44 0x7ff3df3fa82e ui::X11EventSource::DispatchXEvents() #45 0x7ff3df40870f ui::X11EventSourceLibevent::OnFileCanReadWithoutBlocking() #46 0x7ff40bcb9cae base::MessagePumpLibevent::FdWatchController::OnFileCanReadWithoutBlocking() #47 0x7ff40bcbadcd base::MessagePumpLibevent::OnLibeventNotification() #48 0x7ff40bd031fe event_process_active #49 0x7ff40bd02847 event_base_loop #50 0x7ff40bcbaea4 base::MessagePumpLibevent::Run() #51 0x7ff40bbeb02c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #52 0x7ff40bb8f9d7 base::RunLoop::Run() #53 0x55fb3ad2ac8e content::RunThisRunLoop() #54 0x55fb3ad2ae33 content::RunAllPendingInMessageLoop() #55 0x55fb3a38a111 InProcessBrowserTest::PreRunTestOnMainThread() #56 0x55fb3acddcde content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #57 0x55fb35ec269d base::internal::FunctorTraits<>::Invoke<>() #58 0x55fb35ec25e1 base::internal::InvokeHelper<>::MakeItSo<>() #59 0x55fb35ec2587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #60 0x55fb3608e83c base::internal::Invoker<>::Run() #61 0x55fb35eb5f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #62 0x55fb3a42ad9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #63 0x55fb3a429b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #64 0x55fb37c0c4dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #65 0x7ff404304807 content::BrowserMainLoop::PreMainMessageLoopRun() #66 0x7ff4036e061d base::internal::FunctorTraits<>::Invoke<>() #67 0x7ff4036e0591 base::internal::InvokeHelper<>::MakeItSo<>() #68 0x7ff4036e0537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #69 0x7ff4040ac11c base::internal::Invoker<>::Run() #70 0x7ff403654d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #71 0x7ff404b17acc content::StartupTaskRunner::RunAllTasksNow() #72 0x7ff404302fc1 content::BrowserMainLoop::CreateStartupTasks() #73 0x7ff404309ece content::BrowserMainRunnerImpl::Initialize() #74 0x7ff404300361 content::BrowserMain() #75 0x7ff405667d2b content::RunBrowserProcessMain() #76 0x7ff405668fe6 content::ContentMainRunnerImpl::RunServiceManager() #77 0x7ff405668aa0 content::ContentMainRunnerImpl::Run() #78 0x7ff405666589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #79 0x7ff3e2f29703 service_manager::Main() #80 0x7ff405667835 content::ContentMain() #81 0x55fb3acdda19 content::BrowserTestBase::SetUp() #82 0x55fb3a388f4e InProcessBrowserTest::SetUp() #83 0x55fb3a395abb PPAPITestBase::SetUp() #84 0x55fb3816763e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #85 0x55fb38163302 testing::internal::HandleExceptionsInMethodIfSupported<>() #86 0x55fb38156b94 testing::Test::Run() #87 0x55fb38157282 testing::TestInfo::Run() #88 0x55fb38157793 testing::TestSuite::Run() #89 0x55fb3815f274 testing::internal::UnitTestImpl::RunAllTests() #90 0x55fb381676ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #91 0x55fb38164152 testing::internal::HandleExceptionsInMethodIfSupported<>() #92 0x55fb3815ef97 testing::UnitTest::Run() #93 0x55fb3a3a8d01 RUN_ALL_TESTS() #94 0x55fb3a3a7562 base::TestSuite::Run() #95 0x55fb3a30bb57 ChromeTestSuiteRunner::RunTestSuite() #96 0x55fb3a30bc43 ChromeTestLauncherDelegate::RunTestSuite() #97 0x55fb3ad23005 content::LaunchTests() #98 0x55fb3a30bf87 LaunchChromeTests() #99 0x55fb3a30b9ab main #100 0x7ff3e43eef45 __libc_start_main #101 0x55fb35e6402a _start [171/601] PPAPINaClNewlibTest.InputEvent (CRASHED) [172/601] PPAPINaClNewlibTest.Console (8925 ms) [173/601] PPAPINaClNewlibTest.Graphics2D_Describe (8398 ms) [174/601] PPAPINaClNewlibTest.Graphics3D (10774 ms) [175/601] PPAPINaClNewlibTest.TCPSocket_UnexpectedCalls (9452 ms) [176/601] PPAPINaClNewlibTest.UDPSocketPrivate_Connect (9181 ms) [177/601] PPAPINaClNewlibTest.UDPSocket_ReadError (9730 ms) [178/601] PPAPINaClPNaClNonSfiTest.InputEvent (8137 ms) [179/601] PPAPINaClPNaClNonSfiTest.TCPSocket_SetNoDelayError (8133 ms) [180/601] PPAPINaClNewlibTest.WebSocket1 (10230 ms) [181/601] PPAPINaClPNaClNonSfiTest.TCPSocket_BindError (7877 ms) [182/601] PPAPINaClPNaClNonSfiTest.TCPSocket_ListenClosePipe (7883 ms) [183/601] PPAPINaClPNaClNonSfiTest.UDPSocket_Broadcast (8141 ms) [184/601] PPAPINaClPNaClNonSfiTest.HostResolver (8130 ms) [185/601] PPAPINaClPNaClNonSfiTest.UMA (7628 ms) [186/601] PPAPINaClPNaClNonSfiTest.View (8400 ms) [187/601] PPAPINaClGLibcTest.TCPSocket_Listen (9441 ms) [188/601] PPAPINaClGLibcTest.TCPSocket_UnexpectedCalls (9442 ms) [189/601] PPAPINaClGLibcTest.TCPSocket_WriteError (9188 ms) [190/601] PPAPINaClGLibcTest.TCPSocket_ListenError (9709 ms) [191/601] PPAPINaClGLibcTest.TCPSocket_BindConnectError (9710 ms) [192/601] PPAPINaClGLibcTest.TCPServerSocketPrivate_ListenHangs (9452 ms) [193/601] PPAPINaClGLibcTest.TCPServerSocketPrivate_AcceptError (9704 ms) [194/601] NaClBrowserTestStatic.CorsNoCookie (7085 ms) [195/601] PPAPINaClGLibcTest.UDPSocket_ReadError (10254 ms) [196/601] NaClBrowserTestPnacl.ExitStatusNeg2 (9188 ms) [197/601] NaClBrowserTestNewlibVcacheExtension.ValidationCacheOfMainNexe (7619 ms) [198/601] ExtensionApiTest.ChromeIdentityJsBindings (6566 ms) [199/601] ExtensionApiTest.AlertBasic (7096 ms) [200/601] ExtensionApiTest.RequestQuotaInBackgroundPage (6558 ms) [201/601] ExtensionApiTest.GetViews (7343 ms) [202/601] ActivityLogPrerenderTest.TestScriptInjected (6564 ms) [203/601] AutomationApiTest.TestRendererAccessibilityEnabled (7083 ms) [204/601] AutomationApiTest.ReverseRelations (9447 ms) [205/601] AutomationApiTest.DocumentSelection (9184 ms) [206/601] ExtensionContentSettingsApiTest.ClearProperlyGranular (6033 ms) [207/601] CastStreamingApiTest.NullStream (9462 ms) [208/601] ExtensionContextMenuApiTest.ShowTopLevelSubmenuItemIfSomeOfChildrenAreVisible (6560 ms) [209/601] DeclarativeContentApiTest.ReusedActionInstance (6822 ms) [210/601] DownloadExtensionTest.DownloadExtensionTest_SearchOrderByEmpty (5774 ms) [211/601] DownloadExtensionTest.DownloadExtensionTest_Download_InvalidFilename (6821 ms) [212/601] ExtensionBrowserTest.PageActionSameDocumentNavigation (7353 ms) [213/601] ExtensionBrowserTest.RSSMultiRelLink (7344 ms) [214/601] FileSystemApiTest.FileSystemApiOpenExistingFileDefaultPathTest (7888 ms) [215/601] FileSystemApiTest.FileSystemApiOpenBackgroundTest (7613 ms) [216/601] FileSystemApiTest.FileSystemApiSaveExistingFileWithWriteTest (8675 ms) [217/601] FileSystemApiTestForDrive.FileSystemApiOpenExistingFileWithWriteTest (14962 ms) [218/601] GcmApiTest.OnSendError (10498 ms) [219/601] FileSystemApiTestForDrive.FileSystemApiSaveExistingFileWithWriteTest (14439 ms) [220/601] GetAuthTokenFunctionTest.NonInteractiveLoginAccessTokenFailure (9460 ms) [221/601] GetAuthTokenFunctionTest.InteractiveApprovalAborted (6558 ms) [222/601] GetAuthTokenFunctionTest.ManuallyIssueToken (6558 ms) [223/601] GetAuthTokenFunctionTest.MultiSecondaryInteractiveApprovalAborted (6048 ms) [224/601] InstanceIDApiTest.Incognito (6821 ms) [225/601] ExtensionManagementApiBrowserTest.GetSelfNoPermissions (6822 ms) [226/601] ExtensionManagementApiBrowserTest.CreateAppShortcutConfirmDialog (7350 ms) [227/601] ExtensionManagementApiTest.ManagementPolicyAllowed (7875 ms) [228/601] SettingsPrivateApiTest.SetPref (6818 ms) [229/601] ExtensionSettingsApiTest.ExtensionsSchemas (6562 ms) [230/601] GetUpdateStatusApiTest.Progress (6557 ms) [231/601] TabCaptureApiTest.Constraints (6826 ms) [232/601] ExtensionTabsTest.GetWindow (9707 ms) [233/601] ExtensionTabsTest.InvalidUpdateWindowState (6049 ms) [234/601] ExtensionTabsTest.DiscardWithId (6298 ms) [235/601] ExtensionWebRequestApiTest.IncognitoSplitModeReload (9183 ms) [236/601] AutoplayExtensionBrowserTest.AutoplayAllowedInIframe (7876 ms) [237/601] BookmarkAppHelperTest.InvokeUi_CreateWindowedPWA (7351 ms) [238/601] ContentCapabilitiesTest.ClipboardReadWrite (8138 ms) [239/601] ContentScriptApiTest.ContentScriptFragmentNavigation (8132 ms) [240/601] NTPInterceptionTest.ContentScript (8392 ms) [241/601] ExtensionCrxInstallerTest.UpdateWithFileAccess (7358 ms) [242/601] ChromeUpdatesEventsApiTest.PRE_ChromeUpdates (8141 ms) [243/601] ExecuteScriptApiTest.UserGesture (7618 ms) [244/601] ExtensionInstallPromptBrowserTest.NoParent (6299 ms) [245/601] ExtensionOverrideTest.OverrideHistory (6822 ms) [246/601] NativeBindingsApiTest.DeclarativeEvents (7621 ms) [247/601] NativeBindingsApiTest.LazyListeners (7088 ms) [248/601] ProcessManagerBrowserTest.ExtensionHostCreation (7080 ms) [249/601] ExtensionWebUITest.ReceivesExtensionOptionsOnClose (13394 ms) [250/601] WebstoreInstallerBrowserTest.SimultaneousInstall (6036 ms) [251/601] WindowOpenApiTest.OpenLockedFullscreenWindowWithoutPermission (6296 ms) [252/601] ArcAppsPrivateApiTest.GetPackageNameAndLaunchApp (6824 ms) [253/601] ManifestVerifierBrowserTest.BobPayHandlerCanUseMethodThatSupportsAllOrigins (6306 ms) [254/601] SaveCardBubbleViewsFullFormBrowserTest.Logic_ShouldOfferLocalSaveIfPaymentsDeclines (8395 ms) [255/601] SaveCardBubbleViewsFullFormBrowserTest.Upload_SubmittingFormWithConflictingNamesRequestsCardholderNameIfExpOn (9192 ms) [256/601] ExtensionInstallDialogViewInteractiveBrowserTest.InvokeUi_ManyPermissions (6825 ms) [257/601] ExtensionMessageBubbleViewBrowserTest.TestClickingDismissButton (5769 ms) [258/601] SaveCardBubbleViewsFullFormBrowserTest.Logic_ShouldNotOfferToSaveIfNothingFoundAndPaymentsDeclines (13118 ms) [259/601] PWAConfirmationViewTest.InvokeUi_long_text (5508 ms) [260/601] CustomTabBarViewBrowserTest.URLsWithEmojiArePunyCoded (7082 ms) [261/601] ZoomBubbleBrowserTest.BubbleSuppressingExtensionRefreshesExistingBubble (6304 ms) [262/601] MediaRouterWebUIBrowserTest.OpenDialogFromAppMenu (6823 ms) [263/601] PasswordDialogViewTest.PopupAccountChooserWithDisabledAutoSignin (7344 ms) [264/601] PasswordDialogViewTest.PopupAutoSigninPrompt (7360 ms) [265/601] PaymentRequestCvcUnmaskViewControllerTest.OpenGoBackOpenPay (7872 ms) [266/601] MediaRouterWebUIBrowserTest.OpenDialogWithMediaRouterAction (16004 ms) [267/601] PaymentRequestModifiersTest.ModifierAppliedToBasicCardWithoutTypeOrNetwork (7371 ms) [268/601] PaymentRequestNoShippingTest.InvalidSSL (6575 ms) [269/601] PaymentRequestCanMakePaymentQueryTest.CanMakePayment_NotSupported (6556 ms) [270/601] PaymentRequestCanMakePaymentQueryCCTest.QueryQuotaInIncognito (6556 ms) [271/601] PaymentRequestCanMakePaymentQueryPMITest.QueryQuotaForPaymentAppsInIncognitoMode (6822 ms) [272/601] PaymentRequestHasEnrolledInstrumentQueryTest.HasEnrolledInstrument_NotSupported (6832 ms) [273/601] PaymentSheetViewControllerNoShippingTest.NoData (6831 ms) [274/601] PaymentSheetViewControllerNoShippingTest.UnsupportedCard (6563 ms) [275/601] PaymentSheetViewControllerContactDetailsTest.AllClickableRowsPresent (6819 ms) [276/601] PaymentRequestShippingAddressEditorTest.DefaultRegion_RegionName (7605 ms) [277/601] DictationTest.RecognitionEndsWithChromeVoxEnabled (6564 ms) [278/601] PaymentRequestShippingOptionViewControllerTest.SelectingVariousShippingOptions (8395 ms) [279/601] DictationTest.UserEndsDictation (6040 ms) [280/601] KioskAppManagerTest.UpdateAppDataFromProfile (6031 ms) [281/601] SelectToSpeakTest.SpeakStatusTray (7617 ms) [282/601] ArcSessionManagerTest.ManagedChromeAccount (7342 ms) [283/601] ArcCertStoreBridgeTest.ListCertificatesBasicTest (7607 ms) [284/601] DisplayPrefsBrowserTest.PRE_DisplayRotation (5782 ms) [0212/011404.611280:ERROR:kill_posix.cc(84)] Unable to terminate process group 25314: No such process (3) [ RUN ] ExtensionEchoPrivateApiTest.GetUserConsent_InactiveTab [1:1:0212/011400.583477:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [25314:25314:0212/011401.061637:ERROR:device_network_configuration_updater.cc(157)] Couldn't get device setting cros.signed.data_roaming_enabled [25314:25314:0212/011401.338788:WARNING:user_policy_manager_factory_chromeos.cc(210)] No policy loaded for known non-enterprise user [25314:25314:0212/011401.458507:WARNING:merge_session_throttling_utils.cc(143)] Loading content for a profile without session restore? [25314:25314:0212/011401.762983:WARNING:merge_session_throttling_utils.cc(143)] Loading content for a profile without session restore? [25314:25314:0212/011401.916183:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [25314:25314:0212/011403.103091:FATAL:shelf_widget.cc(293)] Check failed: login_shelf_view_->visible(). #0 0x7f1e0f2b6901 base::debug::CollectStackTrace() #1 0x7f1e0f11ec1d base::debug::StackTrace::StackTrace() #2 0x7f1e0f11ebd5 base::debug::StackTrace::StackTrace() #3 0x7f1e0f159827 logging::LogMessage::~LogMessage() #4 0x7f1dfa389f47 ash::ShelfWidget::GetHitTestRects() #5 0x7f1dfa38bf11 ash::ShelfWindowTargeter::GetHitTestRects() #6 0x7f1e01f3c3ae aura::WindowTargeter::EventLocationInsideBounds() #7 0x7f1df8e097d0 wm::EasyResizeWindowTargeter::EventLocationInsideBounds() #8 0x7f1e01f3ae04 aura::WindowTargeter::SubtreeShouldBeExploredForEvent() #9 0x7f1e01f3c046 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #10 0x7f1e01f3bef3 aura::WindowTargeter::FindTargetForLocatedEvent() #11 0x7f1dfa34222b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #12 0x7f1e01f3bc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #13 0x7f1e01f3baa1 aura::WindowTargeter::FindTargetForEvent() #14 0x7f1e01f3c096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #15 0x7f1e01f3bef3 aura::WindowTargeter::FindTargetForLocatedEvent() #16 0x7f1dfa34222b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #17 0x7f1e01f3bc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #18 0x7f1e01f3baa1 aura::WindowTargeter::FindTargetForEvent() #19 0x7f1e01f3c096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #20 0x7f1e01f3bef3 aura::WindowTargeter::FindTargetForLocatedEvent() #21 0x7f1dfa34222b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #22 0x7f1e01f3bc8a aura::WindowTargeter::FindTargetForNonKeyEvent() #23 0x7f1e01f3baa1 aura::WindowTargeter::FindTargetForEvent() #24 0x7f1e04161c0c ui::EventProcessor::OnEventFromSource() #25 0x7f1e04161fac ui::EventProcessor::OnEventFromSource() #26 0x7f1df8976a1f ws::EventQueue::DeliverOrQueueEvent() #27 0x7f1dfa2b62b8 ash::AshWindowTreeHostPlatform::DeliverEventToSink() #28 0x7f1dfa2b635c ash::AshWindowTreeHostPlatform::DeliverEventToSink() #29 0x7f1e041629f8 ui::EventSource::SendEventToSinkFromRewriter() #30 0x7f1e04162591 ui::EventSource::SendEventToSink() #31 0x7f1e01f4201d aura::WindowTreeHostPlatform::DispatchEvent() #32 0x7f1dfa2b6191 ash::AshWindowTreeHostPlatform::DispatchEvent() #33 0x7f1df978ff55 base::internal::FunctorTraits<>::Invoke<>() #34 0x7f1df978feb6 base::internal::InvokeHelper<>::MakeItSo<>() #35 0x7f1df978fe47 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui22PlatformWindowDelegateEFvPNS3_5EventEEJNS0_17UnretainedWrapperIS4_EEEEEFvS6_EE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOS6_ #36 0x7f1df978fde9 base::internal::Invoker<>::RunOnce() #37 0x7f1e0416edb3 _ZNO4base12OnceCallbackIFvPN2ui5EventEEE3RunES3_ #38 0x7f1e0416ebe4 ui::DispatchEventFromNativeUiEvent() #39 0x7f1df98064bc ui::X11WindowOzone::DispatchEvent() #40 0x7f1e0a23a887 ui::PlatformEventSource::DispatchEvent() #41 0x7f1de2a384a9 ui::X11EventSourceLibevent::DispatchPlatformEvent() #42 0x7f1de2a38053 ui::X11EventSourceLibevent::ProcessXEvent() #43 0x7f1de2a2a8a5 ui::X11EventSource::ExtractCookieDataDispatchEvent() #44 0x7f1de2a2a82e ui::X11EventSource::DispatchXEvents() #45 0x7f1de2a3870f ui::X11EventSourceLibevent::OnFileCanReadWithoutBlocking() #46 0x7f1e0f2e9cae base::MessagePumpLibevent::FdWatchController::OnFileCanReadWithoutBlocking() #47 0x7f1e0f2eadcd base::MessagePumpLibevent::OnLibeventNotification() #48 0x7f1e0f3331fe event_process_active #49 0x7f1e0f332847 event_base_loop #50 0x7f1e0f2eaea4 base::MessagePumpLibevent::Run() #51 0x7f1e0f21b02c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #52 0x7f1e0f1bf9d7 base::RunLoop::Run() #53 0x5567d5471c8e content::RunThisRunLoop() #54 0x5567d5471e33 content::RunAllPendingInMessageLoop() #55 0x5567d4ad1111 InProcessBrowserTest::PreRunTestOnMainThread() #56 0x5567d5424cde content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #57 0x5567d060969d base::internal::FunctorTraits<>::Invoke<>() #58 0x5567d06095e1 base::internal::InvokeHelper<>::MakeItSo<>() #59 0x5567d0609587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #60 0x5567d07d583c base::internal::Invoker<>::Run() #61 0x5567d05fcf8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #62 0x5567d4b71d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #63 0x5567d4b70b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #64 0x5567d23534dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #65 0x7f1e07934807 content::BrowserMainLoop::PreMainMessageLoopRun() #66 0x7f1e06d1061d base::internal::FunctorTraits<>::Invoke<>() #67 0x7f1e06d10591 base::internal::InvokeHelper<>::MakeItSo<>() #68 0x7f1e06d10537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #69 0x7f1e076dc11c base::internal::Invoker<>::Run() #70 0x7f1e06c84d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #71 0x7f1e08147acc content::StartupTaskRunner::RunAllTasksNow() #72 0x7f1e07932fc1 content::BrowserMainLoop::CreateStartupTasks() #73 0x7f1e07939ece content::BrowserMainRunnerImpl::Initialize() #74 0x7f1e07930361 content::BrowserMain() #75 0x7f1e08c97d2b content::RunBrowserProcessMain() #76 0x7f1e08c98fe6 content::ContentMainRunnerImpl::RunServiceManager() #77 0x7f1e08c98aa0 content::ContentMainRunnerImpl::Run() #78 0x7f1e08c96589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #79 0x7f1de6559703 service_manager::Main() #80 0x7f1e08c97835 content::ContentMain() #81 0x5567d5424a19 content::BrowserTestBase::SetUp() #82 0x5567d4acff4e InProcessBrowserTest::SetUp() #83 0x5567d4a66dfb extensions::ExtensionBrowserTest::SetUp() #84 0x5567d28ae63e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #85 0x5567d28aa302 testing::internal::HandleExceptionsInMethodIfSupported<>() #86 0x5567d289db94 testing::Test::Run() #87 0x5567d289e282 testing::TestInfo::Run() #88 0x5567d289e793 testing::TestSuite::Run() #89 0x5567d28a6274 testing::internal::UnitTestImpl::RunAllTests() #90 0x5567d28ae6ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #91 0x5567d28ab152 testing::internal::HandleExceptionsInMethodIfSupported<>() #92 0x5567d28a5f97 testing::UnitTest::Run() #93 0x5567d4aefd01 RUN_ALL_TESTS() #94 0x5567d4aee562 base::TestSuite::Run() #95 0x5567d4a52b57 ChromeTestSuiteRunner::RunTestSuite() #96 0x5567d4a52c43 ChromeTestLauncherDelegate::RunTestSuite() #97 0x5567d546a005 content::LaunchTests() #98 0x5567d4a52f87 LaunchChromeTests() #99 0x5567d4a529ab main #100 0x7f1de7a1ef45 __libc_start_main #101 0x5567d05ab02a _start [285/601] ExtensionEchoPrivateApiTest.GetUserConsent_InactiveTab (CRASHED) [286/601] ExtensionEchoPrivateApiTest.GetUserConsent_ConsentDenied (6557 ms) [287/601] FileManagerPrivateApiTest.Crostini (6825 ms) [288/601] FileManagerPrivateApiTest.CrostiniIncognito (6036 ms) [289/601] FileSystemProviderApiTest.Notify (7619 ms) [290/601] FileManagerJsTest.ActionsSubmenuTest (9456 ms) [291/601] FileManagerJsTest.MultiMetadataProvider (8922 ms) [292/601] AudioPlayerBrowserTest.TogglePlayState (14952 ms) [293/601] TextInput_TextInputStateChangedTest.FocusOnLoadTest (8405 ms) [294/601] FileManagerUITest.ProgressCenter (18099 ms) [295/601] GalleryBrowserTestInGuestMode.CheckAvailabilityOfShareButtonOnDownloads (15234 ms) [296/601] GalleryBrowserTestInGuestMode.ResizeImageOnDownloads (18375 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ActiveDirectoryLoginAutocompleteTest.PRE_LoginSuccess --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsomCgsI/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dMTml3F ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ActiveDirectoryLoginAutocompleteTest.PRE_TestAutocomplete --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultshO9egN/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dBH8eRK ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=DemoSessionNonDemoEnrolledDeviceTest.NotDemoMode --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsoHko4R/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/d2RViFP ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=EnableDebuggingTest.ShowOnTestImages --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsfOfJSW/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dJlOxtU [297/601] ActiveDirectoryLoginAutocompleteTest.PRE_LoginSuccess (24917 ms) [298/601] ActiveDirectoryLoginAutocompleteTest.PRE_TestAutocomplete (24929 ms) [299/601] DemoSessionNonDemoEnrolledDeviceTest.NotDemoMode (25177 ms) [300/601] ExistingUserControllerPublicSessionTest.PRE_TestLoadingPublicUsersFromLocalState (3672 ms) [301/601] ExistingUserControllerPublicSessionTest.NoAutoLoginWhenUntrusted (3935 ms) [302/601] EnableDebuggingTest.ShowOnTestImages (25985 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=HidDetectionTest.NoDevicesConnected --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsZbvPkb/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dertnV8 ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=KioskTest.DoNotLaunchWhenUntrusted --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultshA9R9f/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/d1e1kKd ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=LoginSigninTest.WebUIVisible --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsg8m5Yk/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dAqMszi ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=LoginUITest.PRE_LoginNoExceptions --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsJy0tOp/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dq8SLon [303/601] HidDetectionTest.NoDevicesConnected (21513 ms) [304/601] LoginSigninTest.WebUIVisible (23611 ms) [305/601] KioskTest.DoNotLaunchWhenUntrusted (28867 ms) [306/601] LoginUITest.PRE_LoginNoExceptions (24413 ms) [307/601] HIDDetectionScreenTest.MouseKeyboardStates (7092 ms) [308/601] UpdateScreenTest.TestNoUpdate (6038 ms) [309/601] ResetFirstAfterBootTest.PRE_ShowAfterBootIfRequested (24927 ms) [310/601] UpdateScreenTest.TestVoidNetwork (6567 ms) [311/601] HIDDetectionScreenTest.BluetoothDeviceConnected (24395 ms) [312/601] SamlTest.ScrapedDynamic (32799 ms) [313/601] WizardControllerFlowTest.ControlFlowErrorUpdateRejectedOverCellular (4721 ms) [314/601] UserAddingScreenTest.PRE_CancelAdding (25704 ms) [315/601] DeviceCloudExternalDataPolicyObserverTest.DataSetAndDataClearedCalled (6293 ms) [316/601] WizardControllerDemoSetupTest.OnlineDemoSetupFlowFinished (19936 ms) [317/601] WebviewLoginTest.Basic (32788 ms) [318/601] DeviceStatusCollectorTest.WriteProtectSwitch (1577 ms) [319/601] ConsumerDeviceStatusCollectorTimeLimitEnabledTest.ActivityCrossingMidnight (1577 ms) [320/601] WebviewLoginTest.StoragePartitionHandling (32275 ms) [321/601] DownloadNotificationTest.DownloadRemoved (6560 ms) [322/601] DownloadNotificationTest.SimultaneousIncognitoAndNormalDownloads (7346 ms) [323/601] NetworkingPrivateApiTest.GetVisibleNetworks (6838 ms) [324/601] DeviceLocalAccountTest.AutoLoginWithRecommendedLocales (30424 ms) [325/601] PreferencesTestForceWebUiLogin.PRE_MultiProfiles (24914 ms) [326/601] NetworkingPrivateApiTest.VerifyDestination (7087 ms) [327/601] NetworkingPrivateApiTestFail.StartConnect (7083 ms) [328/601] NetworkingPrivateApiTestFail.SetCellularSimState (7081 ms) [329/601] ForceMaximizeOnFirstRunTest.PRE_TwoRuns (35414 ms) [330/601] NetworkingPrivateChromeOSApiTest.StartActivateSprint (7362 ms) [331/601] NetworkingPrivateChromeOSApiTest.GetStateNonExistent (7351 ms) [332/601] NetworkingPrivateChromeOSApiTest.OnDeviceStateListChangedEvent (7343 ms) [333/601] NetworkingPrivateChromeOSApiTest.Tether_GetTetherNetworkState (6835 ms) [334/601] ChromeNewWindowClientWebAppBrowserTest.OpenWebApp (7873 ms) [335/601] ChromeScreenshotGrabberBrowserTest.TakeScreenshot (7870 ms) [336/601] KeyboardEndToEndFormTest.ChangeInputTypeToNonTextHidesKeyboard (9450 ms) [337/601] KeyboardEndToEndFormTest.DeleteInputHidesKeyboard (9193 ms) [338/601] SystemTrayTrayCastMediaRouterChromeOSTest.VerifyCorrectVisiblityWithSinks (6826 ms) [339/601] ShelfAppBrowserTest.TabDragAndDrop (7869 ms) [340/601] ChromeNativeAppWindowViewsAuraAshBrowserTest.NoImmersiveOrBubbleOutsidePublicSessionWindow (8141 ms) [341/601] TopControlsSlideControllerTest.TestDropDowns (8653 ms) [342/601] DiscoverModuleLaunchHelpAppTest.ShowHelpTab (11538 ms) [343/601] PowerHandlerTest.SendSettingsForControlledPrefs (6570 ms) [344/601] PowerHandlerTest.SendLidSettingForPrefChanges (6032 ms) [345/601] ChromePasswordProtectionServiceBrowserTest.SuccessfullyShowWarningIncognito (6821 ms) [346/601] SBNavigationObserverBrowserTest.DirectDownloadNoReferrerTargetBlank (7357 ms) [347/601] SBNavigationObserverBrowserTest.PPAPIDownloadWithUserGestureOnHostingFrame (7096 ms) [348/601] TabletModePageBehaviorTest.ExcludeInternalPages (28342 ms) [349/601] PhishingClassifierTest.TestClassificationWhenNoTld (2362 ms) [350/601] SBNavigationObserverBrowserTest.AddIPMapping (6835 ms) [351/601] PhishingClassifierDelegateTest.IgnorePreliminaryCapture (2099 ms) [352/601] PhishingDOMFeatureExtractorTest.FormFeatures (2120 ms) [353/601] V4SafeBrowsingServiceTest.SubResourceHitWithMainFrameRendererInitiatedSlowLoad (6559 ms) [354/601] CaptivePortalBrowserTest.InternetConnected (7097 ms) [355/601] CaptivePortalBrowserTest.GoBack (8660 ms) [356/601] PrintBrowserTest.PrintSubframeChain (8392 ms) [357/601] BluetoothLowEnergyApiTest.GetDescriptors (7615 ms) [358/601] AppManagementPwaPermissionViewTest.All (12603 ms) [359/601] BaseIdentityInternalsWebUITest.emptyTokenCache (7609 ms) [360/601] MultiDeviceSetupBrowserTest.Integration (13649 ms) [361/601] SitePerProcessPrintExtensionBrowserTest.PrintOptionPage (23346 ms) [362/601] SyncInternalsWebUITest.NodeBrowserRefreshOnTabSelect (8401 ms) [363/601] WebUIAssertionsTestAsyncFail.testAsyncFailCallsDone (7352 ms) [364/601] SyncInternalsWebUITest.DumpSyncEventsToText (8396 ms) [365/601] WebUIBrowserAsyncGenTest.TestRegisterMockGlobals (7083 ms) [366/601] NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTAddDelete (8399 ms) [367/601] WebUIAccessibilityAuditBrowserTest.testWithAuditFailures_a11yChecksDisabled (7342 ms) [368/601] NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTAddOverwrite (8408 ms) [369/601] CrElementsSliderTest.All (9444 ms) [370/601] PrintPreviewModelTest.GetCloudPrintTicket (8396 ms) [371/601] CrExtensionsCodeSectionTest.Layout (13121 ms) [372/601] PrintPreviewPreviewGenerationTest.Color (13901 ms) [373/601] PrintPreviewDestinationSelectTest.DefaultDestinationSelectionRules (14424 ms) [374/601] PrintPreviewAdvancedDialogTest.AdvancedSettingsFilter (8925 ms) [375/601] AppWindowApiTest.OnMinimizedEvent (7091 ms) [376/601] PrintPreviewHeaderTest.ButtonOrder (8400 ms) [377/601] BluetoothPrivateApiTest.NoBluetoothAdapter (6819 ms) [378/601] CastChannelAPITest.TestOpenError (6563 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ChromeVoxBackgroundTest.ForwardObjectNavigationThroughIframes --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsvBiiCd/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dJ5sv6a ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ChromeVoxBackgroundTest.MissingTableCells --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/results0sa1Di/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dspS87f ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ChromeVoxBackgroundTest.NavigationIgnoresLabels --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsUiCUFn/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dDW6W9k ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ChromeVoxBackgroundTest.ListName --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsjjhYHs/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dyjxVbq [0212/011900.861366:ERROR:kill_posix.cc(84)] Unable to terminate process group 2222: No such process (3) <truncated> /** * ### .getPathValue(path, object) * * This allows the retrieval of values in an * object given a string path. * * var obj = { * prop1: { * arr: ['a', 'b', 'c'] * , str: 'Hello' * } * , prop2: { * arr: [ { nested: 'Universe' } ] * , str: 'Hello again!' * } * } * * The following would be the results. * * getPathValue('prop1.str', obj); // Hello * getPathValue('prop1.att[2]', obj); // b * getPathValue('prop2.arr[0].nested', obj); // Universe * * @param {String} path * @param {Object} object * @returns {Object} value or `undefined` * @name getPathValue * @api public */ module.exports = function(path, obj) { var info = getPathInfo(path, obj); return info.value; }; },{"./getPathInfo":18}],20:[function(require,module,exports){ /*! * Chai - getProperties utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### .getProperties(object) * * This allows the retrieval of property names of an object, enumerable or not, * inherited or not. * * @param {Object} object * @returns {Array} * @name getProperties * @api public */ module.exports = function getProperties(object) { var result = Object.getOwnPropertyNames(object); function addProperty(property) { if (result.indexOf(property) === -1) { result.push(property); } } var proto = Object.getPrototypeOf(object); while (proto !== null) { Object.getOwnPropertyNames(proto).forEach(addProperty); proto = Object.getPrototypeOf(proto); } return result; }; },{}],21:[function(require,module,exports){ /*! * Chai - hasProperty utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ var type = require('type-detect'); /** * ### .hasProperty(object, name) * * This allows checking whether an object has * named property or numeric array index. * * Basically does the same thing as the `in` * operator but works properly with natives * and null/undefined values. * * var obj = { * arr: ['a', 'b', 'c'] * , str: 'Hello' * } * * The following would be the results. * * hasProperty('str', obj); // true * hasProperty('constructor', obj); // true * hasProperty('bar', obj); // false * * hasProperty('length', obj.str); // true * hasProperty(1, obj.str); // true * hasProperty(5, obj.str); // false * * hasProperty('length', obj.arr); // true * hasProperty(2, obj.arr); // true * hasProperty(3, obj.arr); // false * * @param {Objuect} object * @param {String|Number} name * @returns {Boolean} whether it exists * @name getPathInfo * @api public */ var literals = { 'number': Number , 'string': String }; module.exports = function hasProperty(name, obj) { var ot = type(obj); // Bad Object, obviously no props at all if(ot === 'null' || ot === 'undefined') return false; // The `in` operator does not work with certain literals // box these before the check if(literals[ot] && typeof obj !== 'object') obj = new literals[ot](obj); return name in obj; }; },{"type-detect":35}],22:[function(require,module,exports){ /*! * chai * Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Main exports */ var exports = module.exports = {}; /*! * test utility */ exports.test = require('./test'); /*! * type utility */ exports.type = require('type-detect'); /*! * expectTypes utility */ exports.expectTypes = require('./expectTypes'); /*! * message utility */ exports.getMessage = require('./getMessage'); /*! * actual utility */ exports.getActual = require('./getActual'); /*! * Inspect util */ exports.inspect = require('./inspect'); /*! * Object Display util */ exports.objDisplay = require('./objDisplay'); /*! * Flag utility */ exports.flag = require('./flag'); /*! * Flag transferring utility */ exports.transferFlags = require('./transferFlags'); /*! * Deep equal utility */ exports.eql = require('deep-eql'); /*! * Deep path value */ exports.getPathValue = require('./getPathValue'); /*! * Deep path info */ exports.getPathInfo = require('./getPathInfo'); /*! * Check if a property exists */ exports.hasProperty = require('./hasProperty'); /*! * Function name */ exports.getName = require('./getName'); /*! * add Property */ exports.addProperty = require('./addProperty'); /*! * add Method */ exports.addMethod = require('./addMethod'); /*! * overwrite Property */ exports.overwriteProperty = require('./overwriteProperty'); /*! * overwrite Method */ exports.overwriteMethod = require('./overwriteMethod'); /*! * Add a chainable method */ exports.addChainableMethod = require('./addChainableMethod'); /*! * Overwrite chainable method */ exports.overwriteChainableMethod = require('./overwriteChainableMethod'); },{"./addChainableMethod":9,"./addMethod":10,"./addProperty":11,"./expectTypes":12,"./flag":13,"./getActual":14,"./getMessage":16,"./getName":17,"./getPathInfo":18,"./getPathValue":19,"./hasProperty":21,"./inspect":23,"./objDisplay":24,"./overwriteChainableMethod":25,"./overwriteMethod":26,"./overwriteProperty":27,"./test":28,"./transferFlags":29,"deep-eql":31,"type-detect":35}],23:[function(require,module,exports){ // This is (almost) directly from Node.js utils // https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js var getName = require('./getName'); var getProperties = require('./getProperties'); var getEnumerableProperties = require('./getEnumerableProperties'); module.exports = inspect; /** * Echos the value of a value. Trys to print the value out * in the best way possible given the different types. * * @param {Object} obj The object to print out. * @param {Boolean} showHidden Flag that <truncated (345191 bytes)> he accessibility * audit. Only for use in testing. * @return {Array<Object>} */ getAccessibilityResults: function() { return this.a11yResults_; }, /** * Run accessibility checks after this test completes. */ enableAccessibilityChecks: function() { this.runAccessibilityChecks = true; }, /** * Don't run accessibility checks after this test completes. */ disableAccessibilityChecks: function() { this.runAccessibilityChecks = false; }, /** * Create a new class to handle |messageNames|, assign it to * |this.mockHandler|, register its messages and return it. * @return {Mock} Mock handler class assigned to |this.mockHandler|. */ makeAndRegisterMockHandler: function(messageNames) { var MockClass = makeMockClass(messageNames); this.mockHandler = mock(MockClass); registerMockMessageCallbacks(this.mockHandler, MockClass); return this.mockHandler; }, /** * Create a new class to handle |functionNames|, assign it to * |this.mockGlobals|, register its global overrides, and return it. * @return {Mock} Mock handler class assigned to |this.mockGlobals|. * @see registerMockGlobals */ makeAndRegisterMockGlobals: function(functionNames) { var MockClass = makeMockClass(functionNames); this.mockGlobals = mock(MockClass); registerMockGlobals(this.mockGlobals, MockClass); return this.mockGlobals; }, /** * Create a container of mocked standalone functions to handle * '.'-separated |apiNames|, assign it to |this.mockApis|, register its API * overrides and return it. * @return {Mock} Mock handler class. * @see makeMockFunctions * @see registerMockApis */ makeAndRegisterMockApis: function(apiNames) { var apiMockNames = apiNames.map(function(name) { return name.replace(/\./g, '_'); }); this.mockApis = makeMockFunctions(apiMockNames); registerMockApis(this.mockApis); return this.mockApis; }, /** * Create a container of mocked standalone functions to handle * |functionNames|, assign it to |this.mockLocalFunctions| and return it. * @param {!Array<string>} functionNames * @return {Mock} Mock handler class. * @see makeMockFunctions */ makeMockLocalFunctions: function(functionNames) { this.mockLocalFunctions = makeMockFunctions(functionNames); return this.mockLocalFunctions; }, /** * Override this method to perform initialization during preload (such as * creating mocks and registering handlers). * @type {Function} */ preLoad: function() {}, /** * Override this method to perform tasks before running your test. * @type {Function} */ setUp: function() { // These should be ignored in many of the web UI tests. // user-image-stream and supervised-user-creation-image-stream are // streaming video elements used for capturing a user image so they // won't have captions and should be ignored everywhere. this.accessibilityAuditConfig.ignoreSelectors( 'videoWithoutCaptions', '.user-image-stream'); this.accessibilityAuditConfig.ignoreSelectors( 'videoWithoutCaptions', '.supervised-user-creation-image-stream'); }, /** * Override this method to perform tasks after running your test. If you * create a mock class, you must call Mock4JS.verifyAllMocks() in this * phase. * @type {Function} */ tearDown: function() { if (typeof document != 'undefined') { var noAnimationStyle = document.getElementById('no-animation'); if (noAnimationStyle) { noAnimationStyle.parentNode.removeChild(noAnimationStyle); } } Mock4JS.verifyAllMocks(); }, /** * Called to run the body from the perspective of this fixture. * @type {Function} */ runTest: function(testBody) { testBody.call(this); }, /** * Called to run the accessibility audit from the perspective of this * fixture. */ runAccessibilityAudit: function() { if (!this.runAccessibilityChecks || typeof document === 'undefined') { return; } var auditConfig = this.accessibilityAuditConfig; if (!runAccessibilityAudit(this.a11yResults_, auditConfig)) { var report = accessibilityAuditReport(this.a11yResults_); if (this.accessibilityIssuesAreErrors) { throw new Error(report); } else { console.warn(report); } } }, /** * Create a closure function for continuing the test at a later time. May be * used as a listener function. * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {Function} completion The function to call to complete the test. * @param {...*} var_args Arguments to pass when calling completionAction. * @return {function(): void} Return a function, bound to this test fixture, * which continues the test. */ continueTest: function(whenTestDone, completion) { var savedArgs = new SaveMockArguments(); var completionAction = new CallFunctionAction( this, savedArgs, completion, Array.prototype.slice.call(arguments, 2)); if (whenTestDone === WhenTestDone.DEFAULT) { whenTestDone = WhenTestDone.ASSERT; } var runAll = new RunAllAction(true, whenTestDone, [completionAction]); return function() { savedArgs.arguments = Array.prototype.slice.call(arguments); runAll.invoke(); }; }, /** * Call this during setUp to defer the call to runTest() until later. The * caller must call the returned function at some point to run the test. * @type {Function} * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {...*} var_args Arguments to pass when running the * |currentTestCase|. * @return {function(): void} A function which will run the current body of * the currentTestCase. */ deferRunTest: function(whenTestDone) { if (whenTestDone === WhenTestDone.DEFAULT) { whenTestDone = WhenTestDone.ALWAYS; } return currentTestCase.deferRunTest.apply( currentTestCase, [whenTestDone].concat(Array.prototype.slice.call(arguments, 1))); }, }; /** * This class is not exported and is available to hold the state of the * |currentTestCase| throughout preload and test run. * @param {string} name The name of the test case. * @param {Test} fixture The fixture object for this test case. * @param {Function} body The code to run for the test. * @constructor */ function TestCase(name, fixture, body) { this.name = name; this.fixture = fixture; this.body = body; } TestCase.prototype = { /** * The name of this test. * @type {string} */ name: null, /** * The test fixture to set |this| to when running the test |body|. * @type {testing.Test} */ fixture: null, /** * The test body to execute in runTest(). * @type {Function} */ body: null, /** * True when the test fixture will run the test later. * @type {boolean} * @private */ deferred_: false, /** * Called at preload time, proxies to the fixture. * @type {Function} */ preLoad: function(name) { if (this.fixture) { this.fixture.preLoad(); } }, /** * Called before a test runs. */ setUp: function() { if (this.fixture) { this.fixture.setUp(); } }, /** * Called before a test is torn down (by testDone()). */ tearDown: function() { if (this.fixture) { this.fixture.tearDown(); } }, /** * Called to run this test's body. */ runTest: function() { if (this.body && this.fixture) { this.fixture.runTest(this.body); } }, /** * Called after a test is run (in testDone) to test accessibility. */ runAccessibilityAudit: function() { if (this.fixture) { this.fixture.runAccessibilityAudit(); } }, /** * Runs this test case with |this| set to the |fixture|. * * Note: Tests created with TEST_F may depend upon |this| being set to an * instance of this.fixture. The current implementation of TEST creates a * dummy constructor, but tests created with TEST should not rely on |this| * being set. * @type {Function} */ run: function() { try { this.setUp(); } catch (e) { // Mock4JSException doesn't inherit from Error, so fall back on // toString(). console.error(e.stack || e.toString()); } if (!this.deferred_) { this.runTest(); } // tearDown called by testDone(). }, /** * Cause this TestCase to be deferred (don't call runTest()) until the * returned function is called. * @type {Function} * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {...*} var_args Arguments to pass when running the * |currentTestCase|. * @return {function(): void} A function that will run this TestCase when * called. */ deferRunTest: function(whenTestDone) { this.deferred_ = true; var savedArgs = new SaveMockArguments(); var completionAction = new CallFunctionAction( this, savedArgs, this.runTest, Array.prototype.slice.call(arguments, 1)); var runAll = new RunAllAction(true, whenTestDone, [completionAction]); return function() { savedArgs.arguments = Array.prototype.slice.call(arguments); runAll.invoke(); }; }, }; /** * Registry of javascript-defined callbacks for {@code chrome.send}. * @type {Object} */ var sendCallbacks = {}; /** * Registers the message, object and callback for {@code chrome.send} * @param {string} name The name of the message to route to this |callback|. * @param {Object} messageHandler Pass as |this| when calling the |callback|. * @param {function(...)} callback Called by {@code chrome.send}. * @see sendCallbacks */ function registerMessageCallback(name, messageHandler, callback) { sendCallbacks[name] = [messageHandler, callback]; } /** * Register all methods of {@code mockClass.prototype} with messages of the * same name as the method, using the proxy of the |mockObject| as the * |messageHandler| when registering. * @param {Mock4JS.Mock} mockObject The mock to register callbacks against. * @param {function(new:Object)} mockClAss Constructor for the mocked class. * @see registerMessageCallback * @see overrideChrome */ function registerMockMessageCallbacks(mockObject, mockClass) { if (!deferGlobalOverrides && !originalChrome) { overrideChrome(); } var mockProxy = mockObject.proxy(); for (var func in mockClass.prototype) { if (typeof mockClass.prototype[func] === 'function') { registerMessageCallback(func, mockProxy, mockProxy[func]); } } } /** * Holds the mapping of name -> global override information. * @type {Object} */ var globalOverrides = {}; /** * When preloading JavaScript libraries, this is true until the * DOMContentLoaded event has been received as globals cannot be overridden * until the page has loaded its JavaScript. * @type {boolean} */ var deferGlobalOverrides = false; /** * Override the global function |funcName| with its registered mock. This * should not be called twice for the same |funcName|. * @param {string} funcName The name of the global function to override. */ function overrideGlobal(funcName) { assertNotEquals(undefined, this[funcName]); var globalOverride = globalOverrides[funcName]; assertNotEquals(undefined, globalOverride); assertEquals(undefined, globalOverride.original); globalOverride.original = this[funcName]; this[funcName] = globalOverride.callback.bind(globalOverride.object); } /** * Registers the global function name, object and callback. * @param {string} name The name of the message to route to this |callback|. * @param {Object} object Pass as |this| when calling the |callback|. * @param {function(...)} callback Called by {@code chrome.send}. * @see overrideGlobal */ function registerMockGlobal(name, object, callback) { assertEquals(undefined, globalOverrides[name]); globalOverrides[name] = { object: object, callback: callback, }; if (!deferGlobalOverrides) { overrideGlobal(name); } } /** * Registers the mock API call and its function. * @param {string} name The '_'-separated name of the API call. * @param {function(...)} theFunction Mock function for this API call. */ function registerMockApi(name, theFunction) { var path = name.split('_'); var namespace = this; for (var i = 0; i < path.length - 1; i++) { var fieldName = path[i]; if (!namespace[fieldName]) { namespace[fieldName] = {}; } namespace = namespace[fieldName]; } var fieldName = path[path.length - 1]; namespace[fieldName] = theFunction; } /** * Empty function for use in making mocks. * @const */ function emptyFunction() {} /** * Make a mock from the supplied |methodNames| array. * @param {Array<string>} methodNames Array of names of methods to mock. * @return {Function} Constructor with prototype filled in with methods * matching |methodNames|. */ function makeMockClass(methodNames) { function MockConstructor() {} for (var i = 0; i < methodNames.length; i++) { MockConstructor.prototype[methodNames[i]] = emptyFunction; } return MockConstructor; } /** * Create a new class to handle |functionNames|, add method 'functions()' * that returns a container of standalone functions based on the mock class * members, and return it. * @return {Mock} Mock handler class. */ function makeMockFunctions(functionNames) { var MockClass = makeMockClass(functionNames); var mockFunctions = mock(MockClass); var mockProxy = mockFunctions.proxy(); mockFunctions.functions_ = {}; for (var func in MockClass.prototype) { if (typeof MockClass.prototype[func] === 'function') { mockFunctions.functions_[func] = mockProxy[func].bind(mockProxy); } } mockFunctions.functions = function() { return this.functions_; }; return mockFunctions; } /** * Register all methods of {@code mockClass.prototype} as overrides to global * functions of the same name as the method, using the proxy of the * |mockObject| to handle the functions. * @param {Mock4JS.Mock} mockObject The mock to register callbacks against. * @param {function(new:Object)} mockClass Constructor for the mocked class. * @see registerMockGlobal */ function registerMockGlobals(mockObject, mockClass) { var mockProxy = mockObject.proxy(); for (var func in mockClass.prototype) { if (typeof mockClass.prototype[func] === 'function') { registerMockGlobal(func, mockProxy, mockProxy[func]); } } } /** * Register all functions in |mockObject.functions()| as global API calls. * @param {Mock4JS.Mock} mockObject The mock to register callbacks against. * @see registerMockApi */ function registerMockApis(mockObject) { var functions = mockObject.functions(); for (var func in functions) { if (typeof functions[func] === 'function') { registerMockApi(func, functions[func]); } } } /** * Overrides {@code chrome.send} for routing messages to javascript * functions. Also falls back to sending with the original chrome object. * @param {string} messageName The message to route. */ function send(messageName) { var callback = sendCallbacks[messageName]; if (callback != undefined) { callback[1].apply(callback[0], Array.prototype.slice.call(arguments, 1)); } else { this.__proto__.send.apply(this.__proto__, arguments); } } /** * true when testDone has been called. * @type {boolean} */ var testIsDone = false; /** * Holds the errors, if any, caught by expects so that the test case can * fail. Cleared when results are reported from runTest() or testDone(). * @type {Array<Error>} */ var errors = []; /** * URL to dummy WebUI page for testing framework. * @type {string} */ var DUMMY_URL = 'chrome://DummyURL'; /** * Resets test state by clearing |errors| and |testIsDone| flags. */ function resetTestState() { errors.splice(0, errors.length); testIsDone = false; } /** * Notifies the running browser test of the test results. Clears |errors|. * @param {Array<boolean, string>=} result When passed, this is used for the * testResult message. */ function testDone(result) { if (!testIsDone) { testIsDone = true; if (currentTestCase) { var ok = true; ok = createExpect( currentTestCase.runAccessibilityAudit.bind(currentTestCase)) .call(null) && ok; ok = createExpect(currentTestCase.tearDown.bind(currentTestCase)) .call(null) && ok; if (!ok && result) { result = [false, errorsToMessage(errors, result[1])]; } currentTestCase = null; } if (!result) { result = testResult(); } if (hasWindow && window.webUiTest) { let testRunner; if (webUiTest.mojom.TestRunnerPtr) { // For mojo WebUI tests. testRunner = new webUiTest.mojom.TestRunnerPtr(); Mojo.bindInterface( webUiTest.mojom.TestRunner.name, mojo.makeRequest(testRunner).handle); } else if (webUiTest.mojom.TestRunnerProxy) { // For mojo-lite WebUI tests. testRunner = webUiTest.mojom.TestRunner.getProxy(); } else { assertNotReached( 'Mojo bindings found, but no valid test interface loaded'); } if (result[0]) { testRunner.testComplete(); } else { testRunner.testComplete(result[1]); } } else if (chrome.send) { // For WebUI and v8 unit tests. chrome.send('testResult', result); } else if (window.domAutomationController.send) { // For extension tests. valueResult = {'result': result[0], message: result[1]}; window.domAutomationController.send(JSON.stringify(valueResult)); } else { assertNotReached('No test framework available'); } errors.splice(0, errors.length); } else { console.warn('testIsDone already'); } } /** * Converts each Error in |errors| to a suitable message, adding them to * |message|, and returns the message string. * @param {Array<Error>} errors Array of errors to add to |message|. * @param {string=} opt_message Message to append error messages to. * @return {string} |opt_message| + messages of all |errors|. */ function errorsToMessage(errors, opt_message) { var message = ''; if (opt_message) { message += opt_message + '\n'; } for (var i = 0; i < errors.length; ++i) { var errorMessage = errors[i].stack || errors[i].message; message += 'Failed: ' + currentTestFunction + '(' + currentTestArguments.map(JSON.stringify) + ')\n' + errorMessage; } return message; } /** * Returns [success, message] & clears |errors|. * @param {boolean} errorsOk When true, errors are ok. * @return {Array<boolean, string>} */ function testResult(errorsOk) { var result = [true, '']; if (errors.length) { result = [!!errorsOk, errorsToMessage(errors)]; } return result; } // Asserts. // Use the following assertions to verify a condition within a test. /** * @param {boolean} value The value to check. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertTrue(value, opt_message) { chai.assert.isTrue(value, opt_message); } /** * @param {boolean} value The value to check. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertFalse(value, opt_message) { chai.assert.isFalse(value, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertGE(value1, value2, opt_message) { chai.expect(value1).to.be.at.least(value2, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertGT(value1, value2, opt_message) { chai.assert.isAbove(value1, value2, opt_message); } /** * @param {*} expected The expected value. * @param {*} actual The actual value. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertEquals(expected, actual, opt_message) { chai.assert.strictEqual(actual, expected, opt_message); } /** * @param {*} expected * @param {*} actual * {string=} opt_message * @throws {Error} */ function assertDeepEquals(expected, actual, opt_message) { chai.assert.deepEqual(actual, expected, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertLE(value1, value2, opt_message) { chai.expect(value1).to.be.at.most(value2, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertLT(value1, value2, opt_message) { chai.assert.isBelow(value1, value2, opt_message); } /** * @param {*} expected The expected value. * @param {*} actual The actual value. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertNotEquals(expected, actual, opt_message) { chai.assert.notStrictEqual(actual, expected, opt_message); } /** * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertNotReached(opt_message) { chai.assert.fail(null, null, opt_message); } /** * @param {Function} testFunction * @param {Function=|string=|RegExp=} opt_expected The expected Error * constructor, partial or complete error message string, or RegExp to * test the error message. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertThrows(testFunction, opt_expected, opt_message) { chai.assert.throws(testFunction, opt_expected, opt_message); } /** * Run an accessibility audit on the current page state. * @type {Function} * @param {Array} a11yResults * @param {axs.AuditConfiguration=} opt_config * @return {boolean} Whether there were any errors or warnings * @private */ function runAccessibilityAudit(a11yResults, opt_config) { var auditResults = axs.Audit.run(opt_config); for (var i = 0; i < auditResults.length; i++) { var auditResult = auditResults[i]; if (auditResult.result == axs.constants.AuditResult.FAIL) { var auditRule = auditResult.rule; // TODO(aboxhall): more useful error messages (sadly non-trivial) a11yResults.push(auditResult); } } // TODO(aboxhall): have strict (no errors or warnings) vs non-strict // (warnings ok) // TODO(aboxhall): some kind of info logging for warnings only?? return (a11yResults.length == 0); } /** * Concatenates the accessibility error messages for each result in * |a11yResults| and * |a11yWarnings| in to an accessibility report, appends it to the given * |message| and returns the resulting message string. * @param {Array<string>} a11yResults The list of accessibility results * @return {string} |message| + accessibility report. */ function accessibilityAuditReport(a11yResults, message) { message = message ? message + '\n\n' : '\n'; message += 'Accessibility issues found on ' + window.location.href + '\n'; message += axs.Audit.createReport(a11yResults); return message; } /** * Asserts that the current page state passes the accessibility audit. * @param {Array=} opt_results Array to fill with results, if desired. */ function assertAccessibilityOk(opt_results) { var a11yResults = opt_results || []; var auditConfig = currentTestCase.fixture.accessibilityAuditConfig; if (!runAccessibilityAudit(a11yResults, auditConfig)) { throw new Error(accessibilityAuditReport(a11yResults)); } } /** * Creates a function based upon a function that throws an exception on * failure. The new function stuffs any errors into the |errors| array for * checking by runTest. This allows tests to continue running other checks, * while failing the overall test if any errors occurred. * @param {Function} assertFunc The function which may throw an Error. * @return {function(...*):bool} A function that applies its arguments to * |assertFunc| and returns true if |assertFunc| passes. * @see errors * @see runTestFunction */ function createExpect(assertFunc) { return function() { try { assertFunc.apply(null, arguments); } catch (e) { errors.push(e); return false; } return true; }; } /** * This is the starting point for tests run by WebUIBrowserTest. If an error * occurs, it reports a failure and a message created by joining individual * error messages. This supports sync tests and async tests by calling * testDone() when |isAsync| is not true, relying on async tests to call * testDone() when they complete. * @param {boolean} isAsync When false, call testDone() with the test result * otherwise only when assertions are caught. * @param {string} testFunction The function name to call. * @param {Array} testArguments The arguments to call |testFunction| with. * @return {boolean} true always to signal successful execution (but not * necessarily successful results) of this test. * @see errors * @see runTestFunction */ function runTest(isAsync, testFunction, testArguments) { // If waiting for user to attach a debugger, retry in 1 second. if (waitUser) { setTimeout(runTest, 1000, isAsync, testFunction, testArguments); return true; } // Avoid eval() if at all possible, since it will not work on pages // that have enabled content-security-policy. var testBody = this[testFunction]; // global object -- not a method. var testName = testFunction; // Depending on how we were called, |this| might not resolve to the global // context. if (testName == 'RUN_TEST_F' && testBody === undefined) { testBody = RUN_TEST_F; } if (typeof testBody === 'undefined') { testBody = eval(testFunction); testName = testBody.toString(); } if (testBody != RUN_TEST_F) { console.log('Running test ' + testName); } // Async allow expect errors, but not assert errors. var result = runTestFunction(testFunction, testBody, testArguments, isAsync); if (!isAsync || !result[0]) { testDone(result); } return true; } /** * This is the guts of WebUIBrowserTest. It runs the test surrounded by an * expect to catch Errors. If |errors| is non-empty, it reports a failure and * a message by joining |errors|. Consumers can use this to use assert/expect * functions asynchronously, but are then responsible for reporting errors to * the browser themselves through testDone(). * @param {string} testFunction The function name to report on failure. * @param {Function} testBody The function to call. * @param {Array} testArguments The arguments to call |testBody| with. * @param {boolean} onlyAssertFails When true, only assertions cause failing * testResult. * @return {Array<boolean, string>} [test-succeeded, message-if-failed] * @see createExpect * @see testResult */ function runTestFunction( testFunction, testBody, testArguments, onlyAssertFails) { currentTestFunction = testFunction; currentTestArguments = testArguments; var ok = createExpect(testBody).apply(null, testArguments); return testResult(onlyAssertFails && ok); } /** * Creates a new test case for the given |testFixture| and |testName|. Assumes * |testFixture| describes a globally available subclass of type Test. * @param {string} testFixture The fixture for this test case. * @param {string} testName The name for this test case. * @return {TestCase} A newly created TestCase. */ function createTestCase(testFixture, testName) { var fixtureConstructor = this[testFixture]; assertTrue( !!fixtureConstructor, `The testFixture \'${testFixture}\' was not found.`); var testBody = fixtureConstructor.testCaseBodies[testName]; assertTrue( !!testBody, `Test \'${testName} was not found in \'${testFixture}\'.`); var fixture = new fixtureConstructor(); fixture.name = testFixture; return new TestCase(testName, fixture, testBody); } /** * Overrides the |chrome| object to enable mocking calls to chrome.send(). */ function overrideChrome() { if (originalChrome) { console.error('chrome object already overridden'); return; } originalChrome = chrome; chrome = { __proto__: originalChrome, send: send, originalSend: originalChrome.send.bind(originalChrome), }; } /** * Used by WebUIBrowserTest to preload the javascript libraries at the * appropriate time for javascript injection into the current page. This * creates a test case and calls its preLoad for any early initialization such * as registering handlers before the page's javascript runs it's OnLoad * method. This is called before the page is loaded, so the |chrome| object is * not yet bound and this DOMContentLoaded listener will be called first to * override |chrome| in order to route messages registered in |sendCallbacks|. * @param {string} testFixture The test fixture name. * @param {string} testName The test name. * @see sendCallbacks */ function preloadJavascriptLibraries(testFixture, testName) { deferGlobalOverrides = true; // The document seems to change from the point of preloading to the point of // events (and doesn't fire), whereas the window does not. Listening to the // capture phase allows this event to fire first. window.addEventListener('DOMContentLoaded', function() { if (chrome.send) { overrideChrome(); } // Override globals at load time so they will be defined. assertTrue(deferGlobalOverrides); deferGlobalOverrides = false; for (var funcName in globalOverrides) { overrideGlobal(funcName); } }, true); currentTestCase = createTestCase(testFixture, testName); currentTestCase.preLoad(); } /** * Sets |waitUser| to true so |runTest| function waits for user to attach a * debugger. */ function setWaitUser() { waitUser = true; console.log('Waiting for debugger...'); console.log('Run: go() in the JS console when you are ready.'); } /** * Sets |waitUser| to false, so |runTest| function stops waiting for user and * start running the tests. */ function go() { waitUser = false; } /** * During generation phase, this outputs; do nothing at runtime. */ function GEN() {} /** * During generation phase, this outputs; do nothing at runtime. */ function GEN_INCLUDE() {} /** * At runtime, register the testName with a test fixture. Since this method * doesn't have a test fixture, create a dummy fixture to hold its |name| * and |testCaseBodies|. * @param {string} testCaseName The name of the test case. * @param {string} testName The name of the test function. * @param {Function} testBody The body to execute when running this test. */ function TEST(testCaseName, testName, testBody) { var fixtureConstructor = this[testCaseName]; if (fixtureConstructor === undefined) { fixtureConstructor = function() {}; this[testCaseName] = fixtureConstructor; fixtureConstructor.prototype = { __proto__: Test.prototype, name: testCaseName, }; fixtureConstructor.testCaseBodies = {}; } fixtureConstructor.testCaseBodies[testName] = testBody; } /** * At runtime, register the testName with its fixture. Stuff the |name| into * the |testFixture|'s prototype, if needed, and the |testCaseBodies| into its * constructor. * @param {string} testFixture The name of the test fixture class. * @param {string} testName The name of the test function. * @param {Function} testBody The body to execute when running this test. * @param {string=} opt_preamble C++ code to be generated before the test. Does * nothing here in the runtime phase. */ function TEST_F(testFixture, testName, testBody, opt_preamble) { var fixtureConstructor = this[testFixture]; if (!fixtureConstructor.prototype.name) { fixtureConstructor.prototype.name = testFixture; } if (fixtureConstructor['testCaseBodies'] === undefined) { fixtureConstructor.testCaseBodies = {}; } fixtureConstructor.testCaseBodies[testName] = testBody; } /** * Similar to TEST_F above but with a mandatory |preamble|. * @param {string} preamble C++ code to be generated before the test. Does * nothing here in the runtime phase. * @param {string} testFixture The name of the test fixture class. * @param {string} testName The name of the test function. * @param {Function} testBody The body to execute when running this test. */ function TEST_F_WITH_PREAMBLE(preamble, testFixture, testName, testBody) { TEST_F(testFixture, testName, testBody); } /** * RunJavascriptTestF uses this as the |testFunction| when invoking * runTest. If |currentTestCase| is non-null at this point, verify that * |testFixture| and |testName| agree with the preloaded values. Create * |currentTestCase|, if needed, run it, and clear the |currentTestCase|. * @param {string} testFixture The name of the test fixture class. * @param {string} testName The name of the test function. * @see preloadJavascriptLibraries * @see runTest */ function RUN_TEST_F(testFixture, testName) { if (!currentTestCase) { currentTestCase = createTestCase(testFixture, testName); } assertEquals(currentTestCase.name, testName); assertEquals(currentTestCase.fixture.name, testFixture); console.log('Running TestCase ' + testFixture + '.' + testName); currentTestCase.run(); } /** * This Mock4JS matcher object pushes each |actualArgument| parameter to * match() calls onto |args|. * @param {Array} args The array to push |actualArgument| onto. * @param {Object} realMatcher The real matcher check arguments with. * @constructor * @extends {realMatcher} */ function SaveMockArgumentMatcher(args, realMatcher) { this.arguments_ = args; this.realMatcher_ = realMatcher; } SaveMockArgumentMatcher.prototype = { /** * Holds the arguments to push each |actualArgument| onto. * @type {Array} * @private */ arguments_: null, /** * The real Mock4JS matcher object to check arguments with. * @type {Object} */ realMatcher_: null, /** * Pushes |actualArgument| onto |arguments_| and call |realMatcher_|. Clears * |arguments_| on non-match. * @param {*} actualArgument The argument to match and save. * @return {boolean} Result of calling the |realMatcher|. */ argumentMatches: function(actualArgument) { this.arguments_.push(actualArgument); var match = this.realMatcher_.argumentMatches(actualArgument); if (!match) { this.arguments_.splice(0, this.arguments_.length); } return match; }, /** * Proxy to |realMatcher_| for description. * @return {string} Description of this Mock4JS matcher. */ describe: function() { return this.realMatcher_.describe(); }, }; /** * Actions invoked by Mock4JS's "will()" syntax do not receive arguments from * the mocked method. This class works with SaveMockArgumentMatcher to save * arguments so that the invoked Action can pass arguments through to the * invoked function. * @param {!Object} realMatcher The real matcher to perform matching with. * @constructor */ function SaveMockArguments() { this.arguments = []; } SaveMockArguments.prototype = { /** * Wraps the |realMatcher| with an object which will push its argument onto * |arguments| and call realMatcher. * @param {Object} realMatcher A Mock4JS matcher object for this argument. * @return {SaveMockArgumentMatcher} A new matcher which will push its * argument onto |arguments|. */ match: function(realMatcher) { return new SaveMockArgumentMatcher(this.arguments, realMatcher); }, /** * Remember the argument passed to this stub invocation. * @type {Array} */ arguments: null, }; /** * CallFunctionAction is provided to allow mocks to have side effects. * @param {Object} obj The object to set |this| to when calling |func_|. * @param {?SaveMockArguments} savedArgs when non-null, saved arguments are * passed to |func|. * @param {Function} func The function to call. * @param {Array=} args Any arguments to pass to func. * @constructor */ function CallFunctionAction(obj, savedArgs, func, args) { this.obj_ = obj; this.savedArgs_ = savedArgs; this.func_ = func; this.args_ = args ? args : []; } CallFunctionAction.prototype = { /** * Set |this| to |obj_| when calling |func_|. * @type {?Object} */ obj_: null, /** * The SaveMockArguments to hold arguments when invoking |func_|. * @type {?SaveMockArguments} * @private */ savedArgs_: null, /** * The function to call when invoked. * @type {!Function} * @private */ func_: null, /** * Arguments to pass to |func_| when invoked. * @type {!Array} */ args_: null, /** * Accessor for |func_|. * @return {Function} The function to invoke. */ get func() { return this.func_; }, /** * Called by Mock4JS when using .will() to specify actions for stubs() or * expects(). Clears |savedArgs_| so it can be reused. * @return The results of calling |func_| with the concatenation of * |savedArgs_| and |args_|. */ invoke: function() { var prependArgs = []; if (this.savedArgs_) { prependArgs = this.savedArgs_.arguments.splice(0, this.savedArgs_.arguments.length); } return this.func.apply(this.obj_, prependArgs.concat(this.args_)); }, /** * Describe this action to Mock4JS. * @return {string} A description of this action. */ describe: function() { return 'calls the given function with saved arguments and ' + this.args_; } }; /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {Function} func The function to call when the method is invoked. * @param {...*} var_args Arguments to pass when calling func. * @return {CallFunctionAction} Action for use in will. */ function callFunction(func) { return new CallFunctionAction( null, null, func, Array.prototype.slice.call(arguments, 1)); } /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {SaveMockArguments} savedArgs Arguments saved with this object * are passed to |func|. * @param {Function} func The function to call when the method is invoked. * @param {...*} var_args Arguments to pass when calling func. * @return {CallFunctionAction} Action for use in will. */ function callFunctionWithSavedArgs(savedArgs, func) { return new CallFunctionAction( null, savedArgs, func, Array.prototype.slice.call(arguments, 2)); } /** * CallGlobalAction as a subclass of CallFunctionAction looks up the original * global object in |globalOverrides| using |funcName| as the key. This allows * tests, which need to wait until a global function to be called in order to * start the test to run the original function. When used with runAllActions * or runAllActionsAsync, Mock4JS expectations may call start or continue the * test after calling the original function. * @param {?SaveMockArguments} savedArgs when non-null, saved arguments are * passed to the global function |funcName|. * @param {string} funcName The name of the global function to call. * @param {Array} args Any arguments to pass to func. * @constructor * @extends {CallFunctionAction} * @see globalOverrides */ function CallGlobalAction(savedArgs, funcName, args) { CallFunctionAction.call(this, null, savedArgs, funcName, args); } CallGlobalAction.prototype = { __proto__: CallFunctionAction.prototype, /** * Fetch and return the original global function to call. * @return {Function} The global function to invoke. * @override */ get func() { var func = globalOverrides[this.func_].original; assertNotEquals(undefined, func); return func; }, }; /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {SaveMockArguments} savedArgs Arguments saved with this object * are passed to the global function |funcName|. * @param {string} funcName The name of a registered mock global function to * call when the method is invoked. * @param {...*} var_args Arguments to pass when calling func. * @return {CallGlobalAction} Action for use in Mock4JS will(). */ function callGlobalWithSavedArgs(savedArgs, funcName) { return new CallGlobalAction( savedArgs, funcName, Array.prototype.slice.call(arguments, 2)); } /** * When to call testDone(). * @enum {number} */ var WhenTestDone = { /** * Default for the method called. */ DEFAULT: -1, /** * Never call testDone(). */ NEVER: 0, /** * Call testDone() on assert failure. */ ASSERT: 1, /** * Call testDone() if there are any assert or expect failures. */ EXPECT: 2, /** * Always call testDone(). */ ALWAYS: 3, }; /** * Runs all |actions|. * @param {boolean} isAsync When true, call testDone() on Errors. * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {Array<Object>} actions Actions to run. * @constructor */ function RunAllAction(isAsync, whenTestDone, actions) { this.isAsync_ = isAsync; this.whenTestDone_ = whenTestDone; this.actions_ = actions; } RunAllAction.prototype = { /** * When true, call testDone() on Errors. * @type {boolean} * @private */ isAsync_: false, /** * Call testDone() at appropriate time. * @type {WhenTestDone} * @private * @see WhenTestDone */ whenTestDone_: WhenTestDone.ASSERT, /** * Holds the actions to execute when invoked. * @type {Array} * @private */ actions_: null, /** * Runs all |actions_|, returning the last one. When running in sync mode, * throws any exceptions to be caught by runTest() or * runTestFunction(). Call testDone() according to |whenTestDone_| setting. */ invoke: function() { try { var result; for (var i = 0; i < this.actions_.length; ++i) { result = this.actions_[i].invoke(); } if ((this.whenTestDone_ == WhenTestDone.EXPECT && errors.length) || this.whenTestDone_ == WhenTestDone.ALWAYS) { testDone(); } return result; } catch (e) { if (!(e instanceof Error)) { e = new Error(e.toString()); } if (!this.isAsync_) { throw e; } errors.push(e); if (this.whenTestDone_ != WhenTestDone.NEVER) { testDone(); } } }, /** * Describe this action to Mock4JS. * @return {string} A description of this action. */ describe: function() { return 'Calls all actions: ' + this.actions_; }, }; /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {...Object} var_actions Actions to run. * @return {RunAllAction} Action for use in will. */ function runAllActions() { return new RunAllAction( false, WhenTestDone.NEVER, Array.prototype.slice.call(arguments)); } /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {...Object} var_actions Actions to run. * @return {RunAllAction} Action for use in will. */ function runAllActionsAsync(whenTestDone) { return new RunAllAction( true, whenTestDone, Array.prototype.slice.call(arguments, 1)); } /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * Creates an action for will() that invokes a callback that the tested code * passes to a mocked function. * @param {SaveMockArguments} savedArgs Arguments that will contain the * callback once the mocked function is called. * @param {number} callbackParameter Index of the callback parameter in * |savedArgs|. * @param {...Object} var_args Arguments to pass to the callback. * @return {CallFunctionAction} Action for use in will(). */ function invokeCallback(savedArgs, callbackParameter, var_args) { var callbackArguments = Array.prototype.slice.call(arguments, 2); return callFunction(function() { savedArgs.arguments[callbackParameter].apply(null, callbackArguments); // Mock4JS does not clear the saved args after invocation. // To allow reuse of the same SaveMockArguments for multiple // invocations with similar arguments, clear them here. savedArgs.arguments.splice(0, savedArgs.arguments.length); }); } /** * Mock4JS matcher object that matches the actual argument and the expected * value iff their JSON representations are same. * @param {Object} expectedValue * @constructor */ function MatchJSON(expectedValue) { this.expectedValue_ = expectedValue; } MatchJSON.prototype = { /** * Checks that JSON representation of the actual and expected arguments are * same. * @param {Object} actualArgument The argument to match. * @return {boolean} Result of the comparison. */ argumentMatches: function(actualArgument) { return JSON.stringify(this.expectedValue_) === JSON.stringify(actualArgument); }, /** * Describes the matcher. * @return {string} Description of this Mock4JS matcher. */ describe: function() { return 'eqJSON(' + JSON.stringify(this.expectedValue_) + ')'; }, }; /** * Builds a MatchJSON argument matcher for a given expected value. * @param {Object} expectedValue * @return {MatchJSON} Resulting Mock4JS matcher. */ function eqJSON(expectedValue) { return new MatchJSON(expectedValue); } /** * Mock4JS matcher object that matches the actual argument and the expected * value iff the the string representation of the actual argument is equal to * the expected value. * @param {string} expectedValue * @constructor */ function MatchToString(expectedValue) { this.expectedValue_ = expectedValue; } MatchToString.prototype = { /** * Checks that the the string representation of the actual argument matches * the expected value. * @param {*} actualArgument The argument to match. * @return {boolean} Result of the comparison. */ argumentMatches: function(actualArgument) { return this.expectedValue_ === String(actualArgument); }, /** * Describes the matcher. * @return {string} Description of this Mock4JS matcher. */ describe: function() { return 'eqToString("' + this.expectedValue_ + '")'; }, }; /** * Builds a MatchToString argument matcher for a given expected value. * @param {Object} expectedValue * @return {MatchToString} Resulting Mock4JS matcher. */ function eqToString(expectedValue) { return new MatchToString(expectedValue); } /** * Exports assertion methods. All assertion methods delegate to the chai.js * assertion library. */ function exportChaiAsserts() { exports.assertTrue = assertTrue; exports.assertFalse = assertFalse; exports.assertGE = assertGE; exports.assertGT = assertGT; exports.assertEquals = assertEquals; exports.assertDeepEquals = assertDeepEquals; exports.assertLE = assertLE; exports.assertLT = assertLT; exports.assertNotEquals = assertNotEquals; exports.assertNotReached = assertNotReached; exports.assertThrows = assertThrows; } /** * Exports expect methods. 'expect*' methods allow tests to run until the end * even in the presence of failures. */ function exportExpects() { exports.expectTrue = createExpect(assertTrue); exports.expectFalse = createExpect(assertFalse); exports.expectGE = createExpect(assertGE); exports.expectGT = createExpect(assertGT); exports.expectEquals = createExpect(assertEquals); exports.expectDeepEquals = createExpect(assertDeepEquals); exports.expectLE = createExpect(assertLE); exports.expectLT = createExpect(assertLT); exports.expectNotEquals = createExpect(assertNotEquals); exports.expectNotReached = createExpect(assertNotReached); exports.expectAccessibilityOk = createExpect(assertAccessibilityOk); exports.expectThrows = createExpect(assertThrows); } /** * Exports methods related to Mock4JS mocking. */ function exportMock4JsHelpers() { exports.callFunction = callFunction; exports.callFunctionWithSavedArgs = callFunctionWithSavedArgs; exports.callGlobalWithSavedArgs = callGlobalWithSavedArgs; exports.eqJSON = eqJSON; exports.eqToString = eqToString; exports.invokeCallback = invokeCallback; exports.SaveMockArguments = SaveMockArguments; // Import the Mock4JS helpers. Mock4JS.addMockSupport(exports); } // Exports. testing.Test = Test; exports.testDone = testDone; exportChaiAsserts(); exports.assertAccessibilityOk = assertAccessibilityOk; exportExpects(); exportMock4JsHelpers(); exports.preloadJavascriptLibraries = preloadJavascriptLibraries; exports.setWaitUser = setWaitUser; exports.go = go; exports.registerMessageCallback = registerMessageCallback; exports.registerMockGlobals = registerMockGlobals; exports.registerMockMessageCallbacks = registerMockMessageCallbacks; exports.resetTestState = resetTestState; exports.runAccessibilityAudit = runAccessibilityAudit; exports.runAllActions = runAllActions; exports.runAllActionsAsync = runAllActionsAsync; exports.runTest = runTest; exports.runTestFunction = runTestFunction; exports.DUMMY_URL = DUMMY_URL; exports.TEST = TEST; exports.TEST_F = TEST_F; exports.TEST_F_WITH_PREAMBLE = TEST_F_WITH_PREAMBLE; exports.RUNTIME_TEST_F = TEST_F; exports.GEN = GEN; exports.GEN_INCLUDE = GEN_INCLUDE; exports.WhenTestDone = WhenTestDone; })(this); ; //# sourceURL=file:///b/s/w/ir/chrome/test/data/webui/test_api.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Common testing utilities. /** * Shortcut for document.getElementById. * @param {string} id of the element. * @return {HTMLElement} with the id. */ function $(id) { return document.getElementById(id); } /** * @constructor */ var TestUtils = function() {}; /** * Extracts some inlined html encoded as a comment inside a function, * so you can use it like this: * * this.appendDoc(function() {/*! * <p>Html goes here</p> * * /}); * * @param {Function} commentEncodedHtml The html , embedded as a * comment inside an anonymous function - see example, above. * @param {!Array=} opt_args Optional arguments to be substituted in the form * $0, ... within the code block. * @return {string} The html text. */ TestUtils.extractHtmlFromCommentEncodedString = function( commentEncodedHtml, opt_args) { var stringified = commentEncodedHtml.toString(); if (opt_args) { for (var i = 0; i < opt_args.length; i++) stringified = stringified.replace('$' + i, opt_args[i]); } return stringified.replace(/^[^\/]+\/\*!?/, '').replace(/\*\/[^\/]+$/, ''); }; /** * Creates a data url for a document. * @param {function() : void} doc Snippet wrapped inside of a function. * @return {string} */ TestUtils.createUrlForDoc = function(doc) { var docString = TestUtils.extractHtmlFromCommentEncodedString(doc); return 'data:text/html,<!doctype html>' + encodeURIComponent(TestUtils.collapseWhitespace( docString.replace(/[\n\r]/g, '').trim())); }; /** * Collapses inner whitespace. * @param {string} str * @return {string} */ TestUtils.collapseWhitespace = function(str) { return str.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, ''); }; /** * Similar to |TEST_F|. Generates a test for the given |testFixture|, * |testName|, and |testFunction|. * Used this variant when an |isAsync| fixture wants to temporarily mix in an * sync test. * @param {string} testFixture Fixture name. * @param {string} testName Test name. * @param {function} testFunction The test impl. */ function SYNC_TEST_F(testFixture, testName, testFunction) { TEST_F(testFixture, testName, function() { this.newCallback(testFunction)(); }); } ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/common.js // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Creates wrappers for callbacks and calls testDone() when all callbacks * have been invoked. * @param {testing.Test} fixture */ function CallbackHelper(fixture) { /** @type {Object} fixture */ this.fixture_ = fixture; /** @type {number} */ this.pendingCallbacks_ = 0; } CallbackHelper.prototype = { /** * @param {Function=} opt_callback * @return {Function} */ wrap: function(opt_callback) { var callback = opt_callback || function() {}; var savedArgs = new SaveMockArguments(); var lastCall = null; var completionAction = callFunctionWithSavedArgs(savedArgs, function() { if (lastCall) { throw new Error('Called more than once, first call here: ' + lastCall); } else { lastCall = new Error().stack; } callback.apply(this.fixture_, arguments); if (--this.pendingCallbacks_ <= 0) CallbackHelper.testDone_(); }.bind(this)); // runAllActionsAsync catches exceptions and puts them in the test // framework's list of errors and fails the test if appropriate. var runAll = runAllActionsAsync(WhenTestDone.ASSERT, completionAction); ++this.pendingCallbacks_; return function() { savedArgs.arguments = Array.prototype.slice.call(arguments); runAll.invoke(); }; } }; /** * @private */ CallbackHelper.testDone_ = this.testDone; // Remove testDone for public use since directly using it conflicts with // this callback helper. delete this.testDone; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/callback_helper.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. GEN_INCLUDE(['common.js', 'callback_helper.js']); /** * Base test fixture for ChromeVox end to end tests. * * These tests run against production ChromeVox inside of the extension's * background page context. * @constructor */ function ChromeVoxE2ETest() { this.callbackHelper_ = new CallbackHelper(this); } ChromeVoxE2ETest.prototype = { __proto__: testing.Test.prototype, /** * @override * No UI in the background context. */ runAccessibilityChecks: false, /** @override */ isAsync: true, /** @override */ browsePreload: null, /** @override */ testGenCppIncludes: function() { GEN(` #include "ash/accessibility/accessibility_delegate.h" #include "ash/shell.h" #include "base/bind.h" #include "base/callback.h" #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" #include "chrome/common/extensions/extension_constants.h" `); }, /** @override */ testGenPreamble: function() { GEN(` base::Closure load_cb = base::Bind(&chromeos::AccessibilityManager::EnableSpokenFeedback, base::Unretained(chromeos::AccessibilityManager::Get()), true); WaitForExtension(extension_misc::kChromeVoxExtensionId, load_cb); `); }, /** * Launch a new tab, wait until tab status complete, then run callback. * @param {function() : void} doc Snippet wrapped inside of a function. * @param {function()} callback Called once the document is ready. */ runWithLoadedTab: function(doc, callback) { this.launchNewTabWithDoc(doc, function(tab) { chrome.tabs.onUpdated.addListener(function(tabId, changeInfo) { if (tabId == tab.id && changeInfo.status == 'complete') { callback(tabId); } }); }); }, /** * Launches the given document in a new tab. * @param {function() : void} doc Snippet wrapped inside of a function. * @param {function(url: string)} opt_callback Called once the * document is created. */ runWithTab: function(doc, opt_callback) { var url = TestUtils.createUrlForDoc(doc); var createParams = {active: true, url: url}; chrome.tabs.create(createParams, function(tab) { if (opt_callback) opt_callback(tab.url); }); }, /** * Increment the selected index of a select control. * @param {number} tabId Of the page. * @param {string} elementQueryString */ incrementSelectedIndex: function(tabId, elementQueryString) { var code = TestUtils.extractHtmlFromCommentEncodedString( function() { /*! var target = document.body.querySelector('$0'); target.focus(); target.selectedIndex++; */ }, [elementQueryString]); chrome.tabs.executeScript(tabId, {code: code}); }, /** * Creates a callback that optionally calls {@code opt_callback} when * called. If this method is called one or more times, then * {@code testDone()} will be called when all callbacks have been called. * @param {Function=} opt_callback Wrapped callback that will have its this * reference bound to the test fixture. * @return {Function} */ newCallback: function(opt_callback) { return this.callbackHelper_.wrap(opt_callback); } }; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Include test fixture. GEN_INCLUDE(['chromevox_e2e_test_base.js']); /** * Base test fixture for ChromeVox Next end to end tests. * * These tests are identical to ChromeVoxE2ETests except for performing the * necessary setup to run ChromeVox Next. * @constructor * @extends {ChromeVoxE2ETest} */ function ChromeVoxNextE2ETest() { ChromeVoxE2ETest.call(this); if (this.runtimeDeps.length > 0) { chrome.extension.getViews().forEach(function(w) { this.runtimeDeps.forEach(function(dep) { if (w[dep]) window[dep] = w[dep]; }.bind(this)); }.bind(this)); } // For tests, enable announcement of events we trigger via automation. DesktopAutomationHandler.announceActions = true; this.originalOutputContextValues_ = {}; for (var role in Output.ROLE_INFO_) { this.originalOutputContextValues_[role] = Output.ROLE_INFO_[role]['outputContextFirst']; } } ChromeVoxNextE2ETest.prototype = { __proto__: ChromeVoxE2ETest.prototype, /** * Dependencies defined on a background window other than this one. * @type {!Array<string>} */ runtimeDeps: [], /** * Gets the desktop from the automation API and Launches a new tab with * the given document, and runs |callback| when a load complete fires. * Arranges to call |testDone()| after |callback| returns. * NOTE: Callbacks creatd instide |opt_callback| must be wrapped with * |this.newCallback| if passed to asynchonous calls. Otherwise, the test * will be finished prematurely. * @param {function() : void} doc Snippet wrapped inside of a function. * @param {function(chrome.automation.AutomationNode)} callback * Called once the document is ready. * @param {string=} opt_url Optional url to wait for. Defaults to undefined. */ runWithLoadedTree: function(doc, callback, opt_url) { callback = this.newCallback(callback); chrome.automation.getDesktop(function(r) { var url = opt_url || TestUtils.createUrlForDoc(doc); var listener = function(evt) { if (evt.target.root.url != url) return; if (!evt.target.root.docLoaded) return; r.removeEventListener('focus', listener, true); r.removeEventListener('loadComplete', listener, true); CommandHandler.onCommand('nextObject'); callback && callback(evt.target); callback = null; }; r.addEventListener('focus', listener, true); r.addEventListener('loadComplete', listener, true); var createParams = {active: true, url: url}; chrome.tabs.create(createParams); }.bind(this)); }, listenOnce: function(node, eventType, callback, capture) { var innerCallback = this.newCallback(function() { node.removeEventListener(eventType, innerCallback, capture); callback.apply(this, arguments); }); node.addEventListener(eventType, innerCallback, capture); }, /** * Forces output to place context utterances at the end of output. This eases * rebaselining when changing context ordering for a specific role. */ forceContextualLastOutput: function() { for (var role in Output.ROLE_INFO_) Output.ROLE_INFO_[role]['outputContextFirst'] = undefined; }, /** * Forces output to place context utterances at the beginning of output. */ forceContextualFirstOutput: function() { for (var role in Output.ROLE_INFO_) Output.ROLE_INFO_[role]['outputContextFirst'] = true; }, /** Resets contextual output values to their defaults. */ resetContextualOutput: function() { for (var role in Output.ROLE_INFO_) { Output.ROLE_INFO_[role]['outputContextFirst'] = this.originalOutputContextValues_[role]; } } }; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Asserts that a given argument's value is undefined. * @param {object} a The argument to check. */ function assertUndefined(a) { if (a !== undefined) { throw new Error('Assertion failed: expected undefined'); } } /** * Asserts that the argument is neither null nor undefined. * @param {object} obj The argument to check. * @param {string=} opt_message Error message if the condition is not met. */ function assertNotNullNorUndefined(obj, opt_message) { if (obj === undefined || obj === null) { throw new Error( 'Can\'t be null or undefined: ' + (opt_message || '') + '\n' + 'Actual: ' + obj); } } /** * Asserts that a given function call throws an exception. * @param {string} msg Message to print if exception not thrown. * @param {Function} fn The function to call. * @param {string} error The name of the exception we expect {@code fn} to * throw. */ function assertException(msg, fn, error) { try { fn(); } catch (e) { if (error && e.name != error) { throw new Error( 'Expected to throw ' + error + ' but threw ' + e.name + ' - ' + msg); } return; } throw new Error('Expected to throw exception ' + error + ' - ' + msg); } /** * Asserts that two arrays of strings are equal. * @param {Array<string>} array1 The expected array. * @param {Array<string>} array2 The test array. */ function assertEqualStringArrays(array1, array2) { var same = true; if (array1.length != array2.length) { same = false; } for (var i = 0; i < Math.min(array1.length, array2.length); i++) { if (array1[i].trim() != array2[i].trim()) { same = false; } } if (!same) { throw new Error( 'Expected ' + JSON.stringify(array1) + ', got ' + JSON.stringify(array2)); } } /** * Asserts that two objects have the same JSON serialization. * @param {Object} expected The expected object. * @param {Object} actual The actual object. * @param {string=} opt_message Message used for errors. */ function assertEqualsJSON(expected, actual, opt_message) { if (JSON.stringify(actual) !== JSON.stringify(expected)) { throw new Error( (opt_message ? opt_message + '\n' : '') + 'Expected ' + JSON.stringify(expected) + '\n' + 'Got ' + JSON.stringify(actual)); } } /** * Asserts that two ArrayBuffers have the same content. * @param {ArrayBuffer} arrayBufA The expected ArrayBuffer. * @param {ArrayBuffer} arrayBufB The test ArrayBuffer. */ function assertArrayBuffersEquals(arrayBufA, arrayBufB) { var view1 = new Uint8Array(arrayBufA); var view2 = new Uint8Array(arrayBufB); assertEquals(JSON.stringify(view1), JSON.stringify(view2)); } /** * Asserts that two Arrays have the same content. * @param {ArrayBuffer} arrayA The expected array. * @param {ArrayBuffer} arrayB The test array. */ function assertArraysEquals(arrayA, arrayB) { assertEquals(JSON.stringify(arrayA), JSON.stringify(arrayB)); } /** * Asserts and fails immediately once called. */ function assertNotReached() { assertFalse(true); } /** * Asserts an actual DOM equals an expected stringified DOM. * @param {string} expected * @param {Node} actual */ function assertEqualsDOM(expected, actual) { expected = expected.replace(/>\s+</gm, '><').trim(/\s/gm); var actualStr = actual.outerHTML; actualStr = actualStr.replace(/>\s+</gm, '><').trim(/\s/gm); for (var i = 0; i < expected.length; i++) assertEquals( expected[i], actualStr[i], 'Mismatch at index ' + i + ' in expected:\n' + expected + '\nactual:\n' + actualStr + '\n'); } assertSame = assertEquals; assertNotSame = assertNotEquals; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/assert_additions.js // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview This file contains the |MockFeedback| class which is * a combined mock class for speech, braille, and earcon feedback. A * test that uses this class may add expectations for speech * utterances, braille display content to be output, and earcons * played (by name). The |install| method sets appropriate mock * classes as the |cvox.ChromeVox.tts|, |cvox.ChromeVox.braille| and * |cvox.ChromeVox.earcons| objects, respectively. Output sent to * those objects will then be collected in an internal queue. * * Expectations can be added using the |expectSpeech|, * |expectBraille|, and |expectEarcon| methods. These methods take * either strings or regular expressions to match against. Strings * must match a full utterance (or display content) exactly, while a * regular expression must match a substring (use anchor operators if * needed). * * Function calls may be inserted in the stream of expectations using the * |call| method. Such callbacks are called after all preceding expectations * have been met, and before any further expectations are matched. Callbacks * are called in the order they were added to the mock. * * The |replay| method starts processing any pending utterances, * braille display content, and earcons and will try to match * expectations as new feedback enters the queue asynchronously. When * all expectations have been met and callbacks called, the finish * callback, if any was provided to the constructor, is called. * * This mock class is lean, meaning that feedback that doesn't match * any expectations is silently ignored. * * NOTE: for asynchronous tests, the processing will never finish if there * are unmet expectations. To help debugging in such situations, the mock * will output its pending state if there are pending expectations and no * output is received within a few seconds. * * See mock_feedback_test.js for example usage of this class. */ /** * Combined mock class for braille and speech output. * @param {function=} opt_finishedCallback Called when all expectations have * been met. * @constructor */ var MockFeedback = function(opt_finishedCallback) { /** * @type {function} * @private */ this.finishedCallback_ = opt_finishedCallback || null; /** * True when |replay| has been called and actions are being replayed. * @type {boolean} * @private */ this.replaying_ = false; /** * True when inside the |process| function to prevent nested calls. * @type {boolean} * @private */ this.inProcess_ = false; /** * Pending expectations and callbacks. * @type {Array<{perform: function(): boolean, toString: function(): string}>} * @private */ this.pendingActions_ = []; /** * Pending speech utterances. * @type {Array<{text: string, callback: (function|undefined)}>} * @private */ this.pendingUtterances_ = []; /** * Pending braille output. * @type {Array<{text: string, callback: (function|undefined)}>} * @private */ this.pendingBraille_ = []; /** * Pending earcons. * @type {Array<{text: string, callback: (function|undefined)}>} * @private */ this.pendingEarcons_ = []; /** * Handle for the timeout set for debug logging. * @type {number} * @private */ this.logTimeoutId_ = 0; /** * @type {cvox.NavBraille} * @private */ this.lastMatchedBraille_ = null; }; MockFeedback.prototype = { /** * Install mock objects as |cvox.ChromeVox.tts| and |cvox.ChromeVox.braille| * to collect feedback. */ install: function() { assertFalse(this.replaying_); var MockTts = function() {}; MockTts.prototype = { __proto__: cvox.TtsInterface.prototype, speak: this.addUtterance_.bind(this) }; cvox.ChromeVox.tts = new MockTts(); var MockBraille = function() {}; MockBraille.prototype = { __proto__: cvox.BrailleInterface.prototype, write: this.addBraille_.bind(this) }; cvox.ChromeVox.braille = new MockBraille(); var MockEarcons = function() {}; MockEarcons.prototype = { __proto__: cvox.AbstractEarcons.prototype, playEarcon: this.addEarcon_.bind(this) }; // cvox.ChromeVox.earcons is a getter that switches between Classic and // Next; replace it with MockEarcons. delete cvox.ChromeVox.earcons; cvox.ChromeVox.earcons = new MockEarcons(); }, /** * Adds an expectation for one or more spoken utterances. * @param {...(string|RegExp)} var_args One or more utterance to add as * expectations. * @return {MockFeedback} |this| for chaining */ expectSpeech: function() { assertFalse(this.replaying_); Array.prototype.forEach.call(arguments, function(text) { this.pendingActions_.push({ perform: function() { return !!MockFeedback.matchAndConsume_( text, {}, this.pendingUtterances_); }.bind(this), toString: function() { return 'Speak \'' + text + '\''; } }); }.bind(this)); return this; }, /** * Adds an expectation for one spoken utterance that will be enqueued * with a given queue mode. * @param {string|RegExp} text One utterance expectation. * @param {cvox.QueueMode} queueMode The expected queue mode. * @return {MockFeedback} |this| for chaining */ expectSpeechWithQueueMode: function(text, queueMode) { assertFalse(this.replaying_); this.pendingActions_.push({ perform: function() { return !!MockFeedback.matchAndConsume_( text, {queueMode: queueMode}, this.pendingUtterances_); }.bind(this), toString: function() { return 'Speak \'' + text + '\' with mode ' + queueMode; } }); return this; }, /** * Adds an expectation for one spoken utterance that will be queued. * @param {string|RegExp} text One utterance expectation. * @return {MockFeedback} |this| for chaining */ expectQueuedSpeech: function(text) { return this.expectSpeechWithQueueMode(text, cvox.QueueMode.QUEUE); }, /** * Adds an expectation for one spoken utterance that will be flushed. * @param {string|RegExp} text One utterance expectation. * @return {MockFeedback} |this| for chaining */ expectFlushingSpeech: function(text) { return this.expectSpeechWithQueueMode(text, cvox.QueueMode.FLUSH); }, /** * Adds an expectation for one spoken utterance that will be queued * with the category flush mode. * @param {string|RegExp} text One utterance expectation. * @return {MockFeedback} |this| for chaining */ expectCategoryFlushSpeech: function(text) { return this.expectSpeechWithQueueMode(text, cvox.QueueMode.CATEGORY_FLUSH); }, /** * Adds expectations for spoken utterances with specified language. * @param {string} language The expected output language for utterances. * @param {...(string)} rest One or more utterances to add as expectations. * @return {MockFeedback} |this| for chaining */ expectSpeechWithLanguage: function(language, ...rest) { assertFalse(this.replaying_); Array.prototype.forEach.call(rest, function(text) { this.pendingActions_.push({ perform: function() { return !!MockFeedback.matchAndConsume_( text, {lang: language}, this.pendingUtterances_); }.bind(this), toString: function() { return 'Speak \'' + text + '\' with language ' + language; } }); }.bind(this)); return this; }, /** * Adds an expectation that the next spoken utterances do *not* match * the given arguments. * * This is only guaranteed to work for the immediately following utterance. * If you use it to check an utterance other than the immediately following * one the results may be flaky. * * @param {...(string|RegExp)} var_args One or more utterance to add as * negative expectations. * @return {MockFeedback} |this| for chaining */ expectNextSpeechUtteranceIsNot: function() { assertFalse(this.replaying_); Array.prototype.forEach.call(arguments, function(text) { this.pendingActions_.push({ perform: function() { if (this.pendingUtterances_.length == 0) return false; if (MockFeedback.matchAndConsume_( text, {}, this.pendingUtterances_)) { throw new Error('Got disallowed utterance "' + text + '".'); } return true; }.bind(this), toString: function() { return 'Do not speak \'' + text + '\''; } }); }.bind(this)); return this; }, /** * Adds an expectation for braille output. * @param {string|RegExp} text * @param {Object=} opt_props Additional properties to match in the * |NavBraille| * @return {MockFeedback} |this| for chaining */ expectBraille: function(text, opt_props) { assertFalse(this.replaying_); var props = opt_props || {}; this.pendingActions_.push({ perform: function() { var match = MockFeedback.matchAndConsume_(text, props, this.pendingBraille_); if (match) this.lastMatchedBraille_ = match; return !!match; }.bind(this), toString: function() { return 'Braille \'' + text + '\' ' + JSON.stringify(props); } }); return this; }, /** * Adds an expectation for a played earcon. * @param {string} earconName The name of the earcon. * @return {MockFeedback} |this| for chaining */ expectEarcon: function(earconName, opt_props) { assertFalse(this.replaying_); this.pendingActions_.push({ perform: function() { var match = MockFeedback.matchAndConsume_(earconName, {}, this.pendingEarcons_); return !!match; }.bind(this), toString: function() { return 'Earcon \'' + earconName + '\''; } }); return this; }, /** * Arranges for a callback to be invoked when all expectations that were * added before this call have been met. Callbacks are called in the * order they are added. * @param {Function} callback * @return {MockFeedback} |this| for chaining */ call: function(callback) { assertFalse(this.replaying_); this.pendingActions_.push({ perform: function() { callback(); return true; }, toString: function() { return 'Callback'; } }); return this; }, /** * Clears all pending output. Useful in cases where previous output might * overlap with future expectations. * @return {MockFeedback} |this| for chaining */ clearPendingOutput: function() { this.call(function() { this.pendingUtterances_.length = 0; this.pendingBraille_.length = 0; this.pendingEarcons_.length = 0; }.bind(this)); return this; }, /** * Processes any feedback that has been received so far and treis to * satisfy the registered expectations. Any feedback that is received * after this call (via the installed mock objects) is processed immediately. * When all expectations are satisfied and registered callbacks called, * the finish callbcak, if any, is called. * This function may only be called once. */ replay: function() { assertFalse(this.replaying_); this.replaying_ = true; this.process_(); }, /** * Returns the |NavBraille| that matched an expectation. This is * intended to be used by a callback to invoke braille commands that * depend on display contents. * @type {cvox.NavBraille} */ get lastMatchedBraille() { assertTrue(this.replaying_); return this.lastMatchedBraille_; }, /** * @param {string} textString * @param {cvox.QueueMode} queueMode * @param {Object=} properties * @private */ addUtterance_: function(textString, queueMode, properties) { var callback; if (properties && (properties.startCallback || properties.endCallback)) { var startCallback = properties.startCallback; var endCallback = properties.endCallback; callback = function() { startCallback && startCallback(); endCallback && endCallback(); }; } this.pendingUtterances_.push({ text: textString, queueMode: queueMode, lang: properties ? properties['lang'] : undefined, callback: callback }); this.process_(); }, /** @private */ addBraille_: function(navBraille) { this.pendingBraille_.push(navBraille); this.process_(); }, /** @private */ addEarcon_: function(earconName) { this.pendingEarcons_.push({text: earconName}); this.process_(); }, /*** @private */ process_: function() { if (!this.replaying_ || this.inProcess_) return; try { this.inProcess_ = true; while (this.pendingActions_.length > 0) { var action = this.pendingActions_[0]; if (action.perform()) { this.pendingActions_.shift(); if (this.logTimeoutId_) { window.clearTimeout(this.logTimeoutId_); this.logTimeoutId_ = 0; } } else { break; } } if (this.pendingActions_.length == 0) { if (this.finishedCallback_) { this.finishedCallback_(); this.finishedCallback_ = null; } } else { // If there are pending actions and no matching feedback for a few // seconds, log the pending state to ease debugging. if (!this.logTimeoutId_) { this.logTimeoutId_ = window.setTimeout(this.logPendingState_.bind(this), 2000); } } } finally { this.inProcess_ = false; } }, /** @private */ logPendingState_: function() { if (this.pendingActions_.length > 0) console.log('Still waiting for ' + this.pendingActions_[0].toString()); function logPending(desc, list) { if (list.length > 0) console.log( 'Pending ' + desc + ':\n ' + list.map(function(i) { var ret = '\'' + i.text + '\''; if ('startIndex' in i) ret += ' startIndex=' + i.startIndex; if ('endIndex' in i) ret += ' endIndex=' + i.endIndex; return ret; }) .join('\n ') + '\n '); } logPending('speech utterances', this.pendingUtterances_); logPending('braille', this.pendingBraille_); logPending('earcons', this.pendingEarcons_); this.logTimeoutId_ = 0; }, }; /** * @param {string} text * @param {Object} props * @param {Array<{text: (string|RegExp), callback: (function|undefined)}>} * pending * @return {Object} * @private */ MockFeedback.matchAndConsume_ = function(text, props, pending) { for (var i = 0, candidate; candidate = pending[i]; ++i) { var candidateText = candidate.text; if (typeof(candidateText) != 'string') candidateText = candidateText.toString(); if (text === candidateText || (text instanceof RegExp && text.test(candidateText)) || (typeof (text) == 'function' && text(candidate))) { var matched = true; for (prop in props) { if (candidate[prop] !== props[prop]) { matched = false; break; } } if (matched) break; } } if (candidate) { var consumed = pending.splice(0, i + 1); consumed.forEach(function(item) { if (item.callback) item.callback(); }); } return candidate; }; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/mock_feedback.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Include test fixture. GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js', '../../testing/assert_additions.js']); GEN_INCLUDE(['../../testing/mock_feedback.js']); /** * Test fixture for Background. * @constructor * @extends {ChromeVoxNextE2ETest} */ function ChromeVoxBackgroundTest() { ChromeVoxNextE2ETest.call(this); } ChromeVoxBackgroundTest.prototype = { __proto__: ChromeVoxNextE2ETest.prototype, /** @override */ setUp: function() { window.EventType = chrome.automation.EventType; window.RoleType = chrome.automation.RoleType; window.doCmd = this.doCmd; window.press = this.press; window.Mod = constants.ModifierFlag; this.forceContextualLastOutput(); }, /** * @return {!MockFeedback} */ createMockFeedback: function() { var mockFeedback = new MockFeedback(this.newCallback(), this.newCallback.bind(this)); mockFeedback.install(); return mockFeedback; }, /** * Create a function which perform the command |cmd|. * @param {string} cmd * @return {function() : void} */ doCmd: function(cmd) { return function() { CommandHandler.onCommand(cmd); }; }, press: function(keyCode, modifiers) { return function() { BackgroundKeyboardHandler.sendKeyPress(keyCode, modifiers); }; }, linksAndHeadingsDoc: function() {/*! <p>start</p> <a href='#a'>alpha</a> <a href='#b'>beta</a> <p> <h1>charlie</h1> <a href='foo'>delta</a> </p> <a href='#bar'>echo</a> <h2>foxtraut</h2> <p>end<span>of test</span></p> */}, buttonDoc: function() {/*! <p>start</p> <button>hello button one</button> cats <button>hello button two</button> <p>end</p> */}, formsDoc: function() {/*! <select id="fruitSelect"> <option>apple</option> <option>grape</option> <option> banana</option> </select> */}, iframesDoc: function() {/*! <p>start</p> <button>Before</button> <iframe srcdoc="<button>Inside</button><h1>Inside</h1>"></iframe> <button>After</button> */}, disappearingObjectDoc: function() {/*! <p>start</p> <div role="group"> <p>Before1</p> <p>Before2</p> <p>Before3</p> </div> <div role="group"> <p id="disappearing">Disappearing</p> </div> <div role="group"> <p>After1</p> <p>After2</p> <p>After3</p> </div> <div id="live" aria-live="assertive"></div> <div id="delete" role="button">Delete</div> <script> document.getElementById('delete').addEventListener('click', function() { var d = document.getElementById('disappearing'); d.parentElement.removeChild(d); document.getElementById('live').innerText = 'Deleted'; document.body.offsetTop }); </script> */}, detailsDoc: function() {/*! <p aria-details="details">start</p> <div role="group"> <p>Before</p> <p id="details">Details</p> <p>After</p> </div> */}, }; /** Tests that ChromeVox classic is in this context. */ SYNC_TEST_F('ChromeVoxBackgroundTest', 'ClassicNamespaces', function() { assertEquals('object', typeof(cvox)); assertEquals('function', typeof(cvox.ChromeVoxBackground)); }); /** Tests that ChromeVox next is in this context. */ SYNC_TEST_F('ChromeVoxBackgroundTest', 'NextNamespaces', function() { assertEquals('function', typeof(Background)); }); /** Tests consistency of navigating forward and backward. */ TEST_F('ChromeVoxBackgroundTest', 'ForwardBackwardNavigation', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(this.linksAndHeadingsDoc, function() { mockFeedback.expectSpeech('start').expectBraille('start'); mockFeedback.call(doCmd('nextLink')) .expectSpeech('alpha', 'Link') .expectBraille('alpha lnk'); mockFeedback.call(doCmd('nextLink')) .expectSpeech('beta', 'Link') .expectBraille('beta lnk'); mockFeedback.call(doCmd('nextLink')) .expectSpeech('delta', 'Link') .expectBraille('delta lnk'); mockFeedback.call(doCmd('previousLink')) .expectSpeech('beta', 'Link') .expectBraille('beta lnk'); mockFeedback.call(doCmd('nextHeading')) .expectSpeech('charlie', 'Heading 1') .expectBraille('charlie h1'); mockFeedback.call(doCmd('nextHeading')) .expectSpeech('foxtraut', 'Heading 2') .expectBraille('foxtraut h2'); mockFeedback.call(doCmd('previousHeading')) .expectSpeech('charlie', 'Heading 1') .expectBraille('charlie h1'); mockFeedback.call(doCmd('nextObject')) .expectSpeech('delta', 'Link') .expectBraille('delta lnk'); mockFeedback.call(doCmd('nextObject')) .expectSpeech('echo', 'Link') .expectBraille('echo lnk'); mockFeedback.call(doCmd('nextObject')) .expectSpeech('foxtraut', 'Heading 2') .expectBraille('foxtraut h2'); mockFeedback.call(doCmd('nextObject')) .expectSpeech('end') .expectBraille('end'); mockFeedback.call(doCmd('previousObject')) .expectSpeech('foxtraut', 'Heading 2') .expectBraille('foxtraut h2'); mockFeedback.call(doCmd('nextLine')) .expectSpeech('foxtraut'); mockFeedback.call(doCmd('nextLine')) .expectSpeech('end', 'of test') .expectBraille('endof test'); mockFeedback.call(doCmd('jumpToTop')) .expectSpeech('start') .expectBraille('start'); mockFeedback.call(doCmd('jumpToBottom')) .expectSpeech('of test') .expectBraille('of test'); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'CaretNavigation', function() { // TODO(plundblad): Add braille expectaions when crbug.com/523285 is fixed. var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(this.linksAndHeadingsDoc, function() { mockFeedback.expectSpeech('start'); mockFeedback.call(doCmd('nextCharacter')) .expectSpeech('t'); mockFeedback.call(doCmd('nextCharacter')) .expectSpeech('a'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('alpha', 'Link'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('beta', 'Link'); mockFeedback.call(doCmd('previousWord')) .expectSpeech('alpha', 'Link'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('beta', 'Link'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('charlie', 'Heading 1'); mockFeedback.call(doCmd('nextLine')) .expectSpeech('delta', 'Link'); mockFeedback.call(doCmd('nextLine')) .expectSpeech('echo', 'Link'); mockFeedback.call(doCmd('nextLine')) .expectSpeech('foxtraut', 'Heading 2'); mockFeedback.call(doCmd('nextLine')) .expectSpeech('end', 'of test'); mockFeedback.call(doCmd('nextCharacter')) .expectSpeech('n'); mockFeedback.call(doCmd('previousCharacter')) .expectSpeech('e'); mockFeedback.call(doCmd('previousCharacter')) .expectSpeech('t', 'Heading 2'); mockFeedback.call(doCmd('previousWord')) .expectSpeech('foxtraut'); mockFeedback.call(doCmd('previousWord')) .expectSpeech('echo', 'Link'); mockFeedback.call(doCmd('previousCharacter')) .expectSpeech('a', 'Link'); mockFeedback.call(doCmd('previousCharacter')) .expectSpeech('t'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('echo', 'Link'); mockFeedback.replay(); }); }); /** Tests that individual buttons are stops for move-by-word functionality. */ TEST_F('ChromeVoxBackgroundTest', 'CaretNavigationTreatsButtonAsWord', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(this.buttonDoc, function() { mockFeedback.expectSpeech('start'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('hello button one', 'Button'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('cats'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('hello button two', 'Button'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('end'); mockFeedback.call(doCmd('previousWord')) .expectSpeech('hello button two', 'Button'); mockFeedback.call(doCmd('previousWord')) .expectSpeech('cats'); mockFeedback.call(doCmd('previousWord')) .expectSpeech('hello button one', 'Button'); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'SelectSingleBasic', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(this.formsDoc, function() { var incrementSelectedIndex = this.incrementSelectedIndex.bind(this, undefined, '#fruitSelect'); mockFeedback.expectSpeech('apple', 'has pop up', 'Collapsed') .expectBraille('apple btn +popup +') .call(incrementSelectedIndex) .expectSpeech('grape', /2 of 3/) .expectBraille('grape mnuitm 2/3 (x)') .call(incrementSelectedIndex) .expectSpeech('banana', /3 of 3/) .expectBraille('banana mnuitm 3/3 (x)'); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ContinuousRead', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(this.linksAndHeadingsDoc, function() { mockFeedback.expectSpeech('start') .call(doCmd('readFromHere')) .expectSpeech( 'start', 'alpha', 'Link', 'beta', 'Link', 'charlie', 'Heading 1'); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'InitialFocus', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree('<a href="a">a</a>', function(rootNode) { mockFeedback.expectSpeech('a') .expectSpeech('Link'); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'AriaLabel', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree('<a aria-label="foo" href="a">a</a>', function(rootNode) { rootNode.find({role: RoleType.LINK}).focus(); mockFeedback.expectSpeech('foo') .expectSpeech('Link') .expectSpeech('Press Search+Space to activate.') .expectBraille('foo lnk'); mockFeedback.replay(); } ); }); TEST_F('ChromeVoxBackgroundTest', 'ShowContextMenu', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree('<p>before</p><a href="a">a</a>', function(rootNode) { var go = rootNode.find({ role: RoleType.LINK }); // Menus no longer nest a message loop, so we can launch menu and confirm // expected speech. The menu will not block test shutdown. mockFeedback.call(go.focus.bind(go)) .expectSpeech('a', 'Link') .call(doCmd('contextMenu')) .expectSpeech(/menu opened/); mockFeedback.replay(); }.bind(this)); }); TEST_F('ChromeVoxBackgroundTest', 'BrailleRouting', function() { var mockFeedback = this.createMockFeedback(); var route = function(position) { assertTrue(ChromeVoxState.instance.onBrailleKeyEvent( {command: cvox.BrailleKeyCommand.ROUTING, displayPosition: position}, mockFeedback.lastMatchedBraille)); }; this.runWithLoadedTree( function() {/*! <p>start</p> <button type="button" id="btn1">Click me</button> <p>Some text</p> <button type="button" id="btn2">Focus me</button> <p>Some more text</p> <input type="text" id ="text" value="Edit me"> <script> document.getElementById('btn1').addEventListener('click', function() { document.getElementById('btn2').focus(); }, false); </script> */}, function(rootNode) { var button1 = rootNode.find({role: RoleType.BUTTON, attributes: { name: 'Click me' }}); var textField = rootNode.find( {role: RoleType.TEXT_FIELD}); mockFeedback.expectBraille('start') .call(button1.focus.bind(button1)) .expectBraille(/^Click me btn/) .call(route.bind(null, 5)) .expectBraille(/Focus me btn/) .call(textField.focus.bind(textField)) .expectBraille('Edit me ed', {startIndex: 0}) .call(route.bind(null, 3)) .expectBraille('Edit me ed', {startIndex: 3}) .call(function() { assertEquals(3, textField.textSelStart); }); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'FocusInputElement', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( function() {/*! <input id="name" value="Lancelot"> <input id="quest" value="Grail"> <input id="color" value="Blue"> */}, function(rootNode) { var name = rootNode.find({ attributes: { value: 'Lancelot' } }); var quest = rootNode.find({ attributes: { value: 'Grail' } }); var color = rootNode.find({ attributes: { value: 'Blue' } }); mockFeedback.call(quest.focus.bind(quest)) .expectSpeech('Grail', 'Edit text') .call(color.focus.bind(color)) .expectSpeech('Blue', 'Edit text') .call(name.focus.bind(name)) .expectNextSpeechUtteranceIsNot('Blue') .expectSpeech('Lancelot', 'Edit text'); mockFeedback.replay(); }.bind(this)); }); // Flaky, see https://crbug.com/622387. TEST_F('ChromeVoxBackgroundTest', 'DISABLED_UseEditableState', function() { this.runWithLoadedTree( function() {/*! <input type="text"></input> <p tabindex=0>hi</p> */}, function(rootNode) { var assertExists = this.newCallback(function (evt) { assertNotNullNorUndefined( DesktopAutomationHandler.instance.textEditHandler); evt.stopPropagation(); }); var assertDoesntExist = this.newCallback(function (evt) { assertTrue( !DesktopAutomationHandler.instance.textEditHandler.editableTextHandler_); evt.stopPropagation(); // Focus the other text field here to make this test not racey. editable.focus(); }); var editable = rootNode.find({ role: RoleType.TEXT_FIELD }); var nonEditable = rootNode.find({ role: RoleType.PARAGRAPH }); this.listenOnce(nonEditable, 'focus', assertDoesntExist); this.listenOnce(editable, 'focus', assertExists); nonEditable.focus(); }.bind(this)); }); TEST_F('ChromeVoxBackgroundTest', 'EarconsForControls', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( function() {/*! <p>Initial focus will be on something that's not a control.</p> <a href="#">MyLink</a> <button>MyButton</button> <input type=checkbox> <input type=checkbox checked> <input> <select multiple><option>1</option></select> <select><option>2</option></select> <input type=range value=5> */}, function(rootNode) { mockFeedback.call(doCmd('nextObject')) .expectSpeech('MyLink') .expectEarcon(cvox.Earcon.LINK) .call(doCmd('nextObject')) .expectSpeech('MyButton') .expectEarcon(cvox.Earcon.BUTTON) .call(doCmd('nextObject')) .expectSpeech('Check box') .expectEarcon(cvox.Earcon.CHECK_OFF) .call(doCmd('nextObject')) .expectSpeech('Check box') .expectEarcon(cvox.Earcon.CHECK_ON) .call(doCmd('nextObject')) .expectSpeech('Edit text') .expectEarcon(cvox.Earcon.EDITABLE_TEXT) // Editable text Search re-mappings are in effect. .call(doCmd('toggleStickyMode')) .expectSpeech('Sticky mode enabled') .call(doCmd('nextObject')) .expectSpeech('List box') .expectEarcon(cvox.Earcon.LISTBOX) .call(doCmd('nextObject')) .expectSpeech('Button', 'has pop up') .expectEarcon(cvox.Earcon.POP_UP_BUTTON) .call(doCmd('nextObject')) .expectSpeech(/Slider/) .expectEarcon(cvox.Earcon.SLIDER); mockFeedback.replay(); }.bind(this)); }); SYNC_TEST_F('ChromeVoxBackgroundTest', 'GlobsToRegExp', function() { assertEquals('/^()$/', Background.globsToRegExp_([]).toString()); assertEquals( '/^(http:\\/\\/host\\/path\\+here)$/', Background.globsToRegExp_(['http://host/path+here']).toString()); assertEquals( '/^(url1.*|u.l2|.*url3)$/', Background.globsToRegExp_(['url1*', 'u?l2', '*url3']).toString()); }); // Flaky, see https://crbug.com/622387. TEST_F('ChromeVoxBackgroundTest', 'DISABLED_ActiveOrInactive', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <a href="a">a</a> <button>b</button> <input type="text"></input> */}, function(rootNode) { var focusButton = function() { rootNode.find({role: RoleType.BUTTON}).focus(); }; var on = function() { cvox.ChromeVox.isActive = true; }; var off = function() { cvox.ChromeVox.isActive = false; }; function focusThen(toFocus, then) { toFocus.addEventListener('focus', function innerFocus(e) { if (e.target != toFocus) return; rootNode.removeEventListener('focus', innerFocus, true); then && then(); }, true); toFocus.focus(); } mockFeedback.call(focusButton) .expectSpeech('b').expectSpeech('Button') .call(off) .call(focusThen.bind(this, rootNode.find( { role: RoleType.LINK }), on)) .call(focusThen.bind(this, rootNode.find( { role: RoleType.TEXT_FIELD }))) .expectNextSpeechUtteranceIsNot('a') .expectSpeech('Edit text'); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ShouldNotFocusIframe', function() { this.runWithLoadedTree( function() {/*! <iframe tabindex=0 src="data:text/html,<p>Inside</p>"></iframe> <button>outside</button> */}, function(root) { var iframe = root.find({role: RoleType.IFRAME}); var button = root.find({role: RoleType.BUTTON}); assertEquals('iframe', iframe.role); assertEquals('button', button.role); var didFocus = false; iframe.addEventListener('focus', function() { didFocus = true; }); var b = ChromeVoxState.instance; b.currentRange_ = cursors.Range.fromNode(button); doCmd('previousElement'); assertFalse(didFocus); }.bind(this)); }); TEST_F('ChromeVoxBackgroundTest', 'ShouldFocusLink', function() { this.runWithLoadedTree( function() {/*! <div><a href="#">mylink</a></div> <button>after</button> */}, function(root) { var link = root.find({role: RoleType.LINK}); var button = root.find({role: RoleType.BUTTON}); assertEquals('link', link.role); assertEquals('button', button.role); var didFocus = false; link.addEventListener('focus', this.newCallback(function() { // Success })); var b = ChromeVoxState.instance; b.currentRange_ = cursors.Range.fromNode(button); doCmd('previousElement'); }); }); TEST_F('ChromeVoxBackgroundTest', 'NoisySlider', function() { var mockFeedback = this.createMockFeedback(); // Slider aria-valuetext must change otherwise blink suppresses event. this.runWithLoadedTree( function() {/*! <button id="go">go</button> <div id="slider" tabindex=0 role="slider"></div> <script> function update() { var s = document.getElementById('slider'); s.setAttribute('aria-valuetext', ''); s.setAttribute('aria-valuetext', 'noisy'); setTimeout(update, 500); } update(); </script> */}, function(root) { var go = root.find({role: RoleType.BUTTON}); var slider = root.find({role: RoleType.SLIDER}); var focusButton = go.focus.bind(go); var focusSlider = slider.focus.bind(slider); mockFeedback.call(focusButton) .expectNextSpeechUtteranceIsNot('noisy') .call(focusSlider) .expectSpeech('noisy') .expectSpeech('noisy') .replay(); }.bind(this)); }); TEST_F('ChromeVoxBackgroundTest', 'Checkbox', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div id="go" role="checkbox">go</div> <script> var go = document.getElementById('go'); var isChecked = true; go.addEventListener('click', function(e) { if (isChecked) go.setAttribute('aria-checked', true); else go.removeAttribute('aria-checked'); isChecked = !isChecked; }); </script> */}, function(root) { var cbx = root.find({role: RoleType.CHECK_BOX}); var click = cbx.doDefault.bind(cbx); var focus = cbx.focus.bind(cbx); mockFeedback.call(focus) .expectSpeech('go') .expectSpeech('Check box') .expectSpeech('Not checked') .call(click) .expectSpeech('go') .expectSpeech('Check box') .expectSpeech('Checked') .call(click) .expectSpeech('go') .expectSpeech('Check box') .expectSpeech('Not checked') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'MixedCheckbox', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div id="go" role="checkbox" aria-checked="mixed">go</div> */}, function(root) { mockFeedback.expectSpeech('go', 'Check box', 'Partially checked').replay(); }); }); /** Tests navigating into and out of iframes using nextButton */ TEST_F('ChromeVoxBackgroundTest', 'ForwardNavigationThroughIframeButtons', function() { var mockFeedback = this.createMockFeedback(); var running = false; var runTestIfIframeIsLoaded = function(rootNode) { if (running) return; // Return if the iframe hasn't loaded yet. var iframe = rootNode.find({role: RoleType.IFRAME}); var childDoc = iframe.firstChild; if (!childDoc || childDoc.children.length == 0) return; running = true; var beforeButton = rootNode.find({role: RoleType.BUTTON, name: 'Before'}); beforeButton.focus(); mockFeedback.expectSpeech('Before', 'Button'); mockFeedback.call(doCmd('nextButton')) .expectSpeech('Inside', 'Button'); mockFeedback.call(doCmd('nextButton')) .expectSpeech('After', 'Button'); mockFeedback.call(doCmd('previousButton')) .expectSpeech('Inside', 'Button'); mockFeedback.call(doCmd('previousButton')) .expectSpeech('Before', 'Button'); mockFeedback.replay(); }.bind(this); this.runWithLoadedTree(this.iframesDoc, function(rootNode) { chrome.automation.getDesktop(function(desktopNode) { runTestIfIframeIsLoaded(rootNode); desktopNode.addEventListener('loadComplete', function(evt) { runTestIfIframeIsLoaded(rootNode); }, true); }); }); }); /** Tests navigating into and out of iframes using nextObject */ TEST_F('ChromeVoxBackgroundTest', 'ForwardObjectNavigationThroughIframes', function() { var mockFeedback = this.createMockFeedback(); var running = false; var runTestIfIframeIsLoaded = function(rootNode) { if (running) return; // Return if the iframe hasn't loaded yet. var iframe = rootNode.find({role: 'iframe'}); var childDoc = iframe.firstChild; if (!childDoc || childDoc.children.length == 0) return; running = true; var suppressFocusActionOutput = function() { DesktopAutomationHandler.announceActions = false; }; var beforeButton = rootNode.find({role: RoleType.BUTTON, name: 'Before'}); mockFeedback.call(beforeButton.focus.bind(beforeButton)) .expectSpeech('Before', 'Button') .call(suppressFocusActionOutput) .call(doCmd('nextObject')) .expectSpeech('Inside', 'Button'); mockFeedback.call(doCmd('nextObject')) .expectSpeech('Inside', 'Heading 1'); mockFeedback.call(doCmd('nextObject')) .expectSpeech('After', 'Button'); mockFeedback.call(doCmd('previousObject')) .expectSpeech('Inside', 'Heading 1'); mockFeedback.call(doCmd('previousObject')) .expectSpeech('Inside', 'Button'); mockFeedback.call(doCmd('previousObject')) .expectSpeech('Before', 'Button'); mockFeedback.replay(); }.bind(this); this.runWithLoadedTree(this.iframesDoc, function(rootNode) { chrome.automation.getDesktop(function(desktopNode) { runTestIfIframeIsLoaded(rootNode); desktopNode.addEventListener('loadComplete', function(evt) { runTestIfIframeIsLoaded(rootNode); }, true); }); }); }); TEST_F('ChromeVoxBackgroundTest', 'SelectOptionSelected', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <select> <option>apple <option>banana <option>grapefruit </select> */}, function(root) { var select = root.find({role: RoleType.POP_UP_BUTTON}); var clickSelect = select.doDefault.bind(select); var lastOption = select.lastChild.lastChild; var selectLastOption = lastOption.doDefault.bind(lastOption); mockFeedback.call(clickSelect) .expectSpeech('apple') .expectSpeech('Button') .call(selectLastOption) .expectNextSpeechUtteranceIsNot('apple') .expectSpeech('grapefruit') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ToggleButton', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div aria-pressed="mixed" role="button">boldface</div> <div aria-pressed="true" role="button">ok</div> <div aria-pressed="false" role="button">cancel</div> <div aria-pressed role="button">close</div> */}, function(root) { var b = ChromeVoxState.instance; var move = doCmd('nextObject'); mockFeedback.call(move) .expectSpeech('boldface') .expectSpeech('Toggle Button') .expectSpeech('Partially pressed') .call(move) .expectSpeech('ok') .expectSpeech('Toggle Button') .expectSpeech('Pressed') .call(move) .expectSpeech('cancel') .expectSpeech('Toggle Button') .expectSpeech('Not pressed') .call(move) .expectSpeech('close') .expectSpeech('Button') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'EditText', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <input type="text"></input> <input role="combobox" type="text"></input> */}, function(root) { var nextEditText = doCmd('nextEditText'); var previousEditText = doCmd('previousEditText'); mockFeedback.call(nextEditText) .expectSpeech('Combo box') .call(previousEditText) .expectSpeech('Edit text') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'BackwardForwardSync', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div aria-label="Group" role="group" tabindex=0> <input type="text"></input> </div> <ul> <li tabindex=0> <button>ok</button> </li> </ul> */}, function(root) { var listItem = root.find({role: RoleType.LIST_ITEM}); mockFeedback.call(listItem.focus.bind(listItem)) .expectSpeech('List item') .call(this.doCmd('nextObject')) .expectSpeech('\u2022 ') // bullet .call(this.doCmd('nextObject')) .expectSpeech('Button') .call(this.doCmd('previousObject')) .expectSpeech('\u2022 ') // bullet .call(this.doCmd('previousObject')) .expectSpeech('List item') .call(this.doCmd('previousObject')) .expectSpeech('Edit text') .call(this.doCmd('previousObject')) .expectSpeech('Group') .replay(); }); }); /** Tests that navigation works when the current object disappears. */ TEST_F('ChromeVoxBackgroundTest', 'DisappearingObject', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(this.disappearingObjectDoc, function(rootNode) { var deleteButton = rootNode.find({role: RoleType.BUTTON, attributes: { name: 'Delete' }}); var pressDelete = deleteButton.doDefault.bind(deleteButton); mockFeedback.expectSpeech('start').expectBraille('start'); mockFeedback.call(doCmd('nextObject')) .expectSpeech('Before1') .call(doCmd('nextObject')) .expectSpeech('Before2') .call(doCmd('nextObject')) .expectSpeech('Before3') .call(doCmd('nextObject')) .expectSpeech('Disappearing') .call(pressDelete) .expectSpeech('Deleted') .call(doCmd('nextObject')) .expectSpeech('After1') .call(doCmd('nextObject')) .expectSpeech('After2') .call(doCmd('previousObject')) .expectSpeech('After1') .call(doCmd('dumpTree')); /* // This is broken by cl/1260523 making tree updating (more) asynchronous. // TODO(aboxhall/dtseng): Add a function to wait for next tree update? mockFeedback .call(doCmd('previousObject')) .expectSpeech('Before3'); */ mockFeedback.replay(); }); }); /** Tests that focus jumps to details properly when indicated. */ TEST_F('ChromeVoxBackgroundTest', 'JumpToDetails', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(this.detailsDoc, function(rootNode) { mockFeedback.call(doCmd('jumpToDetails')) .expectSpeech('Details'); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ButtonNameValueDescription', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <input type="submit" aria-label="foo" value="foo"></input> */}, function(root) { var btn = root.find({role: RoleType.BUTTON}); mockFeedback.call(btn.focus.bind(btn)) .expectSpeech('foo') .expectSpeech('Button') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NameFromHeadingLink', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <p>before</p> <h1><a href="google.com">go</a><p>here</p></h1> */}, function(root) { var link = root.find({role: RoleType.LINK}); mockFeedback.call(link.focus.bind(link)) .expectSpeech('go') .expectSpeech('Link') .expectSpeech('Heading 1') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'OptionChildIndexCount', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <div role="listbox"> <p>Fruits</p> <div role="option">apple</div> <div role="option">banana</div> </div> */}, function(root) { mockFeedback.call(doCmd('nextObject')) .expectSpeech('Fruits') .expectSpeech('with 2 items') .expectSpeech('apple') .expectSpeech(' 1 of 2 ') .call(doCmd('nextObject')) .expectSpeech('banana') .expectSpeech(' 2 of 2 ') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ListMarkerIsIgnored', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <ul><li>apple</ul> */}, function(root) { mockFeedback.call(doCmd('nextObject')) .expectNextSpeechUtteranceIsNot('listMarker') .expectSpeech('apple') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'SymetricComplexHeading', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <h4><p>NW</p><p>NE</p></h4> <h4><p>SW</p><p>SE</p></h4> */}, function(root) { mockFeedback.call(doCmd('nextHeading')) .expectNextSpeechUtteranceIsNot('NE') .expectSpeech('NW') .call(doCmd('previousHeading')) .expectNextSpeechUtteranceIsNot('NE') .expectSpeech('NW') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ContentEditableJumpSyncsRange', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <p>start</p> <div contenteditable> <h1>Top News</h1> <h1>Most Popular</h1> <h1>Sports</h1> </div> */}, function(root) { var assertRangeHasText = function(text) { return function() { assertEquals(text, ChromeVoxState.instance.getCurrentRange().start.node.name); }; }; mockFeedback.call(doCmd('nextEditText')) .expectSpeech('Top News Most Popular Sports') .call(doCmd('nextHeading')) .expectSpeech('Top News') .call(assertRangeHasText('Top News')) .call(doCmd('nextHeading')) .expectSpeech('Most Popular') .call(assertRangeHasText('Most Popular')) .call(doCmd('nextHeading')) .expectSpeech('Sports') .call(assertRangeHasText('Sports')) .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'Selection', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <p>simple</p> <p>doc</p> */}, function(root) { // Fakes a toggleSelection command. root.addEventListener('textSelectionChanged', function() { if (root.focusOffset == 3) CommandHandler.onCommand('toggleSelection'); }, true); mockFeedback.call(doCmd('toggleSelection')) .expectSpeech('simple', 'selected') .call(doCmd('nextCharacter')) .expectSpeech('i', 'selected') .call(doCmd('previousCharacter')) .expectSpeech('i', 'unselected') .call(doCmd('nextCharacter')) .call(doCmd('nextCharacter')) .expectSpeech('End selection', 'sim') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'BasicTableCommands', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <table border=1> <tr><td>name</td><td>title</td><td>address</td><td>phone</td></tr> <tr><td>Dan</td><td>Mr</td><td>666 Elm Street</td><td>212 222 5555</td></tr> </table> */}, function(root) { mockFeedback.call(doCmd('nextRow')) .expectSpeech('Dan', 'row 2 column 1') .call(doCmd('previousRow')) .expectSpeech('name', 'row 1 column 1') .call(doCmd('previousRow')) .expectSpeech('No cell above.') .call(doCmd('nextCol')) .expectSpeech('title', 'row 1 column 2') .call(doCmd('nextRow')) .expectSpeech('Mr', 'row 2 column 2') .call(doCmd('previousRow')) .expectSpeech('title', 'row 1 column 2') .call(doCmd('nextCol')) .expectSpeech('address', 'row 1 column 3') .call(doCmd('nextCol')) .expectSpeech('phone', 'row 1 column 4') .call(doCmd('nextCol')) .expectSpeech('No cell right.') .call(doCmd('previousRow')) .expectSpeech('No cell above.') .call(doCmd('nextRow')) .expectSpeech('212 222 5555', 'row 2 column 4') .call(doCmd('nextRow')) .expectSpeech('No cell below.') .call(doCmd('nextCol')) .expectSpeech('No cell right.') .call(doCmd('previousCol')) .expectSpeech('666 Elm Street', 'row 2 column 3') .call(doCmd('previousCol')) .expectSpeech('Mr', 'row 2 column 2') .call(doCmd('goToRowLastCell')) .expectSpeech('212 222 5555', 'row 2 column 4') .call(doCmd('goToRowLastCell')) .expectSpeech('212 222 5555') .call(doCmd('goToRowFirstCell')) .expectSpeech('Dan', 'row 2 column 1') .call(doCmd('goToRowFirstCell')) .expectSpeech('Dan') .call(doCmd('goToColFirstCell')) .expectSpeech('name', 'row 1 column 1') .call(doCmd('goToColFirstCell')) .expectSpeech('name') .call(doCmd('goToColLastCell')) .expectSpeech('Dan', 'row 2 column 1') .call(doCmd('goToColLastCell')) .expectSpeech('Dan') .call(doCmd('goToLastCell')) .expectSpeech('212 222 5555', 'row 2 column 4') .call(doCmd('goToLastCell')) .expectSpeech('212 222 5555') .call(doCmd('goToFirstCell')) .expectSpeech('name', 'row 1 column 1') .call(doCmd('goToFirstCell')) .expectSpeech('name') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'MissingTableCells', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <table border=1> <tr><td>a</td><td>b</td><td>c</td></tr> <tr><td>d</td><td>e</td></tr> <tr><td>f</td></tr> </table> */}, function(root) { mockFeedback.call(doCmd('goToRowLastCell')) .expectSpeech('c', 'row 1 column 3') .call(doCmd('goToRowLastCell')) .expectSpeech('c') .call(doCmd('goToRowFirstCell')) .expectSpeech('a', 'row 1 column 1') .call(doCmd('goToRowFirstCell')) .expectSpeech('a') .call(doCmd('nextCol')) .expectSpeech('b', 'row 1 column 2') .call(doCmd('goToColLastCell')) .expectSpeech('e', 'row 2 column 2') .call(doCmd('goToColLastCell')) .expectSpeech('e') .call(doCmd('goToColFirstCell')) .expectSpeech('b', 'row 1 column 2') .call(doCmd('goToColFirstCell')) .expectSpeech('b') .call(doCmd('goToFirstCell')) .expectSpeech('a', 'row 1 column 1') .call(doCmd('goToFirstCell')) .expectSpeech('a') .call(doCmd('goToLastCell')) .expectSpeech('f', 'row 3 column 1') .call(doCmd('goToLastCell')) .expectSpeech('f') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'DisabledState', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <button aria-disabled="true">ok</button> */}, function(root) { mockFeedback.expectSpeech('ok', 'Disabled', 'Button').replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'HeadingLevels', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <h1>1</h1><h2>2</h2><h3>3</h3><h4>4</h4><h5>5</h5><h6>6</h6> */}, function(root) { var makeLevelAssertions = function(level) { mockFeedback.call(doCmd('nextHeading' + level)) .expectSpeech('Heading ' + level) .call(doCmd('nextHeading' + level)) .expectEarcon('wrap') .call(doCmd('previousHeading' + level)) .expectEarcon('wrap'); }; for (var i = 1; i <= 6; i++) makeLevelAssertions(i); mockFeedback.replay(); }); }); // Flaky, see https://crbug.com/622387. TEST_F('ChromeVoxBackgroundTest', 'DISABLED_EditableNavigation', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <div contenteditable>this is a test</div> */}, function(root) { mockFeedback.call(doCmd('nextObject')) .expectSpeech('this is a test') .call(doCmd('nextObject')) .expectSpeech(/data*/) .call(doCmd('nextObject')) .expectSpeech('this is a test') .call(doCmd('nextWord')) .expectSpeech('is', 'selected') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NavigationMovesFocus', function() { this.runWithLoadedTree(function(root) {/*! <p>start</p> <input type="text"></input> */}, function(root) { this.listenOnce( root.find({role: RoleType.TEXT_FIELD}), 'focus', function(e) { var focus = ChromeVoxState.instance.currentRange.start.node; assertEquals(RoleType.TEXT_FIELD, focus.role); assertTrue(focus.state.focused); }); doCmd('nextEditText')(); }); }); TEST_F('ChromeVoxBackgroundTest', 'BrailleCaretNavigation', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <p>This is a<em>test</em> of inline braille<br>with a second line</p> */}, function(root) { var text = 'This is a'; mockFeedback.call(doCmd('nextCharacter')) .expectBraille(text, {startIndex: 1, endIndex: 2}) // h .call(doCmd('nextCharacter')) .expectBraille(text, {startIndex: 2, endIndex: 3}) // i .call(doCmd('nextWord')) .expectBraille(text, {startIndex: 5, endIndex: 7}) // is .call(doCmd('previousWord')) .expectBraille(text, {startIndex: 0, endIndex: 4}) // This .call(doCmd('nextLine')) // Ensure nothing is selected when the range covers the entire line. .expectBraille('with a second line', {startIndex: -1, endIndex: -1}) .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'InPageLinks', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <a href="#there">hi</a> <button id="there">there</button> */}, function(root) { mockFeedback.expectSpeech('hi', 'Internal link') .call(doCmd('forceClickOnCurrentItem')) .expectSpeech('there', 'Button') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ListItem', function() { this.resetContextualOutput(); var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <p>start</p> <ul><li>apple<li>grape<li>banana</ul> <ol><li>pork<li>beef<li>chicken</ol> */}, function(root) { mockFeedback.call(doCmd('nextLine')) .expectSpeech('\u2022 ', 'apple', 'List item') .expectBraille('\u2022 apple lstitm lst +3') .call(doCmd('nextLine')) .expectSpeech('\u2022 ', 'grape', 'List item') .expectBraille('\u2022 grape lstitm') .call(doCmd('nextLine')) .expectSpeech('\u2022 ', 'banana', 'List item') .expectBraille('\u2022 banana lstitm') .call(doCmd('nextLine')) .expectSpeech('1. ', 'pork', 'List item') .expectBraille('1. pork lstitm lst +3') .call(doCmd('nextLine')) .expectSpeech('2. ', 'beef', 'List item') .expectBraille('2. beef lstitm') .call(doCmd('nextLine')) .expectSpeech('3. ', 'chicken', 'List item') .expectBraille('3. chicken lstitm') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'BusyHeading', function() { this.resetContextualOutput(); var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <p>start</p> <h2><a href="#">Lots</a><a href="#">going</a><a href="#">here</a></h2> */}, function(root) { // In the past, this would have inserted the 'heading 2' after the first // link's output. Make sure it goes to the end. mockFeedback.call(doCmd('nextLine')) .expectSpeech( 'Lots', 'Link', 'going', 'Link', 'here', 'Link', 'Heading 2') .expectBraille('Lots lnk going lnk here lnk h2') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NodeVsSubnode', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <a href="#">test</a> */}, function(root) { var link = root.find({role: RoleType.LINK}); function outputLinkRange(start, end) { return function() { new Output().withSpeech(new cursors.Range(new cursors.Cursor(link, start), new cursors.Cursor(link, end))).go(); }; } mockFeedback.call(outputLinkRange(0, 0)) .expectSpeech('test', 'Link') .call(outputLinkRange(0, 1)) .expectSpeech('t') .call(outputLinkRange(1, 1)) .expectSpeech('test', 'Link') .call(outputLinkRange(1, 2)) .expectSpeech('e') .call(outputLinkRange(1, 3)) .expectNextSpeechUtteranceIsNot('Link') .expectSpeech('es') .call(outputLinkRange(0, 4)) .expectSpeech('test', 'Link') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NativeFind', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <a href="#">grape</a> <a href="#">pineapple</a> */}, function(root) { mockFeedback.call(press(70, {ctrl: true})) .expectSpeech('Find', 'Edit text') .call(press(71)) .expectSpeech('grape', 'Link') .call(press(8)) .call(press(76)) .expectSpeech('pineapple', 'Link') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'EditableKeyCommand', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <input type="text"></input> <textarea>test</textarea> <div role="textbox" contenteditable>test</div> */}, function(root) { var assertCurNode = function(node) { return function() { assertEquals(node, ChromeVoxState.instance.currentRange.start.node); }; }; var textField = root.firstChild; var textArea = textField.nextSibling; var contentEditable = textArea.nextSibling; mockFeedback.call(assertCurNode(textField)) .call(doCmd('nextObject')) .call(assertCurNode(textArea)) .call(doCmd('nextObject')) .call(assertCurNode(contentEditable)) .call(doCmd('previousObject')) .expectSpeech('Text area') .call(assertCurNode(textArea)) .call(doCmd('previousObject')) .call(assertCurNode(textField)) .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'TextSelectionAndLiveRegion', function() { DesktopAutomationHandler.announceActions = true; var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <p>start</p> <div><input value="test" type="text"></input></div> <div id="live" aria-live="assertive"></div> <script> const input = document.querySelector('input'); const [div, live] = document.querySelectorAll('div'); let clicks = 0; div.addEventListener('click', function() { clicks++; if (clicks == 1) { live.textContent = 'go'; } else if (clicks == 2) { input.selectionStart = 1; live.textContent = 'queued'; } else { input.selectionStart = 2; live.textContent = 'interrupted'; } }); </script> */}, function(root) { var textField = root.find({role: RoleType.TEXT_FIELD}); var div = textField.parent; mockFeedback.call(textField.focus.bind(textField)) .expectSpeech('Edit text') .call(div.doDefault.bind(div)) .expectSpeechWithQueueMode('go', cvox.QueueMode.CATEGORY_FLUSH) .call(div.doDefault.bind(div)) .expectSpeechWithQueueMode('e', cvox.QueueMode.FLUSH) .expectSpeechWithQueueMode('queued', cvox.QueueMode.QUEUE) .call(div.doDefault.bind(div)) .expectSpeechWithQueueMode('s', cvox.QueueMode.FLUSH) .expectSpeechWithQueueMode('interrupted', cvox.QueueMode.QUEUE) .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'TableColumnHeaders', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <div role="grid"> <div role="rowgroup"> <div role="row"> <div role="columnheader">city</div> <div role="columnheader">state</div> <div role="columnheader">zip</div> </div> </div> <div role="rowgroup"> <div role="row"> <div role="gridcell">Mountain View</div> <div role="gridcell">CA</div> <div role="gridcell">94043</div> </div> <div role="row"> <div role="gridcell">San Jose</div> <div role="gridcell">CA</div> <div role="gridcell">95128</div> </div> </div> </div> */}, function(root) { mockFeedback.call(doCmd('nextRow')) .expectSpeech('Mountain View', 'row 2 column 1') .call(doCmd('nextRow')) .expectNextSpeechUtteranceIsNot('city') .expectSpeech('San Jose', 'row 3 column 1') .call(doCmd('nextCol')) .expectSpeech('CA', 'row 3 column 2', 'state') .call(doCmd('previousRow')) .expectSpeech('CA', 'row 2 column 2') .call(doCmd('previousRow')) .expectSpeech('state', 'row 1 column 2') .replay(); }); }); // Flaky, see https://crbug.com/622387. TEST_F('ChromeVoxBackgroundTest', 'DISABLED_ActiveDescendantUpdates', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <div aria-label="container" tabindex=0 role="group" id="active" aria-activedescendant="1"> <div id="1" role="treeitem"></div> <div id="2" role="treeitem"></div> <script> var alt = false; var active = document.getElementById('active'); var one = document.getElementById('1'); var two = document.getElementById('2'); active.addEventListener('click', function() { var sel = alt ? one : two; var unsel = alt ? two : one; active.setAttribute('aria-activedescendant', sel.id); sel.setAttribute('aria-selected', true); unsel.setAttribute('aria-selected', false); alt = !alt; }); </script> */}, function(root) { var group = root.firstChild; mockFeedback.call(group.focus.bind(group)) .call(group.doDefault.bind(group)) .expectSpeech('Tree item', 'Selected', ' 2 of 2 ') .call(group.doDefault.bind(group)) .expectSpeech('Tree item', 'Selected', ' 1 of 2 ') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NavigationEscapesEdit', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <p>before content editable</p> <div role="textbox" contenteditable>this<br>is<br>a<br>test</div> <p>after content editable, before text area</p> <textarea style="word-spacing: 1000px">this is a test</textarea> <p>after text area</p> */}, function(root) { var assertBeginning = function(expected) { var textEditHandler = DesktopAutomationHandler.instance.textEditHandler; assertNotNullNorUndefined(textEditHandler); assertEquals(expected, textEditHandler.isSelectionOnFirstLine()); }; var assertEnd = function(expected) { var textEditHandler = DesktopAutomationHandler.instance.textEditHandler; assertNotNullNorUndefined(textEditHandler); assertEquals(expected, textEditHandler.isSelectionOnLastLine()); }; const [contentEditable, textArea] = root.findAll({role: RoleType.TEXT_FIELD}); this.listenOnce(contentEditable, EventType.FOCUS, function() { mockFeedback.call(assertBeginning.bind(this, true)) .call(assertEnd.bind(this, false)) .call(press(40 /* ArrowDown */)) .expectSpeech('is') .call(assertBeginning.bind(this, false)) .call(assertEnd.bind(this, false)) .call(press(40 /* ArrowDown */)) .expectSpeech('a') .call(assertBeginning.bind(this, false)) .call(assertEnd.bind(this, false)) .call(press(40 /* ArrowDown */)) .expectSpeech('test') .call(assertBeginning.bind(this, false)) .call(assertEnd.bind(this, true)) .call(textArea.focus.bind(textArea)) .expectSpeech('Text area') .call(assertBeginning.bind(this, true)) .call(assertEnd.bind(this, false)) .clearPendingOutput() .call(press(40 /* ArrowDown */)) .expectSpeech('is') .call(press(39 /* ArrowRight */)) .expectSpeech('s') .call(assertBeginning.bind(this, false)) .call(assertEnd.bind(this, false)) .call(press(40 /* ArrowDown */)) .call(press(37 /* ArrowLeft */)) .expectSpeech('a') .call(assertBeginning.bind(this, false)) .call(assertEnd.bind(this, false)) .call(press(40 /* ArrowDown */)) .expectSpeech('test') .call(press(39 /* ArrowRight */)) .expectSpeech('e') .call(assertBeginning.bind(this, false)) .call(assertEnd.bind(this, true)) .replay(); }.bind(this)); contentEditable.focus(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NavigationSyncsSelect', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <select> <option>apple</option> <option>grape</option> </select> */}, function(root) { var select = root.find({role: RoleType.POP_UP_BUTTON}); mockFeedback.call(select.doDefault.bind(select)) .expectSpeech('apple', 'Menu item', ' 1 of 2 ') .call(doCmd('nextObject')) .expectNextSpeechUtteranceIsNot('Selected') .expectNextSpeechUtteranceIsNot('Unselected') .expectSpeech('grape', 'Menu item') .expectNextSpeechUtteranceIsNot('Selected') .expectNextSpeechUtteranceIsNot('Unselected') .expectSpeech(' 2 of 2 ') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NavigationIgnoresLabels', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <p>before</p> <p id="label">label</p> <a href="#next" id="lebal">lebal</a> <p>after</p> <button aria-labelledby="label"></button> */}, function(root) { mockFeedback.expectSpeech('before') .call(doCmd('nextObject')) .expectSpeech('lebal', 'Link') .call(doCmd('nextObject')) .expectSpeech('after') .call(doCmd('previousObject')) .expectSpeech('lebal', 'Link') .call(doCmd('previousObject')) .expectSpeech('before') .call(doCmd('nextObject')) .expectSpeech('lebal', 'Link') .call(doCmd('nextObject')) .expectSpeech('after') .call(doCmd('nextObject')) .expectSpeech('label', 'lebal', 'Button') .call(doCmd('nextObject')) .expectEarcon(cvox.Earcon.WRAP) .call(doCmd('nextObject')) .expectSpeech('before') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NavigationIgnoresDescriptions', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <p>before</p> <p id="desc">label</p> <a href="#next" id="csed">lebal</a> <p>after</p> <button aria-describedby="desc"></button> */}, function(root) { mockFeedback.expectSpeech('before') .call(doCmd('nextObject')) .expectSpeech('lebal', 'Link') .call(doCmd('nextObject')) .expectSpeech('after') .call(doCmd('previousObject')) .expectSpeech('lebal', 'Link') .call(doCmd('previousObject')) .expectSpeech('before') .call(doCmd('nextObject')) .expectSpeech('lebal', 'Link') .call(doCmd('nextObject')) .expectSpeech('after') .call(doCmd('nextObject')) .expectSpeech('label', 'lebal', 'Button') .call(doCmd('nextObject')) .expectEarcon(cvox.Earcon.WRAP) .call(doCmd('nextObject')) .expectSpeech('before') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'MathContentViaInnerHtml', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/* <div role="math"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>a</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo>+</mo> <mi>m</mi> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>+</mo> <mi>b</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo>+</mo> <mi>m</mi> <mo stretchy="false">)</mo> <mo>+</mo> <mi>c</mi> <mo>=</mo> <mn>0.</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle a(y+m)^{2}+b(y+m)+c=0.}</annotation> </semantics> </div> */}, function(root) { mockFeedback .call(doCmd('nextObject')) .expectSpeech('a ( y + m ) squared + b ( y + m ) + c = 0 .') .expectSpeech('Press up, down, left, or right to explore math.') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'GestureGranularity', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/* <p>This is a test</p> */}, function(root) { var doGesture = (gesture) => { return () => { GestureCommandHandler.onAccessibilityGesture_(gesture) }; }; mockFeedback .call(doGesture('swipeLeft3')) .expectSpeech('Word') .call(doGesture('swipeDown1')) .expectSpeech('is') .call(doGesture('swipeDown1')) .expectSpeech('a') .call(doGesture('swipeUp1')) .expectSpeech('is') .call(doGesture('swipeLeft3')) .expectSpeech('Character') .call(doGesture('swipeDown1')) .expectSpeech('s') .call(doGesture('swipeUp1')) .expectSpeech('i') .call(doGesture('swipeLeft3')) .expectSpeech('Line') .call(doGesture('swipeUp1')) .expectSpeech('This is a test') .call(doGesture('swipeRight3')) .expectSpeech('Character') .call(doGesture('swipeRight3')) .expectSpeech('Word') .call(doGesture('swipeRight3')) .expectSpeech('Line') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'LinesFilterWhitespace', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/* <p>start</p> <div role="list"> <div role="listitem"> <span>Munich</span> <span>London</span> </div> </div> */}, function(root) { mockFeedback.expectSpeech('start') .clearPendingOutput() .call(doCmd('nextLine')) .expectSpeech('Munich') .expectNextSpeechUtteranceIsNot(' ') .expectSpeech('London') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'TabSwitchAndRefreshRecovery', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/* <p>tab1</p> */}, function(root1) { this.runWithLoadedTree(function() {/* <p>tab2</p> */}, function(root2) { mockFeedback.expectSpeech('tab2') .clearPendingOutput() .call(press(9 /* tab */, {shift: true, ctrl: true})) .expectSpeech('tab1') .clearPendingOutput() .call(press(9 /* tab */, {ctrl: true})) .expectSpeech('tab2') .clearPendingOutput() .call(press(82 /* R */, {ctrl: true})) // ChromeVox stays on the same node due to tree path recovery. .call(() => { assertEquals('tab2', ChromeVoxState.instance.currentRange.start.node.name); }) .replay(); }); }); }); TEST_F('ChromeVoxBackgroundTest', 'ListName', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/* <div id="_md-chips-wrapper-76" tabindex="-1" class="md-chips md-readonly" aria-setsize="4" aria-label="Favorite Sports" role="list" aria-describedby="chipsNote"> <div role="listitem">Baseball</div> <div role="listitem">Hockey</div> <div role="listitem">Lacrosse</div> <div role="listitem">Football</div> </div> */}, function(root) { mockFeedback.expectSpeech('Favorite Sports') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'LayoutTable', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/* <table><tr><td>start</td></tr></table> */}, function(root) { mockFeedback.expectSpeech( 'start', 'row 1 column 1', 'Table , 1 by 1') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ReinsertedNodeRecovery', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/* <div> <button id="start">start</button> <button id="hot">hot</button> </div> <button id="end">end</button> <script> var div = document.body.firstElementChild; var start = document.getElementById('start'); document.getElementById('hot').addEventListener('focus', (evt) => { var hot = evt.target; hot.remove(); div.insertAfter(hot, start); }); </script> */}, function(root) { mockFeedback.expectSpeech('start') .clearPendingOutput() .call(doCmd('nextObject')) .call(doCmd('nextObject')) .call(doCmd('nextObject')) .expectSpeech('end', 'Button') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'HoverTargetsLeafNode', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/* <div role=button><p>Washington</p></div> <div role=button><p>Adams</p></div> <div role=button><p>Jefferson</p></div> */}, function(root) { let button = root.find({role: RoleType.BUTTON, attributes: { name: 'Jefferson' }}); let buttonP = button.firstChild; assertNotNullNorUndefined(buttonP); let buttonText = buttonP.firstChild; assertNotNullNorUndefined(buttonText); var doHover = () => { var event = new CustomAutomationEvent( EventType.HOVER, buttonText, 'action'); DesktopAutomationHandler.instance.onHover(event); }; mockFeedback .call(doHover) .expectSpeech('Jefferson') .expectSpeech('Button') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'AriaSliderWithValueNow', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/* <div id="slider" role="slider" tabindex="0" aria-valuemin="0" aria-valuenow="50" aria-valuemax="100"></div> <script> let slider = document.getElementById('slider'); slider.addEventListener('click', () => { slider.setAttribute('aria-valuenow', parseInt(slider.getAttribute('aria-valuenow'), 10) + 1); }); </script> */}, function(root) { let slider = root.find({role: RoleType.SLIDER}); assertNotNullNorUndefined(slider); mockFeedback .call(slider.doDefault.bind(slider)) .expectSpeech('51') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'AriaSliderWithValueText', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/* <div id="slider" role="slider" tabindex="0" aria-valuemin="0" aria-valuenow="50" aria-valuemax="100" aria-valuetext="tiny"></div> <script> let slider = document.getElementById('slider'); slider.addEventListener('click', () => { slider.setAttribute('aria-valuenow', parseInt(slider.getAttribute('aria-valuenow'), 10) + 1); slider.setAttribute('aria-valuetext', 'large'); }); </script> */}, function(root) { let slider = root.find({role: RoleType.SLIDER}); assertNotNullNorUndefined(slider); mockFeedback .clearPendingOutput() .call(slider.doDefault.bind(slider)) .expectNextSpeechUtteranceIsNot('51') .expectSpeech('large') .replay(); }); }); // See https://crbug.com/924976 TEST_F('ChromeVoxBackgroundTest', 'DISABLED_ValidationTest', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/* <label for="in1">Name:</label> <input id="in1" required autofocus> <script> const in1 = document.querySelector('input'); in1.addEventListener('focus', () => { setTimeout(() => { in1.setCustomValidity('Please enter name'); in1.reportValidity(); }, 500); }); </script> */}, function(root) { mockFeedback .expectSpeech('Name:') .expectSpeech('Edit text') .expectSpeech('Required') .expectSpeech('Alert') .expectSpeech('Please enter name') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'AutoCompleteChanged', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/* <div><input type="text" aria-autocomplete="off"></input></div> <script> var div = document.querySelector('div'); var input = div.firstElementChild; var completion = input.getAttribute('aria-autocomplete'); div.addEventListener('click', () => { completion = completion == 'off' ? 'both' : 'off'; input.setAttribute('aria-autocomplete', completion); }); </script> */}, function(root) { var change = root.firstChild.doDefault.bind(root.firstChild); mockFeedback.expectSpeech('Edit text') .clearPendingOutput() .call(change) .expectSpeech('Edit text') .call(change) .expectSpeech('Edit text') .call(change) .expectNextSpeechUtteranceIsNot( 'Press up or down arrow for auto completions.') .expectSpeech('Edit text') .expectSpeech('Press up or down arrow for auto completions.') .replay(); }); }); ; //# sourceURL=file:///b/s/w/ir/out/Debug/test_data/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs runTest(true,"RUN_TEST_F",["ChromeVoxBackgroundTest","ListName"]); Stack trace: #0 0x7fb2732d8bd5 base::debug::StackTrace::StackTrace() #1 0x55640c3818d0 StackTraceGetter::CurrentStackTrace() #2 0x55640c38c537 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop() #3 0x55640c38c0c3 testing::internal::AssertHelper::operator=() #4 0x55640e2f833a extensions::browsertest_util::ExecuteScriptInBackgroundPage() #5 0x55640e5581aa ExtensionJSBrowserTest::RunJavascriptTestF() #6 0x55640e343d48 ChromeVoxBackgroundTest_ListName_Test::RunTestOnMainThread() #7 0x55640ef19e13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #8 0x55640a0fe69d base::internal::FunctorTraits<>::Invoke<>() #9 0x55640a0fe5e1 base::internal::InvokeHelper<>::MakeItSo<>() #10 0x55640a0fe587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #11 0x55640a2ca83c base::internal::Invoker<>::Run() #12 0x55640a0f1f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #13 0x55640e666d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #14 0x55640e665b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #15 0x55640be484dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #16 0x7fb26baee807 content::BrowserMainLoop::PreMainMessageLoopRun() #17 0x7fb26aeca61d base::internal::FunctorTraits<>::Invoke<>() #18 0x7fb26aeca591 base::internal::InvokeHelper<>::MakeItSo<>() #19 0x7fb26aeca537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #20 0x7fb26b89611c base::internal::Invoker<>::Run() #21 0x7fb26ae3ed5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #22 0x7fb26c301acc content::StartupTaskRunner::RunAllTasksNow() #23 0x7fb26baecfc1 content::BrowserMainLoop::CreateStartupTasks() #24 0x7fb26baf3ece content::BrowserMainRunnerImpl::Initialize() #25 0x7fb26baea361 content::BrowserMain() #26 0x7fb26ce51d2b content::RunBrowserProcessMain() #27 0x7fb26ce52fe6 content::ContentMainRunnerImpl::RunServiceManager() #28 0x7fb26ce52aa0 content::ContentMainRunnerImpl::Run() #29 0x7fb26ce50589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #30 0x7fb24a713703 service_manager::Main() #31 0x7fb26ce51835 content::ContentMain() #32 0x55640ef19a19 content::BrowserTestBase::SetUp() #33 0x55640e5c4f4e InProcessBrowserTest::SetUp() BrowserTestBase received signal: Segmentation fault. Backtrace: #0 0x7fb273470901 base::debug::CollectStackTrace() #1 0x7fb2732d8c1d base::debug::StackTrace::StackTrace() #2 0x7fb2732d8bd5 base::debug::StackTrace::StackTrace() #3 0x55640ef1a81d content::(anonymous namespace)::DumpStackTraceSignalHandler() #4 0x7fb24bbedcb0 <unknown> #5 0x55640a0f612c gfx::Size::width() #6 0x55640e55820d ExtensionJSBrowserTest::RunJavascriptTestF() #7 0x55640e343d48 ChromeVoxBackgroundTest_ListName_Test::RunTestOnMainThread() #8 0x55640ef19e13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #9 0x55640a0fe69d base::internal::FunctorTraits<>::Invoke<>() #10 0x55640a0fe5e1 base::internal::InvokeHelper<>::MakeItSo<>() #11 0x55640a0fe587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #12 0x55640a2ca83c base::internal::Invoker<>::Run() #13 0x55640a0f1f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #14 0x55640e666d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #15 0x55640e665b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #16 0x55640be484dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #17 0x7fb26baee807 content::BrowserMainLoop::PreMainMessageLoopRun() #18 0x7fb26aeca61d base::internal::FunctorTraits<>::Invoke<>() #19 0x7fb26aeca591 base::internal::InvokeHelper<>::MakeItSo<>() #20 0x7fb26aeca537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #21 0x7fb26b89611c base::internal::Invoker<>::Run() #22 0x7fb26ae3ed5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #23 0x7fb26c301acc content::StartupTaskRunner::RunAllTasksNow() #24 0x7fb26baecfc1 content::BrowserMainLoop::CreateStartupTasks() #25 0x7fb26baf3ece content::BrowserMainRunnerImpl::Initialize() #26 0x7fb26baea361 content::BrowserMain() #27 0x7fb26ce51d2b content::RunBrowserProcessMain() #28 0x7fb26ce52fe6 content::ContentMainRunnerImpl::RunServiceManager() #29 0x7fb26ce52aa0 content::ContentMainRunnerImpl::Run() #30 0x7fb26ce50589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #31 0x7fb24a713703 service_manager::Main() #32 0x7fb26ce51835 content::ContentMain() #33 0x55640ef19a19 content::BrowserTestBase::SetUp() #34 0x55640e5c4f4e InProcessBrowserTest::SetUp() #35 0x55640c3a363e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #36 0x55640c39f302 testing::internal::HandleExceptionsInMethodIfSupported<>() #37 0x55640c392b94 testing::Test::Run() #38 0x55640c393282 testing::TestInfo::Run() #39 0x55640c393793 testing::TestSuite::Run() #40 0x55640c39b274 testing::internal::UnitTestImpl::RunAllTests() #41 0x55640c3a36ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #42 0x55640c3a0152 testing::internal::HandleExceptionsInMethodIfSupported<>() #43 0x55640c39af97 testing::UnitTest::Run() #44 0x55640e5e4d01 RUN_ALL_TESTS() #45 0x55640e5e3562 base::TestSuite::Run() #46 0x55640e547b57 ChromeTestSuiteRunner::RunTestSuite() #47 0x55640e547c43 ChromeTestLauncherDelegate::RunTestSuite() #48 0x55640ef5f005 content::LaunchTests() #49 0x55640e547f87 LaunchChromeTests() #50 0x55640e5479ab main #51 0x7fb24bbd8f45 __libc_start_main #52 0x55640a0a002a _start [379/601] ChromeVoxBackgroundTest.ListName (CRASHED) [380/601] ChromeVoxBackgroundTest.ForwardObjectNavigationThroughIframes (20203 ms) [381/601] ChromeVoxBackgroundTest.NavigationIgnoresLabels (22291 ms) [382/601] ChromeVoxBackgroundTest.MissingTableCells (22825 ms) [383/601] ChromeVoxBluetoothBrailleDisplayUIUnitTest.NoDisplays (8132 ms) [384/601] ChromeVoxCursorsTest.MultiLineOffsetSelection (16544 ms) [385/601] ChromeVoxBackgroundTest.ReinsertedNodeRecovery (17325 ms) [386/601] ChromeVoxPanStrategyUnitTest.WrappedPanningMultiline (7883 ms) [387/601] ChromeVoxLiveRegionsTest.LiveRegionChangeImageAlt (17582 ms) [388/601] ChromeVoxPanStrategyUnitTest.getCurrentTextViewportContents (6562 ms) [389/601] ChromeVoxNavigationManagerUnitTest.InvalidLabels (8132 ms) [390/601] ChromeVoxNavigationManagerUnitTest.LeftRightGroupNavigation (8405 ms) [391/601] ChromeVoxAriaUtilUnitTest.GetActiveDescendant (7093 ms) [392/601] ChromeVoxNavigationManagerUnitTest.LeftRightCharacterNavigation (10233 ms) [393/601] ChromeVoxBrailleUtilUnitTest.VisitedLink (6822 ms) [394/601] ChromeVoxContentEditableExtractorUnitTest.NodePlusElement (6826 ms) [395/601] ChromeVoxCursorSelectionUnitTest.Collapse (6818 ms) [396/601] ChromeVoxDomUtilUnitTest.EscapedNames (7083 ms) [397/601] ChromeVoxDomUtilUnitTest.IsControl (7083 ms) [398/601] ChromeVoxDomUtilUnitTest.ElementToPoint (6827 ms) [399/601] ChromeVoxEditableTextUnitTest.ReplacingLongText (7349 ms) [400/601] ChromeVoxEditableTextUnitTest.CursorMovementByLine (7354 ms) [401/601] MockFeedbackUnitTest.expectWithRegex (7089 ms) [402/601] ChromeVoxCharacterWalkerUnitTest.testSyncToPage (7088 ms) [403/601] ChromeVoxObjectWalkerUnitTest.testAnchorLinkDescriptions (7620 ms) [404/601] ChromeVoxStructuralLineWalkerUnitTest.SyncTraverseUtil (7363 ms) [405/601] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/87 (7346 ms) [406/601] SelectToSpeakKeystrokeSelectionTest.HandlesTextWithBrAfterText (9183 ms) [407/601] EncodingAliases/BrowserEncodingTest.TestEncodingAliasMapping/4 (6561 ms) [408/601] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/123 (7100 ms) [409/601] EncodingAliases/BrowserEncodingTest.TestEncodingAliasMapping/12 (6293 ms) [410/601] EncodingAliases/BrowserEncodingTest.TestEncodingAliasMapping/15 (6820 ms) [411/601] EncodingAliases/BrowserEncodingTest.TestEncodingAliasMapping/21 (6558 ms) [412/601] EncodingAliases/BrowserEncodingTest.TestEncodingAliasMapping/23 (6558 ms) [413/601] EncodingAliases/BrowserEncodingTest.TestEncodingAliasMapping/25 (6296 ms) [414/601] BrowsingDataRemoverBrowserTestP.SessionCookieDeletion/1 (6319 ms) [415/601] BrowsingDataRemoverBrowserTestP.IndexedDbDeletion/1 (6571 ms) [416/601] BrowsingDataRemoverBrowserTestP.IndexedDbDeletion/0 (6819 ms) [417/601] ChromeOriginTrialsDisabledFeaturesTest.PRE_DisabledFeaturesSetOnCommandLine/0 (5782 ms) [418/601] BrowsingDataRemoverBrowserTestP.EmptyIndexedDb/1 (6574 ms) [419/601] SaveType/SavePageOriginalVsSavedComparisonTest.BrokenImage/1 (7621 ms) [420/601] CookieSettingsTest.PRE_BlockCookies/1 (9465 ms) [421/601] OutOfBlinkCorsWithServicification/CorsOriginAccessListBrowserTest.AllowSubdomain/0 (7342 ms) [422/601] SaveType/SavePageOriginalVsSavedComparisonTest.CrossSiteObject/0 (11014 ms) [423/601] LookalikeUrlNavigationObserverBrowserTest.NonIdn_NoMatch/0 (7357 ms) [424/601] SRC_ExternalClearKey/EncryptedMediaTest.Playback_VideoOnly_MP4_AV1_10bit/0 (7353 ms) [0212/012032.747905:ERROR:kill_posix.cc(84)] Unable to terminate process group 6226: No such process (3) [ RUN ] SRC_ExternalClearKey/EncryptedMediaTest.ConfigChangeVideo_EncryptedToEncrypted/0 [1:1:0212/012028.658745:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [6226:6226:0212/012029.030084:WARNING:chrome_browser_main_chromeos.cc(557)] Running as stub user with profile dir: test-user [6226:6226:0212/012029.817627:INFO:remote_commands_service.cc(38)] Fetching remote commands. [6226:6226:0212/012029.818026:WARNING:remote_commands_service.cc(40)] Client is not registered. [6226:6226:0212/012029.818811:INFO:remote_commands_invalidator.cc(32)] Initialize RemoteCommandsInvalidator. [6226:6226:0212/012029.818973:INFO:remote_commands_invalidator.cc(57)] Starting RemoteCommandsInvalidator. [6226:6226:0212/012029.819089:INFO:remote_commands_invalidator.cc(123)] RemoteCommandsInvalidator ReloadPolicyData. [6226:6226:0212/012029.819195:INFO:remote_commands_invalidator.cc(167)] Unregister RemoteCommandsInvalidator. [6226:6226:0212/012030.092363:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [6226:6392:0212/012030.559683:WARNING:simple_synchronous_entry.cc(1425)] Could not open platform files for entry. [6226:6226:0212/012031.447786:FATAL:shelf_widget.cc(293)] Check failed: login_shelf_view_->visible(). #0 0x7fd715901901 base::debug::CollectStackTrace() #1 0x7fd715769c1d base::debug::StackTrace::StackTrace() #2 0x7fd715769bd5 base::debug::StackTrace::StackTrace() #3 0x7fd7157a4827 logging::LogMessage::~LogMessage() #4 0x7fd7009d4f47 ash::ShelfWidget::GetHitTestRects() #5 0x7fd7009d6f11 ash::ShelfWindowTargeter::GetHitTestRects() #6 0x7fd7085873ae aura::WindowTargeter::EventLocationInsideBounds() #7 0x7fd6ff4547d0 wm::EasyResizeWindowTargeter::EventLocationInsideBounds() #8 0x7fd708585e04 aura::WindowTargeter::SubtreeShouldBeExploredForEvent() #9 0x7fd708587046 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #10 0x7fd708586ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #11 0x7fd70098d22b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #12 0x7fd708586c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #13 0x7fd708586aa1 aura::WindowTargeter::FindTargetForEvent() #14 0x7fd708587096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #15 0x7fd708586ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #16 0x7fd70098d22b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #17 0x7fd708586c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #18 0x7fd708586aa1 aura::WindowTargeter::FindTargetForEvent() #19 0x7fd708587096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #20 0x7fd708586ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #21 0x7fd70098d22b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #22 0x7fd708586c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #23 0x7fd708586aa1 aura::WindowTargeter::FindTargetForEvent() #24 0x7fd70a7acc0c ui::EventProcessor::OnEventFromSource() #25 0x7fd70a7acfac ui::EventProcessor::OnEventFromSource() #26 0x7fd6fefc1a1f ws::EventQueue::DeliverOrQueueEvent() #27 0x7fd7009012b8 ash::AshWindowTreeHostPlatform::DeliverEventToSink() #28 0x7fd70090135c ash::AshWindowTreeHostPlatform::DeliverEventToSink() #29 0x7fd70a7ad9f8 ui::EventSource::SendEventToSinkFromRewriter() #30 0x7fd70a7ad591 ui::EventSource::SendEventToSink() #31 0x7fd70858d01d aura::WindowTreeHostPlatform::DispatchEvent() #32 0x7fd700901191 ash::AshWindowTreeHostPlatform::DispatchEvent() #33 0x7fd6ffddaf55 base::internal::FunctorTraits<>::Invoke<>() #34 0x7fd6ffddaeb6 base::internal::InvokeHelper<>::MakeItSo<>() #35 0x7fd6ffddae47 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui22PlatformWindowDelegateEFvPNS3_5EventEEJNS0_17UnretainedWrapperIS4_EEEEEFvS6_EE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOS6_ #36 0x7fd6ffddade9 base::internal::Invoker<>::RunOnce() #37 0x7fd70a7b9db3 _ZNO4base12OnceCallbackIFvPN2ui5EventEEE3RunES3_ #38 0x7fd70a7b9be4 ui::DispatchEventFromNativeUiEvent() #39 0x7fd6ffe514bc ui::X11WindowOzone::DispatchEvent() #40 0x7fd710885887 ui::PlatformEventSource::DispatchEvent() #41 0x7fd6e90834a9 ui::X11EventSourceLibevent::DispatchPlatformEvent() #42 0x7fd6e9083053 ui::X11EventSourceLibevent::ProcessXEvent() #43 0x7fd6e90758a5 ui::X11EventSource::ExtractCookieDataDispatchEvent() #44 0x7fd6e907582e ui::X11EventSource::DispatchXEvents() #45 0x7fd6e908370f ui::X11EventSourceLibevent::OnFileCanReadWithoutBlocking() #46 0x7fd715934cae base::MessagePumpLibevent::FdWatchController::OnFileCanReadWithoutBlocking() #47 0x7fd715935dcd base::MessagePumpLibevent::OnLibeventNotification() #48 0x7fd71597e1fe event_process_active #49 0x7fd71597d847 event_base_loop #50 0x7fd715935ea4 base::MessagePumpLibevent::Run() #51 0x7fd71586602c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #52 0x7fd71580a9d7 base::RunLoop::Run() #53 0x55d85a340c8e content::RunThisRunLoop() #54 0x55d85a340e33 content::RunAllPendingInMessageLoop() #55 0x55d8599a0111 InProcessBrowserTest::PreRunTestOnMainThread() #56 0x55d85a2f3cde content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #57 0x55d8554d869d base::internal::FunctorTraits<>::Invoke<>() #58 0x55d8554d85e1 base::internal::InvokeHelper<>::MakeItSo<>() #59 0x55d8554d8587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #60 0x55d8556a483c base::internal::Invoker<>::Run() #61 0x55d8554cbf8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #62 0x55d859a40d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #63 0x55d859a3fb52 ChromeBrowserMainParts::PreMainMessageLoopRun() #64 0x55d8572224dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #65 0x7fd70df7f807 content::BrowserMainLoop::PreMainMessageLoopRun() #66 0x7fd70d35b61d base::internal::FunctorTraits<>::Invoke<>() #67 0x7fd70d35b591 base::internal::InvokeHelper<>::MakeItSo<>() #68 0x7fd70d35b537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #69 0x7fd70dd2711c base::internal::Invoker<>::Run() #70 0x7fd70d2cfd5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #71 0x7fd70e792acc content::StartupTaskRunner::RunAllTasksNow() #72 0x7fd70df7dfc1 content::BrowserMainLoop::CreateStartupTasks() #73 0x7fd70df84ece content::BrowserMainRunnerImpl::Initialize() #74 0x7fd70df7b361 content::BrowserMain() #75 0x7fd70f2e2d2b content::RunBrowserProcessMain() #76 0x7fd70f2e3fe6 content::ContentMainRunnerImpl::RunServiceManager() #77 0x7fd70f2e3aa0 content::ContentMainRunnerImpl::Run() #78 0x7fd70f2e1589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #79 0x7fd6ecba4703 service_manager::Main() #80 0x7fd70f2e2835 content::ContentMain() #81 0x55d85a2f3a19 content::BrowserTestBase::SetUp() #82 0x55d85999ef4e InProcessBrowserTest::SetUp() #83 0x55d85777d63e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #84 0x55d857779302 testing::internal::HandleExceptionsInMethodIfSupported<>() #85 0x55d85776cb94 testing::Test::Run() #86 0x55d85776d282 testing::TestInfo::Run() #87 0x55d85776d793 testing::TestSuite::Run() #88 0x55d857775274 testing::internal::UnitTestImpl::RunAllTests() #89 0x55d85777d6ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #90 0x55d85777a152 testing::internal::HandleExceptionsInMethodIfSupported<>() #91 0x55d857774f97 testing::UnitTest::Run() #92 0x55d8599bed01 RUN_ALL_TESTS() #93 0x55d8599bd562 base::TestSuite::Run() #94 0x55d859921b57 ChromeTestSuiteRunner::RunTestSuite() #95 0x55d859921c43 ChromeTestLauncherDelegate::RunTestSuite() #96 0x55d85a339005 content::LaunchTests() #97 0x55d859921f87 LaunchChromeTests() #98 0x55d8599219ab main #99 0x7fd6ee069f45 __libc_start_main #100 0x55d85547a02a _start [425/601] SRC_ExternalClearKey/EncryptedMediaTest.ConfigChangeVideo_EncryptedToEncrypted/0 (CRASHED) [426/601] LookalikeUrlNavigationObserverBrowserTest.NetError_NoMatch/0 (10511 ms) [427/601] SRC_ExternalClearKey/EncryptedMediaTest.PolicyCheck/0 (7093 ms) [428/601] SRC_ExternalClearKey/EncryptedMediaTest.Playback_Encryption_CBCS/0 (6824 ms) [429/601] SRC_ExternalClearKey/EncryptedMediaTest.Playback_EncryptedVideo_WEBM_EncryptedAudio_MP4/0 (7087 ms) [430/601] MSE_ExternalClearKey/EncryptedMediaTest.Playback_EncryptedVideo_MP4_ClearAudio_WEBM/0 (9972 ms) [431/601] MSE_ExternalClearKey/EncryptedMediaTest.Playback_EncryptedVideo_WEBM_EncryptedAudio_MP4/0 (9971 ms) [432/601] CDM_9/ECKEncryptedMediaTest.MessageTypeTest/0 (13116 ms) [433/601] WebRtcGetDisplayMediaBrowserTestWithFakeUI.GetDisplayMediaVideo/2 (11555 ms) [434/601] UkmBrowserTest.IncognitoPlusRegularCheck/0 (9185 ms) [435/601] UkmBrowserTest.OpenNonSyncCheck/0 (9180 ms) [436/601] OnDiskApp/NetworkContextConfigurationBrowserTest.ShutdownWithLiveRequest/0 (6296 ms) [437/601] UkmBrowserTest.SingleDisableHistorySyncCheck/1 (7611 ms) [438/601] OnDiskAppWithIncognitoProfile/NetworkContextConfigurationBrowserTest.BasicRequest/0 (7096 ms) [439/601] OnDiskAppWithIncognitoProfile/NetworkContextConfigurationBrowserTest.PRE_DiskCache/0 (7083 ms) [440/601] SystemNetworkContext/NetworkContextConfigurationBrowserTest.UploadFile/0 (6298 ms) [441/601] OnDiskAppWithIncognitoProfile/NetworkContextConfigurationBrowserTest.UploadFile/0 (7086 ms) [442/601] SafeBrowsingNetworkContext/NetworkContextConfigurationBrowserTest.DataURL/0 (6294 ms) [443/601] SafeBrowsingNetworkContext/NetworkContextConfigurationBrowserTest.FileURL/0 (6035 ms) [444/601] IncognitoProfileMainNetworkContext/NetworkContextConfigurationBrowserTest.BasicRequest/0 (7083 ms) [445/601] IncognitoProfileMainNetworkContext/NetworkContextConfigurationBrowserTest.FileURL/0 (7345 ms) [446/601] IncognitoProfileMainNetworkContext/NetworkContextConfigurationBrowserTest.PolicyViolatingReferrers/0 (7615 ms) [447/601] IncognitoProfileMainNetworkContext/NetworkContextConfigurationBrowserTest.PRE_ThirdPartyCookiesBlocked/0 (6819 ms) [448/601] ProfileNetworkContextServiceBrowsertest.BrotliEnabled/0 (6295 ms) [449/601] ProfileMainNetworkContext/NetworkContextConfigurationFtpPacBrowserTest.FtpPac/0 (7890 ms) [450/601] MainFrameDownloadFlagsBrowserTest.Download/5 (7876 ms) [451/601] SubframeDownloadFlagsBrowserTest.Download/7 (7610 ms) [452/601] SubframeDownloadFlagsBrowserTest.Download/16 (7349 ms) [453/601] SubframeDownloadFlagsBrowserTest.Download/22 (7613 ms) [454/601] SubframeDownloadFlagsBrowserTest.Download/34 (7083 ms) [455/601] SubframeDownloadFlagsBrowserTest.Download/88 (7098 ms) [456/601] DeviceManagementServiceIntegrationTestInstance/DeviceManagementServiceIntegrationTest.Registration/0 (6037 ms) [457/601] SSLPolicyTestCommittedInterstitials.SSLErrorOverridingDisallowed/0 (7093 ms) [458/601] MediaStreamDevicesControllerBrowserTestInstance/MediaStreamDevicesControllerBrowserTest.AudioCaptureAllowed/1 (6829 ms) [459/601] MediaRouterCastAllowAllIPsPolicyTestInstance/MediaRouterCastAllowAllIPsPolicyTest.RunTest/0 (6031 ms) [460/601] PDFTestFiles/PDFExtensionLoadTest.Load/5 (15741 ms) [461/601] SecureOriginWhitelistBrowsertest/SecureOriginWhitelistBrowsertest.Simple/4 (6831 ms) [462/601] SecureOriginWhitelistBrowsertest/SecureOriginWhitelistBrowsertest.SecurityIndicators/3 (7087 ms) [463/601] ConnectionHelpTabHelperTest.InterstitialOnNonSupportURL/0 (6826 ms) [464/601] ConnectionHelpTabHelperTest.CorrectlyExpandsClockSection/0 (7871 ms) [465/601] ConnectionHelpTabHelperTest.CorrectlyExpandsClockSection/1 (7612 ms) [466/601] SecurityStateTabHelperTest.HttpsPage/0 (7342 ms) [467/601] SecurityStateTabHelperTest.SHA1CertificateBlocked/0 (8134 ms) [468/601] SecurityStateTabHelperTest.SecurityLevelDowngradedOnFtpUrl/1 (6853 ms) [469/601] SecurityStateTabHelperTest.DefaultSecurityLevelOnSecureFilesystemUrl/0 (7084 ms) [470/601] SecurityStateTabHelperTest.HTTPSecurityLevelHistogram/0 (7091 ms) [471/601] SSLUITest.DisplayedContentWithCertErrorsClearedOnNavigation/1 (8402 ms) [472/601] SSLUITest.TestHTTPSExpiredCertAndProceed/0 (8150 ms) [473/601] SSLUITest.TestHTTPSOCSPRevokedButNotChecked/1 (7871 ms) [474/601] SSLUITest.InAppTestHTTPSExpiredCertAndProceed/1 (8924 ms) [475/601] SSLUITest.MarkFileAsNonSecure/1 (7344 ms) [476/601] SSLUITest.TestHTTPSErrorWithNoNavEntry/1 (7606 ms) [477/601] SSLUITest.TestWSSInvalidCert/0 (9185 ms) [478/601] SSLUITest.TestWSSInvalidCertAndClose/0 (12864 ms) [479/601] SSLUITest.TestRunsCachedInsecureContent/1 (7612 ms) [480/601] SSLUITest.TestInterstitialJavaScriptProceeds/0 (7869 ms) [481/601] SSLUITest.SameDocumentHasSSLState/0 (7606 ms) [482/601] SSLUITest.ClientRedirectFromMixedContentSSLState/0 (6564 ms) [483/601] SSLUITest.ClientRedirectToMixedContentSSLState/1 (6044 ms) [484/601] SSLUITest.OSReportsCaptivePortal_FeatureDisabled/1 (6031 ms) [485/601] SSLUITestIgnoreLocalhostCertErrors.NoCrashOnLoadWithNoNavigationEntry/1 (6032 ms) [486/601] SSLUITestWithExtendedReporting.TestBrokenHTTPSGoBackReporting/0 (6300 ms) [487/601] CommonNameMismatchBrowserTest.WWWSubdomainMismatch_StopOnRedirects/1 (6030 ms) [488/601] SSLUIMITMSoftwareEnabledTest.NonMatchingCertificate_NoMITMSoftwareInterstitial/0 (6041 ms) [489/601] SSLUIMITMSoftwareEnabledTest.EnterpriseManaged/0 (6033 ms) [490/601] SubresourceFilterWebSocketBrowserTest.DoNotBlockWebSocketInActivatedFrameWithNoRule/0 (6293 ms) [491/601] HostedAppTest.OpenLinkInNewTab/5 (7344 ms) [492/601] HostedAppTest.ShouldShowToolbarForHTTPSAppHTTPUrl/2 (7343 ms) [493/601] HostedAppTest.SubframeRedirectsToHostedApp/1 (8130 ms) [494/601] HostedAppCustomTabBarOnlyTest.InScopeHttpUrlsDisplayAppTitle/3 (6293 ms) [495/601] HostedAppPWAOnlyTest.DesktopPWAsOpenLinksInBrowserWhenFeatureDisabled/0 (7342 ms) [496/601] HostedAppPWAOnlyTest.LocationBarIsVisibleOffScopeOnSameOrigin/0 (6822 ms) [0212/012259.385647:ERROR:kill_posix.cc(84)] Unable to terminate process group 11136: No such process (3) [ RUN ] SSLUITest.TestGoodFrameNavigation/1 [1:1:0212/012215.156294:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [11136:11136:0212/012215.444232:WARNING:chrome_browser_main_chromeos.cc(557)] Running as stub user with profile dir: test-user [11136:11136:0212/012216.167176:INFO:remote_commands_service.cc(38)] Fetching remote commands. [11136:11136:0212/012216.167417:WARNING:remote_commands_service.cc(40)] Client is not registered. [11136:11136:0212/012216.167614:INFO:remote_commands_invalidator.cc(32)] Initialize RemoteCommandsInvalidator. [11136:11136:0212/012216.168428:INFO:remote_commands_invalidator.cc(57)] Starting RemoteCommandsInvalidator. [11136:11136:0212/012216.168526:INFO:remote_commands_invalidator.cc(123)] RemoteCommandsInvalidator ReloadPolicyData. [11136:11136:0212/012216.168612:INFO:remote_commands_invalidator.cc(167)] Unregister RemoteCommandsInvalidator. [11136:11136:0212/012216.528844:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. browser_tests --type=renderer --disable-compositor-ukm-for-tests --dom-automation --enable-logging=stderr --force-color-profile=srgb --ipc-connection-timeout=45 --test-type=browser --field-trial-handle=14253494702509389057,2325469336372463546,131072 --enable-features=TestFeatureForBrowserTest1 --disable-features=SingleProcessMash,TestFeatureForBrowserTest2 --lang=en-US --enable-crash-reporter=, --noerrdialogs --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dpMIjyA --homedir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dpMIjyA/test-user --login-profile=test-user --enable-offline-auto-reload-visible-only --num-raster-threads=4 --enable-main-frame-before-activation --service-request-channel-token=15730851959840400821 --renderer-client-id=3 --no-v8-untrusted-code-mitigations --shared-files=v8_natives_data:100,v8_snapshot_data:101: ../../third_party/breakpad/breakpad/src/common/simple_string_dictionary.h:206: size_t google_breakpad::NonAllocatingMap<40, 128, 200>::SetKeyValue(const char *, const char *) [KeySize = 40, ValueSize = 128, NumEntries = 200]: Assertion `count == 1' failed. [11136:11203:0212/012220.128468:ERROR:crash_handler_host_linux.cc(443)] Failed to write crash dump for pid 11295 [11136:11191:0212/012220.129120:WARNING:crash_handler_host_linux.cc(341)] Could not translate tid, attempt = 1 retry ... Cannot upload crash dump: failed to open Failed to save crash dump: failed to open [11136:11203:0212/012220.239138:ERROR:crash_handler_host_linux.cc(443)] Failed to write crash dump for pid 11295 Cannot upload crash dump: failed to open Failed to save crash dump: failed to open [11136:11136:0212/012220.443986:INFO:browser_test_utils.cc(2215)] DOMMessageQueue::RenderProcessGone 3 [11136:11136:0212/012220.480216:ERROR:browser_test_utils.cc(199)] Cannot communicate with DOMMessageQueue. ../../chrome/browser/ssl/ssl_browsertest.cc:3561: Failure Value of: content::ExecuteScriptAndExtractBool( tab, "window.domAutomationController.send(clickLink('badHTTPSLink'));", &success) Actual: false Expected: true Stack trace: #0 0x7f32d6cf7bd5 base::debug::StackTrace::StackTrace() #1 0x559d556a08d0 StackTraceGetter::CurrentStackTrace() #2 0x559d556ab537 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop() #3 0x559d556ab0c3 testing::internal::AssertHelper::operator=() #4 0x559d53c4780d SSLUITest_TestGoodFrameNavigation_Test::RunTestOnMainThread() #5 0x559d58238e13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #6 0x559d5341d69d base::internal::FunctorTraits<>::Invoke<>() #7 0x559d5341d5e1 base::internal::InvokeHelper<>::MakeItSo<>() #8 0x559d5341d587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #9 0x559d535e983c base::internal::Invoker<>::Run() #10 0x559d53410f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #11 0x559d57985d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #12 0x559d57984b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #13 0x559d551674dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #14 0x7f32cf50d807 content::BrowserMainLoop::PreMainMessageLoopRun() #15 0x7f32ce8e961d base::internal::FunctorTraits<>::Invoke<>() #16 0x7f32ce8e9591 base::internal::InvokeHelper<>::MakeItSo<>() #17 0x7f32ce8e9537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #18 0x7f32cf2b511c base::internal::Invoker<>::Run() #19 0x7f32ce85dd5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #20 0x7f32cfd20acc content::StartupTaskRunner::RunAllTasksNow() #21 0x7f32cf50bfc1 content::BrowserMainLoop::CreateStartupTasks() #22 0x7f32cf512ece content::BrowserMainRunnerImpl::Initialize() #23 0x7f32cf509361 content::BrowserMain() #24 0x7f32d0870d2b content::RunBrowserProcessMain() #25 0x7f32d0871fe6 content::ContentMainRunnerImpl::RunServiceManager() #26 0x7f32d0871aa0 content::ContentMainRunnerImpl::Run() #27 0x7f32d086f589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #28 0x7f32ae132703 service_manager::Main() #29 0x7f32d0870835 content::ContentMain() #30 0x559d58238a19 content::BrowserTestBase::SetUp() #31 0x559d578e3f4e InProcessBrowserTest::SetUp() #32 0x559d53c8f5dc SSLUITestBase::SetUp() BrowserTestBase received signal: Terminated. Backtrace: #0 0x7f32d6e8f901 base::debug::CollectStackTrace() #1 0x7f32d6cf7c1d base::debug::StackTrace::StackTrace() #2 0x7f32d6cf7bd5 base::debug::StackTrace::StackTrace() #3 0x559d5823981d content::(anonymous namespace)::DumpStackTraceSignalHandler() #4 0x7f32af60ccb0 <unknown> #5 0x7f32af6d46d3 epoll_wait #6 0x7f32d6f1806f epoll_dispatch #7 0x7f32d6f0b7f5 event_base_loop #8 0x7f32d6ec40af base::MessagePumpLibevent::Run() #9 0x7f32d6df402c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #10 0x7f32d6d989d7 base::RunLoop::Run() #11 0x559d5828724e content::WindowedNotificationObserver::Wait() #12 0x559d53c47944 SSLUITest_TestGoodFrameNavigation_Test::RunTestOnMainThread() #13 0x559d58238e13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #14 0x559d5341d69d base::internal::FunctorTraits<>::Invoke<>() #15 0x559d5341d5e1 base::internal::InvokeHelper<>::MakeItSo<>() #16 0x559d5341d587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #17 0x559d535e983c base::internal::Invoker<>::Run() #18 0x559d53410f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #19 0x559d57985d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #20 0x559d57984b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #21 0x559d551674dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #22 0x7f32cf50d807 content::BrowserMainLoop::PreMainMessageLoopRun() #23 0x7f32ce8e961d base::internal::FunctorTraits<>::Invoke<>() #24 0x7f32ce8e9591 base::internal::InvokeHelper<>::MakeItSo<>() #25 0x7f32ce8e9537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #26 0x7f32cf2b511c base::internal::Invoker<>::Run() #27 0x7f32ce85dd5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #28 0x7f32cfd20acc content::StartupTaskRunner::RunAllTasksNow() #29 0x7f32cf50bfc1 content::BrowserMainLoop::CreateStartupTasks() #30 0x7f32cf512ece content::BrowserMainRunnerImpl::Initialize() #31 0x7f32cf509361 content::BrowserMain() #32 0x7f32d0870d2b content::RunBrowserProcessMain() #33 0x7f32d0871fe6 content::ContentMainRunnerImpl::RunServiceManager() #34 0x7f32d0871aa0 content::ContentMainRunnerImpl::Run() #35 0x7f32d086f589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #36 0x7f32ae132703 service_manager::Main() #37 0x7f32d0870835 content::ContentMain() #38 0x559d58238a19 content::BrowserTestBase::SetUp() #39 0x559d578e3f4e InProcessBrowserTest::SetUp() #40 0x559d53c8f5dc SSLUITestBase::SetUp() #41 0x559d556c263e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #42 0x559d556be302 testing::internal::HandleExceptionsInMethodIfSupported<>() #43 0x559d556b1b94 testing::Test::Run() #44 0x559d556b2282 testing::TestInfo::Run() #45 0x559d556b2793 testing::TestSuite::Run() #46 0x559d556ba274 testing::internal::UnitTestImpl::RunAllTests() #47 0x559d556c26ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #48 0x559d556bf152 testing::internal::HandleExceptionsInMethodIfSupported<>() #49 0x559d556b9f97 testing::UnitTest::Run() #50 0x559d57903d01 RUN_ALL_TESTS() #51 0x559d57902562 base::TestSuite::Run() #52 0x559d57866b57 ChromeTestSuiteRunner::RunTestSuite() #53 0x559d57866c43 ChromeTestLauncherDelegate::RunTestSuite() #54 0x559d5827e005 content::LaunchTests() #55 0x559d57866f87 LaunchChromeTests() #56 0x559d578669ab main #57 0x7f32af5f7f45 __libc_start_main #58 0x559d533bf02a _start [497/601] SSLUITest.TestGoodFrameNavigation/1 (TIMED OUT) [498/601] HostedAppPWAOnlyTest.UninstallPwaWithWindowMovedToTab/0 (6820 ms) [499/601] HostedAppIsolatedOriginTest.AppBroaderThanIsolatedOrigin/3 (11559 ms) [500/601] HostedAppProcessModelTest.PopupsInsideHostedApp/0 (17065 ms) [501/601] HostedAppProcessModelTest.PopupsInsideHostedApp/1 (16261 ms) [502/601] IntentPickerBubbleViewBrowserTest.NavigationToOutofScopeLinkDoesNotShowIntentPicker/0 (7870 ms) [503/601] HostedAppProcessModelTest.FromOutsideHostedApp/0 (19683 ms) [504/601] ManagedWithPermission/ManagedWithPermissionPlatformKeysTest.PRE_PolicyGrantsAccessToCorporateKey/1 (7874 ms) [505/601] IntentPickerBubbleViewBrowserTest.NavigationInAppWindowToInScopeLinkDoesNotShowIntentPickerWhenDesktopPWAsStayInWindowDisabled/2 (8663 ms) [506/601] FetchBehaviorTests/ContentVerifierHashTest.TamperNoResourceExtensionKeepComputedHashes/0 (7082 ms) [507/601] FetchBehaviorTests/ContentVerifierHashTest.TamperRequestedResourceTamperComputedHashes/1 (8140 ms) [508/601] ExtensionBindingsApiTest.HandlerFunctionTypeChecking/1 (7082 ms) [509/601] ExtensionBindingsUserGestureTest.WebUserGestureAfterApiCallback/3 (7353 ms) [510/601] NativeBindings/ExternallyConnectableMessagingTest.FromIframeWithoutPermission/0 (7605 ms) [511/601] ExtensionBindingsApiTest.MultipleEventListenersFromDifferentContextsAndTheSameExtension/0 (9203 ms) [512/601] JavaScriptBindings/ExternallyConnectableMessagingTest.WebConnectableWithTlsChannelIdWithNonMatchingSite/0 (7081 ms) [513/601] JavaScriptBindings/ExternallyConnectableMessagingTest.FromIncognitoAllowExtension/0 (8922 ms) [514/601] JavaScriptBindings/ExternallyConnectableMessagingTest.WebConnectableWithNonEmptyTlsChannelId/0 (8655 ms) [515/601] ServiceWorkerTestWithNativeBindings/ServiceWorkerTest.NotificationAPI/0 (7097 ms) [516/601] ExecuteScriptApiTest/DestructiveScriptTest.SynchronousRemoval/0 (30949 ms) [517/601] ServiceWorkerTestWithJSBindings/ServiceWorkerTest.WebAccessibleResourcesFetch/0 (7347 ms) [518/601] ServiceWorkerTestWithNativeBindings/ServiceWorkerTest.FetchFromContentScriptShouldNotGoToServiceWorkerOfPage/0 (7879 ms) [519/601] ServiceWorkerTestWithJSBindings/ServiceWorkerTest.WebAccessibleResourcesIframeSrc/0 (8922 ms) [520/601] ServiceWorkerPushMessagingTestWithNativeBindings/ServiceWorkerPushMessagingTest.OnPush/0 (7879 ms) [521/601] Parameterized/UpdateServiceTest.UninstallExtensionWhileUpdating/0 (7615 ms) [522/601] AccessibilityFeatureaApiTestInstantiatePermission/AccessibilityFeaturesApiTest.Get/0 (8939 ms) [523/601] SelectFileDialogExtensionBrowserTest/SelectFileDialogExtensionBrowserTest.OpenTwoDialogs/0 (19170 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=FileDisplay/FilesAppBrowserTest.Test/fileDisplayDrive_TabletMode_DriveFs --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsnR3Ver/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dgb3Lwo ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=FileDisplay/FilesAppBrowserTest.Test/fileSearch --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsmBnpFw/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dkvQ9Wt ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=FileDisplay/FilesAppBrowserTest.Test/fileDisplayUnmountDriveWithSharedWithMeSelected_MyFilesVolume --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/results0Ud35B/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dQ5uInz ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=OpenImageFiles/FilesAppBrowserTest.Test/imageOpenDownloads --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/results5NCRwH/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dcgDrOE [524/601] FileDisplay/FilesAppBrowserTest.Test/fileSearch (27546 ms) [525/601] FileDisplay/FilesAppBrowserTest.Test/fileDisplayDrive_TabletMode_DriveFs (28603 ms) [526/601] FileDisplay/FilesAppBrowserTest.Test/fileDisplayUnmountDriveWithSharedWithMeSelected_MyFilesVolume (25469 ms) [527/601] OpenImageFiles/FilesAppBrowserTest.Test/imageOpenDownloads (29647 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=OpenImageFiles/FilesAppBrowserTest.Test/imageOpenGalleryOpenDrive_DriveFs --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/results5tGQXM/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dMVflfK ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ZipFiles/FilesAppBrowserTest.Test/zipFileOpenDownloadsShiftJIS --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsiGf1oS/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/d8t7pGP ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ZipFiles/FilesAppBrowserTest.Test/zipFileOpenDrive_DriveFs --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultswRsmQX/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dX90F7U ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ContextMenu2/FilesAppBrowserTest.Test/checkShareDisabledForStrictReadOnlyDocument_DriveFs --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsK4iTh3/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dsHY6y0 [528/601] OpenImageFiles/FilesAppBrowserTest.Test/imageOpenGalleryOpenDrive_DriveFs (36733 ms) [529/601] ZipFiles/FilesAppBrowserTest.Test/zipFileOpenDownloadsShiftJIS (41993 ms) [530/601] ContextMenu2/FilesAppBrowserTest.Test/checkShareDisabledForStrictReadOnlyDocument_DriveFs (31488 ms) [531/601] ZipFiles/FilesAppBrowserTest.Test/zipFileOpenDrive_DriveFs (41731 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ContextMenu2/FilesAppBrowserTest.Test/checkPasteDisabledForReadOnlyFolderInTree_DriveFs --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsI7kBJ8/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dYZsJ05 ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=QuickView/FilesAppBrowserTest.Test/openQuickViewPdf --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsaOStbe/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/duLPwsb ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=DirectoryTreeContextMenu/FilesAppBrowserTest.Test/dirCutWithContextMenu --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsCdZwDj/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dqnzuUg ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=DirectoryTreeContextMenu/FilesAppBrowserTest.Test/dirRenameToExisting --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/results0dPK5o/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dQy5Cmm [532/601] ContextMenu2/FilesAppBrowserTest.Test/checkPasteDisabledForReadOnlyFolderInTree_DriveFs (26517 ms) [533/601] QuickView/FilesAppBrowserTest.Test/openQuickViewPdf (27569 ms) [534/601] DirectoryTreeContextMenu/FilesAppBrowserTest.Test/dirRenameToExisting (26762 ms) [535/601] DirectoryTreeContextMenu/FilesAppBrowserTest.Test/dirCutWithContextMenu (28883 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=Transfer/FilesAppBrowserTest.Test/transferFromSharedToDownloads --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultstiG9xu/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dQsiWOr ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=Transfer/FilesAppBrowserTest.Test/transferFromSharedToDownloads_DriveFs --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/results2YmJ0z/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dcTGqhx ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=Transfer/FilesAppBrowserTest.Test/transferFromSharedToDrive --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/results6xhttF/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dTLx5JC ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=Transfer/FilesAppBrowserTest.Test/transferBetweenTeamDrives_DriveFs --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsBvgoWK/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/d6hYUcI [536/601] Transfer/FilesAppBrowserTest.Test/transferFromSharedToDownloads (27024 ms) [537/601] Transfer/FilesAppBrowserTest.Test/transferFromSharedToDownloads_DriveFs (26011 ms) [538/601] Transfer/FilesAppBrowserTest.Test/transferFromSharedToDrive (28353 ms) [539/601] Transfer/FilesAppBrowserTest.Test/transferBetweenTeamDrives_DriveFs (31778 ms) [540/601] ShareAndManageDialog/FilesAppBrowserTest.Test/shareDirectoryDrive_DriveFs (27555 ms) [541/601] ShareAndManageDialog/FilesAppBrowserTest.Test/shareHostedFileTeamDrive (28910 ms) [542/601] ShareAndManageDialog/FilesAppBrowserTest.Test/manageHostedFileTeamDrive (29134 ms) [543/601] FileDialog/FilesAppBrowserTest.Test/openFileDialogDownloads (25722 ms) [544/601] InputMethodEngineIncognitoBrowserTest/InputMethodEngineBrowserTest.APIArgumentTest/0 (9982 ms) [545/601] FileDialog/FilesAppBrowserTest.Test/openFileDialogDriveHostedDoc_DriveFs (27035 ms) [546/601] Recents/FilesAppBrowserTest.Test/recentsDownloads (23633 ms) [547/601] PolicyDeviceDisplayResolution/DeviceDisplayResolutionTest.SetAndUnsetPolicy/2 (7093 ms) [548/601] Recents/FilesAppBrowserTest.Test/recentsDrive_DriveFs (21529 ms) [549/601] PolicyDisplayRotationDefault/DisplayRotationDefaultTest.EnumsInSync/2 (4991 ms) [550/601] PolicyDisplayRotationDefault/DisplayRotationDefaultTest.ConnectSecondDisplay/1 (6306 ms) [551/601] PolicyDisplayRotationDefault/DisplayRotationDefaultTest.UserInteraction/1 (5513 ms) [552/601] PolicyDisplayRotationDefault/DisplayRotationDefaultTest.SetAndUnsetPolicy/0 (5247 ms) [553/601] PolicyDisplayRotationDefault/DisplayRotationDefaultTest.SetAndUnsetPolicyWithUserInteraction/2 (6040 ms) [554/601] PolicyDisplayRotationDefault/DisplayRotationBootTest.PRE_Reboot/2 (6822 ms) [555/601] SigninProfileAppsPolicyPerChannelTest.NotWhitelistedAppInstallation/4 (6033 ms) [556/601] Blub/UnaffiliatedArcAllowedTest.PRE_ProfileTest/0 (6037 ms) [557/601] MergeSessionTest.XHRThrottle/1 (36214 ms) [558/601] BrowserNonClientFrameViewAshTest.NonClientHitTest/0 (6819 ms) [559/601] ImmersiveModeBrowserViewTest.LockedFullscreenDisablesImmersive/1 (7607 ms) [560/601] ImmersiveModeBrowserViewTest.TestCaptionButtonsReceiveEventsInBrowserImmersiveMode/1 (7874 ms) [561/601] TrayAccessibilityTestInstance/TrayAccessibilityTest.ShowMenu/1 (22030 ms) [562/601] HostedAppNonClientFrameViewAshTest.ManagePasswordsIcon/0 (7613 ms) [563/601] HostedAppNonClientFrameViewAshTest.BrowserCommandFocusNextPane/0 (7608 ms) [564/601] HostedAppNonClientFrameViewAshTest.BrowserCommandFocusNextPane/1 (7606 ms) [565/601] SiteIsolationFlagHandlingTest.FlagHandlingTest/9 (35408 ms) [566/601] CertificateReportingServiceBrowserTest.Delayed_Resumed/1 (7622 ms) [567/601] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.DontProceed/1 (7895 ms) [568/601] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.IframeDontProceed/1 (7622 ms) [569/601] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.MainFrameBlockedShouldHaveNoDOMDetailsWhenProceeding/0 (8144 ms) [570/601] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.ProceedDisabled/1 (7345 ms) [571/601] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.ProceedDisabled/5 (7367 ms) [572/601] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.ReportingDisabledByPolicy/0 (7354 ms) [573/601] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.Histograms_DontProceed/1 (7349 ms) [574/601] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.WhitelistRevisit/3 (9186 ms) [575/601] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.VerifyHitReportNotSentOnIncognito/1 (8134 ms) [576/601] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.WhitelistIframeRevisit/1 (9455 ms) [577/601] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.SecurityStateDowngradedForSubresourceInterstitial/0 (7611 ms) [578/601] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.SecurityState_HTTP/0 (7346 ms) [579/601] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.CommittedInterstitialShows/1 (7082 ms) [580/601] SafeBrowsingBlockingPageBrowserTestWithThreatTypeAndIsolationSetting/SafeBrowsingBlockingPageBrowserTest.SecurityState_HTTP/1 (7378 ms) [581/601] SupervisedUserBlockModeTest.Unblock/0 (8146 ms) [582/601] MimeHandlerViewCrossProcessTest.NavigationRaceFromCrossProcessRenderer/0 (6299 ms) [583/601] ChromeUpdatesEventsApiTest.ChromeUpdates (6563 ms) [0212/012819.004888:ERROR:kill_posix.cc(84)] Unable to terminate process group 25686: No such process (3) [584/601] BrowsingDataRemoverBrowserTest.StorageRemovedFromDisk (SKIPPED) [ RUN ] BrowsingDataRemoverBrowserTest.PRE_StorageRemovedFromDisk [1:1:0212/012813.741132:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [25686:25686:0212/012814.134237:WARNING:chrome_browser_main_chromeos.cc(557)] Running as stub user with profile dir: test-user [25686:25686:0212/012814.920244:INFO:remote_commands_service.cc(38)] Fetching remote commands. [25686:25686:0212/012814.921103:WARNING:remote_commands_service.cc(40)] Client is not registered. [25686:25686:0212/012814.921729:INFO:remote_commands_invalidator.cc(32)] Initialize RemoteCommandsInvalidator. [25686:25686:0212/012814.922785:INFO:remote_commands_invalidator.cc(57)] Starting RemoteCommandsInvalidator. [25686:25686:0212/012814.923111:INFO:remote_commands_invalidator.cc(123)] RemoteCommandsInvalidator ReloadPolicyData. [25686:25686:0212/012814.924401:INFO:remote_commands_invalidator.cc(167)] Unregister RemoteCommandsInvalidator. [25686:25686:0212/012815.289314:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [25686:25686:0212/012816.009366:WARNING:auth_sync_observer.cc(93)] Invalidate OAuth token because of an auth error: Invalid credentials (credentials missing). [25686:25686:0212/012816.329406:ERROR:account_tracker.cc(240)] AccessTokenFetched error: Invalid credentials (credentials missing). [25686:25686:0212/012816.329476:WARNING:account_tracker.cc(190)] Failed to get UserInfo for stub-user@example.com [25686:25686:0212/012816.329809:ERROR:account_info_fetcher.cc(59)] OnGetTokenFailure: Invalid credentials (credentials missing). [25686:25686:0212/012816.329862:WARNING:account_fetcher_service.cc(317)] Failed to get UserInfo for stub-user@example.com [25686:25686:0212/012816.413409:WARNING:auth_sync_observer.cc(93)] Invalidate OAuth token because of an auth error: Invalid credentials (credentials missing). [25686:25804:0212/012816.425056:ERROR:checkin_request.cc(219)] Failed to get checkin response. Fetcher failed. Retrying. [25686:25686:0212/012816.651109:WARNING:auth_sync_observer.cc(93)] Invalidate OAuth token because of an auth error: Invalid credentials (credentials missing). ../../chrome/browser/browsing_data/browsing_data_remover_browsertest.cc:486: Failure Expected equality of these values: expected Which is: 7 GetCookiesTreeModelCount(model->GetRoot()) Which is: 6 CookieTreeModel: localhost Cache Storage 22 File systems 15 Indexed databases 13 Local storage 7 Service Workers 18 Web databases 5 Stack trace: #0 0x7ff8c0694bd5 base::debug::StackTrace::StackTrace() #1 0x555561fc08d0 StackTraceGetter::CurrentStackTrace() #2 0x555561fcb537 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop() #3 0x555561fcb0c3 testing::internal::AssertHelper::operator=() #4 0x55555fdea30f BrowsingDataRemoverBrowserTest::ExpectCookieTreeModelCount() #5 0x55555fde5ff2 BrowsingDataRemoverBrowserTest_PRE_StorageRemovedFromDisk_Test::RunTestOnMainThread() #6 0x555564b58e13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #7 0x55555fd3d69d base::internal::FunctorTraits<>::Invoke<>() #8 0x55555fd3d5e1 base::internal::InvokeHelper<>::MakeItSo<>() #9 0x55555fd3d587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #10 0x55555ff0983c base::internal::Invoker<>::Run() #11 0x55555fd30f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #12 0x5555642a5d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #13 0x5555642a4b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #14 0x555561a874dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #15 0x7ff8b8eaa807 content::BrowserMainLoop::PreMainMessageLoopRun() #16 0x7ff8b828661d base::internal::FunctorTraits<>::Invoke<>() #17 0x7ff8b8286591 base::internal::InvokeHelper<>::MakeItSo<>() #18 0x7ff8b8286537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #19 0x7ff8b8c5211c base::internal::Invoker<>::Run() #20 0x7ff8b81fad5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #21 0x7ff8b96bdacc content::StartupTaskRunner::RunAllTasksNow() #22 0x7ff8b8ea8fc1 content::BrowserMainLoop::CreateStartupTasks() #23 0x7ff8b8eafece content::BrowserMainRunnerImpl::Initialize() #24 0x7ff8b8ea6361 content::BrowserMain() #25 0x7ff8ba20dd2b content::RunBrowserProcessMain() #26 0x7ff8ba20efe6 content::ContentMainRunnerImpl::RunServiceManager() #27 0x7ff8ba20eaa0 content::ContentMainRunnerImpl::Run() #28 0x7ff8ba20c589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #29 0x7ff897acf703 service_manager::Main() #30 0x7ff8ba20d835 content::ContentMain() #31 0x555564b58a19 content::BrowserTestBase::SetUp() #32 0x555564203f4e InProcessBrowserTest::SetUp() [25686:25686:0212/012818.511071:ERROR:http_bridge.cc(127)] Not implemented reached in virtual void syncer::HttpBridgeFactory::OnSignalReceived() [25686:25686:0212/012818.515121:INFO:remote_commands_invalidator.cc(45)] Shutdown RemoteCommandsInvalidator. [25686:25686:0212/012818.515219:INFO:remote_commands_invalidator.cc(68)] Stopping RemoteCommandsInvalidator. [25686:25686:0212/012818.515291:INFO:remote_commands_invalidator.cc(167)] Unregister RemoteCommandsInvalidator. [25686:25804:0212/012818.630202:WARNING:discardable_shared_memory_manager.cc(410)] Some MojoDiscardableSharedMemoryManagerImpls are still alive. They will be leaked. [25686:25998:0212/012818.635898:WARNING:internal_linux.cc(64)] Failed to read /proc/25825/stat [25686:25686:0212/012818.646267:WARNING:pref_notifier_impl.cc(23)] Pref observer found at shutdown. [25686:25686:0212/012818.646354:WARNING:pref_notifier_impl.cc(23)] Pref observer found at shutdown. [ FAILED ] BrowsingDataRemoverBrowserTest.PRE_StorageRemovedFromDisk, where TypeParam = and GetParam() = (5630 ms) [585/601] BrowsingDataRemoverBrowserTest.PRE_StorageRemovedFromDisk (7086 ms) [586/601] DisplayPrefsBrowserTest.DisplayRotation (6033 ms) [587/601] ExistingUserControllerPublicSessionTest.TestLoadingPublicUsersFromLocalState (4722 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ActiveDirectoryLoginAutocompleteTest.LoginSuccess --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsIDw3vv/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dMTml3F ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ActiveDirectoryLoginAutocompleteTest.TestAutocomplete --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultswHYFit/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dBH8eRK ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=LoginUITest.LoginNoExceptions --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/results7pYRWF/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dq8SLon ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ResetFirstAfterBootTest.ShowAfterBootIfRequested --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsjIECOK/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/d1zrfes [588/601] ActiveDirectoryLoginAutocompleteTest.LoginSuccess (24392 ms) [589/601] ActiveDirectoryLoginAutocompleteTest.TestAutocomplete (23868 ms) [590/601] LoginUITest.LoginNoExceptions (22565 ms) [591/601] ResetFirstAfterBootTest.ShowAfterBootIfRequested (24396 ms) [592/601] ChromeOriginTrialsDisabledFeaturesTest.DisabledFeaturesSetOnCommandLine/0 (6039 ms) [593/601] CookieSettingsTest.BlockCookies/1 (5526 ms) [594/601] UserAddingScreenTest.CancelAdding (24130 ms) [595/601] OnDiskAppWithIncognitoProfile/NetworkContextConfigurationBrowserTest.DiskCache/0 (7869 ms) [596/601] PreferencesTestForceWebUiLogin.MultiProfiles (27559 ms) [597/601] IncognitoProfileMainNetworkContext/NetworkContextConfigurationBrowserTest.ThirdPartyCookiesBlocked/0 (7895 ms) [598/601] PolicyDisplayRotationDefault/DisplayRotationBootTest.Reboot/2 (6831 ms) [599/601] ManagedWithPermission/ManagedWithPermissionPlatformKeysTest.PolicyGrantsAccessToCorporateKey/1 (13116 ms) [600/601] Blub/UnaffiliatedArcAllowedTest.ProfileTest/0 (7874 ms) [ RUN ] ForceMaximizeOnFirstRunTest.TwoRuns sending server_data: {"host": "127.0.0.1", "port": 38312} (36 bytes) HTTPS server started on 127.0.0.1:45150... sending server_data: {"host": "127.0.0.1", "port": 45150} (36 bytes) [1:1:0212/012849.906185:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [26654:26654:0212/012850.336560:ERROR:child_process_security_policy_impl.cc(1395)] Ignoring port number in isolated origin: https://accounts.google.com:45150 [26654:26654:0212/012852.188819:WARNING:CONSOLE(0)] "HTML Imports is deprecated and will be removed in M73, around March 2019. Please use ES modules instead. See https://www.chromestatus.com/features/5144752345317376 for more details.", source: (0) [26654:26654:0212/012853.106797:WARNING:CONSOLE(442)] "document.registerElement is deprecated and will be removed in M73, around March 2019. Please use window.customElements.define instead. See https://www.chromestatus.com/features/4642138092470272 for more details.", source: chrome://resources/polymer/v1_0/polymer/polymer-micro-extracted.js (442) [26654:26654:0212/012857.310355:WARNING:CONSOLE(2083)] "Element.createShadowRoot is deprecated and will be removed in M73, around March 2019. Please use Element.attachShadow instead. See https://www.chromestatus.com/features/4507242028072960 for more details.", source: chrome://resources/polymer/v1_0/polymer/polymer-mini-extracted.js (2083) [26654:26654:0212/012901.953676:WARNING:CONSOLE(2651)] "Could not find style data in module named", source: chrome://resources/polymer/v1_0/polymer/polymer-extracted.js (2651) [26654:26654:0212/012902.027035:WARNING:CONSOLE(2651)] "Could not find style data in module named", source: chrome://resources/polymer/v1_0/polymer/polymer-extracted.js (2651) [26654:26654:0212/012902.676418:WARNING:CONSOLE(2651)] "Could not find style data in module named", source: chrome://resources/polymer/v1_0/polymer/polymer-extracted.js (2651) ALSA lib confmisc.c:768:(parse_card) cannot find card '0' ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default [26654:26800:0212/012903.867877:ERROR:alsa_util.cc(204)] PcmOpen: default,No such file or directory ALSA lib confmisc.c:768:(parse_card) cannot find card '0' ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default [26654:26800:0212/012903.868653:ERROR:alsa_util.cc(204)] PcmOpen: plug:default,No such file or directory [26654:26800:0212/012903.869013:ERROR:audio_output_resampler.cc(384)] Unable to open audio device in high latency mode. Falling back to fake audio output. [26654:26654:0212/012905.217778:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: resource_coordinator.mojom.FrameCoordinationUnit [26654:26654:0212/012906.365771:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: content.mojom.RendererAudioOutputStreamFactory [26654:26654:0212/012906.366499:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: resource_coordinator.mojom.FrameCoordinationUnit [26654:26654:0212/012906.632758:INFO:CONSOLE(9236)] "Loading asset bundle oauth-enrollment", source: chrome://oobe/login.js (9236) [26654:26654:0212/012907.178689:INFO:signin_screen_handler.cc(1356)] Login WebUI >> active: 1, source: account-picker [26654:26654:0212/012907.723918:ERROR:proximity_auth_local_state_pref_manager.cc(159)] Failed to find prefs for current user. [26654:26654:0212/012907.724016:ERROR:proximity_auth_local_state_pref_manager.cc(80)] Failed to get easyunlock_allowed. [26654:26654:0212/012907.724102:ERROR:proximity_auth_local_state_pref_manager.cc(159)] Failed to find prefs for current user. [26654:26654:0212/012907.724207:ERROR:proximity_auth_local_state_pref_manager.cc(159)] Failed to find prefs for current user. [26654:26654:0212/012907.724268:ERROR:proximity_auth_local_state_pref_manager.cc(92)] Failed to get easyunlock_enabled. [26654:26654:0212/012907.783368:WARNING:chrome_browsing_data_remover_delegate.cc(1024)] Failed to find user for current profile. [26654:26654:0212/012907.815580:INFO:lock_screen_utils.cc(56)] GetUserLastInputMethod: no input method for this user [26654:26654:0212/012908.314977:INFO:signin_screen_handler.cc(1356)] Login WebUI >> active: 0, source: account-picker [26654:26654:0212/012908.315885:INFO:signin_screen_handler.cc(1356)] Login WebUI >> active: 1, source: gaia-signin [26654:26654:0212/012908.354121:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: content.mojom.RendererAudioOutputStreamFactory [26654:26654:0212/012908.356664:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: resource_coordinator.mojom.FrameCoordinationUnit [26654:26654:0212/012908.563752:ERROR:CONSOLE(219)] "Unexpected condition on chrome://oobe/login: Could not find value for languageList", source: chrome://resources/js/load_time_data.js (219) [26654:26892:0212/012908.764128:WARNING:fake_gaia.cc(288)] Serving request /embedded/setup/v2/chromeos 127.0.0.1 - - [12/Feb/2019 01:29:08] "GET /embedded/setup/v2/chromeos?chrometype=chromedevice&client_id=dummytoken&client_version=74.0.3704.0&platform_version=0.0.0.0&endpoint_gen=1.0&mi=ee%2C&is_first_user=true&hl=en-US HTTP/1.1" 200 - [26654:26654:0212/012908.876516:WARNING:CONSOLE(2651)] "Could not find style data in module named", source: chrome://resources/polymer/v1_0/polymer/polymer-extracted.js (2651) [26654:26654:0212/012909.836854:INFO:CONSOLE(9220)] "Finished loading asset bundle oauth-enrollment", source: chrome://oobe/login.js (9220) [26654:26654:0212/012910.058429:WARNING:CONSOLE(293)] "<webview>: The load has aborted with error -102: ERR_CONNECTION_REFUSED.", source: extensions::webViewEvents (293) [26654:26892:0212/012910.348399:ERROR:fake_gaia.cc(291)] Unhandled request /favicon.ico [26654:26892:0212/012910.348908:WARNING:embedded_test_server.cc(237)] Request not handled. Returning 404: /favicon.ico 127.0.0.1 - - [12/Feb/2019 01:29:10] "GET /favicon.ico HTTP/1.1" 404 - [26654:26654:0212/012911.110076:WARNING:CONSOLE(16703)] "Unrecognized message from GAIA: clearOldAttempts", source: chrome://oobe/login.js (16703) [26654:26654:0212/012911.139748:WARNING:CONSOLE(16703)] "Unrecognized message from GAIA: clearOldAttempts", source: chrome://oobe/login.js (16703) [26654:26783:0212/012911.214080:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26783:0212/012911.245223:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26654:0212/012911.252174:WARNING:CONSOLE(16703)] "Unrecognized message from GAIA: clearOldAttempts", source: chrome://oobe/login.js (16703) [26654:26654:0212/012911.253186:WARNING:CONSOLE(16703)] "Unrecognized message from GAIA: clearOldAttempts", source: chrome://oobe/login.js (16703) [26654:26892:0212/012911.270529:WARNING:fake_gaia.cc(288)] Serving request /_/embedded/signin/challenge 127.0.0.1 - - [12/Feb/2019 01:29:11] "POST /_/embedded/signin/challenge HTTP/1.1" 200 - [26654:26783:0212/012911.390576:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26783:0212/012911.412374:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26654:0212/012911.414345:WARNING:gaia_auth_fetcher.cc(882)] Could not reach Google Accounts servers: errno -107 [26654:26783:0212/012914.446328:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26783:0212/012914.482056:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26654:0212/012914.494219:WARNING:gaia_auth_fetcher.cc(882)] Could not reach Google Accounts servers: errno -107 [26654:26783:0212/012917.527550:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26783:0212/012917.560030:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26654:0212/012917.562047:WARNING:gaia_auth_fetcher.cc(882)] Could not reach Google Accounts servers: errno -107 [26654:26783:0212/012920.589301:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26783:0212/012920.609135:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26654:0212/012920.611250:WARNING:gaia_auth_fetcher.cc(882)] Could not reach Google Accounts servers: errno -107 [26654:26783:0212/012923.633821:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26783:0212/012923.651901:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26654:0212/012923.658210:WARNING:gaia_auth_fetcher.cc(882)] Could not reach Google Accounts servers: errno -107 [26654:26783:0212/012926.683907:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26783:0212/012926.702395:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26654:0212/012926.704239:WARNING:gaia_auth_fetcher.cc(882)] Could not reach Google Accounts servers: errno -107 [26654:26654:0212/012926.704328:ERROR:oauth2_token_fetcher.cc(84)] Unrecoverable error or retry count max reached. State: 3, network error: -107, message: [26654:26654:0212/012926.704371:WARNING:oauth2_token_initializer.cc(54)] OAuth2TokenInitializer - OAuth2 token fetch failed [26654:26654:0212/012926.704410:ERROR:existing_user_controller.cc(1753)] OAuth2 token fetch failed. [26654:26654:0212/012926.704743:ERROR:core_oobe_handler.cc(239)] CoreOobeHandler::ShowSignInError: error_text=Sorry, your password could not be verified. Please try again. Hit Control-Shift-Space to switch keyboard layout. [26654:26654:0212/012926.723375:WARNING:chrome_browsing_data_remover_delegate.cc(1024)] Failed to find user for current profile. [26654:26654:0212/012926.751759:INFO:lock_screen_utils.cc(56)] GetUserLastInputMethod: no input method for this user [26654:26654:0212/012926.768969:INFO:lock_screen_utils.cc(56)] GetUserLastInputMethod: no input method for this user [26654:26654:0212/012926.789869:INFO:signin_screen_handler.cc(1356)] Login WebUI >> active: 0, source: gaia-signin [26654:26654:0212/012926.790451:INFO:signin_screen_handler.cc(1356)] Login WebUI >> active: 1, source: gaia-signin [26654:26654:0212/012926.807875:INFO:signin_screen_handler.cc(1356)] Login WebUI >> active: 0, source: gaia-signin [26654:26654:0212/012926.810242:INFO:signin_screen_handler.cc(1356)] Login WebUI >> active: 1, source: gaia-signin [26654:26654:0212/012926.979978:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: content.mojom.RendererAudioOutputStreamFactory [26654:26654:0212/012926.989469:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: resource_coordinator.mojom.FrameCoordinationUnit [26654:26783:0212/012927.317420:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26654:0212/012927.320896:ERROR:CONSOLE(219)] "Unexpected condition on chrome://oobe/login: Could not find value for languageList", source: chrome://resources/js/load_time_data.js (219) [26654:26654:0212/012927.332458:ERROR:CONSOLE(219)] "Unexpected condition on chrome://oobe/login: Could not find value for languageList", source: chrome://resources/js/load_time_data.js (219) [26654:26783:0212/012927.345213:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26654:0212/012927.630293:WARNING:CONSOLE(293)] "<webview>: The load has aborted with error -3: ERR_ABORTED.", source: extensions::webViewEvents (293) [26654:26654:0212/012927.755633:WARNING:CONSOLE(293)] "<webview>: The load has aborted with error -102: ERR_CONNECTION_REFUSED.", source: extensions::webViewEvents (293) [26654:26654:0212/012927.941646:ERROR:gaia_screen_handler.cc(684)] Gaia webview error: ERR_SSL_PROTOCOL_ERROR [26654:26654:0212/012927.941748:WARNING:signin_screen_handler.cc(737)] Retry frame load due to reason: frame error [26654:26654:0212/012927.942383:WARNING:error_screen.cc(202)] Network error screen message is shown [26654:26654:0212/012927.972573:WARNING:CONSOLE(293)] "<webview>: The load has aborted with error -107: ERR_SSL_PROTOCOL_ERROR.", source: extensions::webViewEvents (293) [26654:26654:0212/012928.058176:INFO:signin_screen_handler.cc(1356)] Login WebUI >> active: 0, source: gaia-signin [26654:26654:0212/012928.251064:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: content.mojom.RendererAudioOutputStreamFactory [26654:26654:0212/012928.253626:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: resource_coordinator.mojom.FrameCoordinationUnit [26654:26654:0212/012928.435499:ERROR:tab_manager_delegate_chromeos.cc(416)] Failed to set oom_score_adj to 300 for focused tab, pid: 27704 [26654:26783:0212/012928.663932:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26783:0212/012928.684716:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26654:0212/012929.386104:WARNING:error_screen.cc(212)] Network error screen message is hidden [26654:26654:0212/012929.459609:INFO:signin_screen_handler.cc(1356)] Login WebUI >> active: 1, source: gaia-signin [26654:26654:0212/012929.718861:ERROR:gaia_screen_handler.cc(684)] Gaia webview error: ERR_SSL_PROTOCOL_ERROR [26654:26654:0212/012929.718945:WARNING:signin_screen_handler.cc(737)] Retry frame load due to reason: frame error [26654:26654:0212/012929.719118:WARNING:error_screen.cc(202)] Network error screen message is shown [26654:26654:0212/012929.723876:WARNING:CONSOLE(293)] "<webview>: The load has aborted with error -107: ERR_SSL_PROTOCOL_ERROR.", source: extensions::webViewEvents (293) [26654:26654:0212/012929.890021:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: content.mojom.RendererAudioOutputStreamFactory [26654:26654:0212/012929.890897:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: resource_coordinator.mojom.FrameCoordinationUnit [26654:26654:0212/012930.203508:ERROR:tab_manager_delegate_chromeos.cc(416)] Failed to set oom_score_adj to 300 for focused tab, pid: 27719 [26654:26783:0212/012930.222367:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26783:0212/012930.242573:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [26654:26654:0212/012930.258158:ERROR:CONSOLE(219)] "Unexpected condition on chrome://oobe/login: Could not find value for languageList", source: chrome://resources/js/load_time_data.js (219) [26654:26654:0212/012930.274188:INFO:signin_screen_handler.cc(1356)] Login WebUI >> active: 0, source: gaia-signin [26654:26654:0212/012930.445022:WARNING:error_screen.cc(212)] Network error screen message is hidden [26654:26654:0212/012930.603906:WARNING:CONSOLE(293)] "<webview>: The load has aborted with error -102: ERR_CONNECTION_REFUSED.", source: extensions::webViewEvents (293) [26654:26654:0212/012930.644585:INFO:signin_screen_handler.cc(1356)] Login WebUI >> active: 1, source: gaia-signin [26654:26654:0212/012930.859055:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: resource_coordinator.mojom.FrameCoordinationUnit [26654:26654:0212/012931.098556:WARNING:CONSOLE(293)] "<webview>: The load has aborted with error -107: ERR_SSL_PROTOCOL_ERROR.", source: extensions::webViewEvents (293) [26654:26783:0212/012931.122616:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 BrowserTestBase received signal: Terminated. Backtrace: #0 0x7fac5bf9c901 base::debug::CollectStackTrace() #1 0x7fac5be04c1d base::debug::StackTrace::StackTrace() #2 0x7fac5be04bd5 base::debug::StackTrace::StackTrace() #3 0x5575bbad081d [26654:26783:0212/012931.141836:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 content::(anonymous namespace)::DumpStackTraceSignalHandler() #4 0x7fac34719cb0 <unknown> #5 0x7fac347e16d3 epoll_wait #6 0x7fac5c02506f epoll_dispatch #7 0x7fac5c0187f5 event_base_loop #8 0x7fac5bfd10af base::MessagePumpLibevent::Run() #9 0x7fac5bf0102c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #10 0x7fac5bea59d7 base::RunLoop::Run() #11 0x5575bbb1e24e content::WindowedNotificationObserver::Wait() #12 0x5575b8251067 policy::LoginPolicyTestBase::LogIn() #13 0x5575b824f678 policy::ForceMaximizeOnFirstRunTest_TwoRuns_Test::RunTestOnMainThread() #14 0x5575bbacfe13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #15 0x5575b6cb469d base::internal::FunctorTraits<>::Invoke<>() #16 0x5575b6cb45e1 base::internal::InvokeHelper<>::MakeItSo<>() #17 0x5575b6cb4587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #18 0x5575b6e8083c base::internal::Invoker<>::Run() #19 0x5575b6ca7f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #20 0x5575bb21cd9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #21 0x5575bb21bb52 ChromeBrowserMainParts::PreMainMessageLoopRun() #22 0x5575b89fe4dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #23 0x7fac5461a807 content::BrowserMainLoop::PreMainMessageLoopRun() #24 0x7fac539f661d base::internal::FunctorTraits<>::Invoke<>() #25 0x7fac539f6591 base::internal::InvokeHelper<>::MakeItSo<>() #26 0x7fac539f6537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #27 0x7fac543c211c base::internal::Invoker<>::Run() #28 0x7fac5396ad5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #29 0x7fac54e2dacc content::StartupTaskRunner::RunAllTasksNow() #30 0x7fac54618fc1 content::BrowserMainLoop::CreateStartupTasks() #31 0x7fac5461fece content::BrowserMainRunnerImpl::Initialize() #32 0x7fac54616361 content::BrowserMain() #33 0x7fac5597dd2b content::RunBrowserProcessMain() #34 0x7fac5597efe6 content::ContentMainRunnerImpl::RunServiceManager() #35 0x7fac5597eaa0 content::ContentMainRunnerImpl::Run() #36 0x7fac5597c589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #37 0x7fac3323f703 service_manager::Main() #38 0x7fac5597d835 content::ContentMain() #39 0x5575bbacfa19 content::BrowserTestBase::SetUp() #40 0x5575bb17af4e InProcessBrowserTest::SetUp() #41 0x5575bb111dfb extensions::ExtensionBrowserTest::SetUp() #42 0x5575b8190db4 chromeos::OobeBaseTest::SetUp() #43 0x5575b825097a policy::LoginPolicyTestBase::SetUp() #44 0x5575b8f5963e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #45 0x5575b8f55302 testing::internal::HandleExceptionsInMethodIfSupported<>() #46 0x5575b8f48b94 testing::Test::Run() #47 0x5575b8f49282 testing::TestInfo::Run() #48 0x5575b8f49793 testing::TestSuite::Run() #49 0x5575b8f51274 testing::internal::UnitTestImpl::RunAllTests() #50 0x5575b8f596ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #51 0x5575b8f56152 testing::internal::HandleExceptionsInMethodIfSupported<>() #52 0x5575b8f50f97 testing::UnitTest::Run() #53 0x5575bb19ad01 RUN_ALL_TESTS() #54 0x5575bb199562 base::TestSuite::Run() #55 0x5575bb0fdb57 ChromeTestSuiteRunner::RunTestSuite() #56 0x5575bb0fdc43 ChromeTestLauncherDelegate::RunTestSuite() #57 0x5575bbb15005 content::LaunchTests() #58 0x5575bb0fdf87 LaunchChromeTests() #59 0x5575bb0fd9ab main #60 0x7fac34704f45 __libc_start_main #61 0x5575b6c5602a _start [601/601] ForceMaximizeOnFirstRunTest.TwoRuns (TIMED OUT) Retrying 13 tests (retry #1) [602/614] BrowsingDataRemoverBrowserTest.PRE_PRE_StorageRemovedFromDisk (5244 ms) [603/614] BrowsingDataRemoverBrowserTest.PRE_StorageRemovedFromDisk (5244 ms) [604/614] BrowsingDataRemoverBrowserTest.StorageRemovedFromDisk (5506 ms) [605/614] ChromeVoxBackgroundTest.ListName (11538 ms) [606/614] ExtensionEchoPrivateApiTest.GetUserConsent_InactiveTab (5244 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ForceMaximizeOnFirstRunTest.PRE_TwoRuns --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/resultsbs43rF/test_results.xml --test-launcher-summary-output=/b/s/w/ioc04886/output.json --user-data-dir=/b/s/w/ityTk4ht/.org.chromium.Chromium.mTZPRS/dhsmmmg [607/614] ForceMaximizeOnFirstRunTest.PRE_TwoRuns (26749 ms) [608/614] OutOfProcessPPAPITest.TCPSocket_ListenHangs (6565 ms) [609/614] PPAPINaClNewlibTest.InputEvent (6293 ms) [610/614] PluginPowerSaverBrowserTest.BlockTinyPlugins (5768 ms) [611/614] ForceMaximizeOnFirstRunTest.TwoRuns (23878 ms) [612/614] PrerenderBrowserTest.AutosigninInPrerenderer (6032 ms) [613/614] SRC_ExternalClearKey/EncryptedMediaTest.ConfigChangeVideo_EncryptedToEncrypted/0 (4981 ms) [614/614] SSLUITest.TestGoodFrameNavigation/1 (6555 ms) SUCCESS: all tests passed. 42f9c39ca2f4a510: exit 0 3 files remaining... Additional test environment: CHROME_DEVEL_SANDBOX=/opt/chromium/chrome_sandbox CHROME_HEADLESS=1 LANG=en_US.UTF-8 Command: ./browser_tests --test-launcher-bot-mode --cfi-diag=0 --disable-features=SingleProcessMash --override-use-software-gl-for-tests --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json IMPORTANT DEBUGGING NOTE: each test is run inside its own process. For debugging a test inside a debugger, use the --gtest_filter=<your_test_name> flag along with either --single_process (to run the test in one launcher/browser process) or --single-process (to do the above, and also run Chrome in single-process mode). Using sharding settings from environment. This is shard 2/20 Using 4 parallel jobs. Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=PlatformAppBrowserTest.CreateAndCloseAppWindow --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsmSN2SL/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dpEHSc0 ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=PlatformAppBrowserTest.MutationEventsDisabled --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsKhWzfj/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/d69oizx ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=WebViewTest.AudioMutesWhileAttached --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsYWAm0n/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dn28ojC ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=WebViewTest.Shim_TestChromeExtensionURL --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsKlFM7G/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dDiU0H9 [1/694] WebViewTest.AudioMutesWhileAttached (20336 ms) [2/694] WebViewTest.Shim_TestChromeExtensionURL (20332 ms) [3/694] PlatformAppBrowserTest.CreateAndCloseAppWindow (22558 ms) [4/694] PlatformAppBrowserTest.MutationEventsDisabled (25199 ms) [5/694] WebViewTest.Shim_TestAddContentScript (11356 ms) [6/694] WebViewTest.Shim_TestDisplayBlock (11616 ms) [7/694] WebViewTest.Shim_TestAddContentScriptWithSameNameShouldOverwriteTheExistingOne (10232 ms) [8/694] WebViewTest.Shim_TestAddContentScriptToOneWebViewShouldNotInjectToTheOtherWebView (8663 ms) [9/694] WebViewTest.Shim_TestExecuteScriptFail (8140 ms) [10/694] WebViewTest.Shim_TestWebRequestAPIWithHeaders (8133 ms) [11/694] WebViewTest.Shim_TestTerminateAfterExit (9199 ms) [12/694] WebViewTest.Shim_TestLoadAbortChromeExtensionURLWrongPartition (8131 ms) [13/694] WebViewTest.ContextMenuInspectElement (8679 ms) [14/694] WebViewTest.FileSystemAPIRequestFromSharedWorkerOfSingleWebViewGuestDefaultAllow (8665 ms) [15/694] WebViewTest.FileSystemAPIRequestFromWorkerAllow (8927 ms) [16/694] WebViewTest.WebViewInBackgroundPage (8655 ms) [17/694] WebViewDPITest.Shim_TestAutosizeHeight (8930 ms) [18/694] WebViewNewWindowTest.Shim_TestAddContentScriptsWithNewWindowAPI (8919 ms) [19/694] WebViewNewWindowTest.Shim_TestNewWindowNoReferrerLink (8921 ms) [20/694] AppEventPageTest.OnSuspendNoApiUse (9443 ms) [21/694] AutofillMetricsBrowserTest.CorrectSourceForUnownedCreditCardCheckout (6581 ms) [22/694] ContentAutofillDriverBrowserTest.SwitchTabAndHideAutofillPopup (6822 ms) [23/694] BackgroundFetchBrowserTest.OfflineItemCollection_VerifyIconReceived (7083 ms) [24/694] BackgroundFetchBrowserTest.OfflineItemCollection_IncognitoPropagated (8654 ms) [25/694] HistoryCounterTest.PrefChanged (6567 ms) [26/694] AppBannerManagerDesktopBrowserTest.WebAppBannerResolvesUserChoice (8401 ms) [27/694] AppBannerManagerBrowserTest.WebAppBannerNotSeenAfterShowing (9986 ms) [28/694] SyncAwareCounterTest.PasswordCounter (7883 ms) [29/694] SyncAwareCounterTest.HistoryCounter (7894 ms) [30/694] NavigationEntryRemoverTest.DeleteIndividual (7084 ms) [31/694] NavigationEntryRemoverTest.DeleteRestricted (7084 ms) [32/694] SitePerProcessMemoryThresholdBrowserTest.SitePerProcessDisabled_LowThreshold (6038 ms) [33/694] OpenWindowFromNTPBrowserTest.TransferFromNTPCreateNewTab (7876 ms) [34/694] ChromeNavigationBrowserTest.WindowOpenBlockedAfterClickNavigation (7346 ms) [35/694] ChromeMainTest.ReuseBrowserInstanceWhenOpeningFile (9182 ms) [36/694] ChromeFindRequestManagerTest.FindInPDF (11026 ms) [37/694] ChromeNavigationBrowserTest.NoUserActivationSetSkipOnBackForward (7088 ms) [38/694] ChromeNavigationPortMappedBrowserTest.ContextMenuNavigationToInvalidUrl (7346 ms) [39/694] CtrlClickShouldEndUpInNewProcessTest.SubframeTarget (8657 ms) [40/694] ChromeSitePerProcessPDFTest.ResendGestureToEmbedderOOPIF (7611 ms) [41/694] ClientHintsBrowserTest.ClientHintsLifetimeFollowedByNoClientHintHttpLocal/0 (7350 ms) [42/694] PatchTest.CheckBsdiffOperation (6829 ms) [43/694] ContentSettingsStrictSecureCookiesBrowserTest.Cookies (7359 ms) [44/694] PageLoadCappingBrowserTest.NavigationDataRemovedFromBlacklist (7609 ms) [45/694] PageLoadCappingBrowserTestDismissAfterNetworkUse.TestInfoBarDismiss (6301 ms) [46/694] AndroidUsbCountTest.TestNoMultipleCallsRemoveAddOnStart (6321 ms) [0212/010644.795744:ERROR:kill_posix.cc(84)] Unable to terminate process group 11360: No such process (3) [ RUN ] DevToolsReattachAfterCrashTest.TestReattachAfterCrashOnNetwork [1:1:0212/010640.866112:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [11360:11360:0212/010641.241709:WARNING:chrome_browser_main_chromeos.cc(557)] Running as stub user with profile dir: test-user [11360:11360:0212/010641.936050:INFO:remote_commands_service.cc(38)] Fetching remote commands. [11360:11360:0212/010641.936273:WARNING:remote_commands_service.cc(40)] Client is not registered. [11360:11360:0212/010641.936500:INFO:remote_commands_invalidator.cc(32)] Initialize RemoteCommandsInvalidator. [11360:11360:0212/010641.936636:INFO:remote_commands_invalidator.cc(57)] Starting RemoteCommandsInvalidator. [11360:11360:0212/010641.936760:INFO:remote_commands_invalidator.cc(123)] RemoteCommandsInvalidator ReloadPolicyData. [11360:11360:0212/010641.936851:INFO:remote_commands_invalidator.cc(167)] Unregister RemoteCommandsInvalidator. [11360:11360:0212/010642.194895:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [11360:11360:0212/010643.452179:FATAL:shelf_widget.cc(293)] Check failed: login_shelf_view_->visible(). #0 0x7f50a1289901 base::debug::CollectStackTrace() #1 0x7f50a10f1c1d base::debug::StackTrace::StackTrace() #2 0x7f50a10f1bd5 base::debug::StackTrace::StackTrace() #3 0x7f50a112c827 logging::LogMessage::~LogMessage() #4 0x7f508c35cf47 ash::ShelfWidget::GetHitTestRects() #5 0x7f508c35ef11 ash::ShelfWindowTargeter::GetHitTestRects() #6 0x7f5093f0f3ae aura::WindowTargeter::EventLocationInsideBounds() #7 0x7f508addc7d0 wm::EasyResizeWindowTargeter::EventLocationInsideBounds() #8 0x7f5093f0de04 aura::WindowTargeter::SubtreeShouldBeExploredForEvent() #9 0x7f5093f0f046 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #10 0x7f5093f0eef3 aura::WindowTargeter::FindTargetForLocatedEvent() #11 0x7f508c31522b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #12 0x7f5093f0ec8a aura::WindowTargeter::FindTargetForNonKeyEvent() #13 0x7f5093f0eaa1 aura::WindowTargeter::FindTargetForEvent() #14 0x7f5093f0f096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #15 0x7f5093f0eef3 aura::WindowTargeter::FindTargetForLocatedEvent() #16 0x7f508c31522b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #17 0x7f5093f0ec8a aura::WindowTargeter::FindTargetForNonKeyEvent() #18 0x7f5093f0eaa1 aura::WindowTargeter::FindTargetForEvent() #19 0x7f5093f0f096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #20 0x7f5093f0eef3 aura::WindowTargeter::FindTargetForLocatedEvent() #21 0x7f508c31522b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #22 0x7f5093f0ec8a aura::WindowTargeter::FindTargetForNonKeyEvent() #23 0x7f5093f0eaa1 aura::WindowTargeter::FindTargetForEvent() #24 0x7f5096134c0c ui::EventProcessor::OnEventFromSource() #25 0x7f5096134fac ui::EventProcessor::OnEventFromSource() #26 0x7f508a949a1f ws::EventQueue::DeliverOrQueueEvent() #27 0x7f508c2892b8 ash::AshWindowTreeHostPlatform::DeliverEventToSink() #28 0x7f508c28935c ash::AshWindowTreeHostPlatform::DeliverEventToSink() #29 0x7f50961359f8 ui::EventSource::SendEventToSinkFromRewriter() #30 0x7f5096135591 ui::EventSource::SendEventToSink() #31 0x7f5093f1501d aura::WindowTreeHostPlatform::DispatchEvent() #32 0x7f508c289191 ash::AshWindowTreeHostPlatform::DispatchEvent() #33 0x7f508b762f55 base::internal::FunctorTraits<>::Invoke<>() #34 0x7f508b762eb6 base::internal::InvokeHelper<>::MakeItSo<>() #35 0x7f508b762e47 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui22PlatformWindowDelegateEFvPNS3_5EventEEJNS0_17UnretainedWrapperIS4_EEEEEFvS6_EE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOS6_ #36 0x7f508b762de9 base::internal::Invoker<>::RunOnce() #37 0x7f5096141db3 _ZNO4base12OnceCallbackIFvPN2ui5EventEEE3RunES3_ #38 0x7f5096141be4 ui::DispatchEventFromNativeUiEvent() #39 0x7f508b7d94bc ui::X11WindowOzone::DispatchEvent() #40 0x7f509c20d887 ui::PlatformEventSource::DispatchEvent() #41 0x7f5074a0b4a9 ui::X11EventSourceLibevent::DispatchPlatformEvent() #42 0x7f5074a0b053 ui::X11EventSourceLibevent::ProcessXEvent() #43 0x7f50749fd8a5 ui::X11EventSource::ExtractCookieDataDispatchEvent() #44 0x7f50749fd82e ui::X11EventSource::DispatchXEvents() #45 0x7f5074a0b70f ui::X11EventSourceLibevent::OnFileCanReadWithoutBlocking() #46 0x7f50a12bccae base::MessagePumpLibevent::FdWatchController::OnFileCanReadWithoutBlocking() #47 0x7f50a12bddcd base::MessagePumpLibevent::OnLibeventNotification() #48 0x7f50a13061fe event_process_active #49 0x7f50a1305847 event_base_loop #50 0x7f50a12bdea4 base::MessagePumpLibevent::Run() #51 0x7f50a11ee02c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #52 0x7f50a11929d7 base::RunLoop::Run() #53 0x55d8c4434c8e content::RunThisRunLoop() #54 0x55d8c4434e33 content::RunAllPendingInMessageLoop() #55 0x55d8c3a94111 InProcessBrowserTest::PreRunTestOnMainThread() #56 0x55d8c43e7cde content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #57 0x55d8bf5cc69d base::internal::FunctorTraits<>::Invoke<>() #58 0x55d8bf5cc5e1 base::internal::InvokeHelper<>::MakeItSo<>() #59 0x55d8bf5cc587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #60 0x55d8bf79883c base::internal::Invoker<>::Run() #61 0x55d8bf5bff8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #62 0x55d8c3b34d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #63 0x55d8c3b33b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #64 0x55d8c13164dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #65 0x7f5099907807 content::BrowserMainLoop::PreMainMessageLoopRun() #66 0x7f5098ce361d base::internal::FunctorTraits<>::Invoke<>() #67 0x7f5098ce3591 base::internal::InvokeHelper<>::MakeItSo<>() #68 0x7f5098ce3537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #69 0x7f50996af11c base::internal::Invoker<>::Run() #70 0x7f5098c57d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #71 0x7f509a11aacc content::StartupTaskRunner::RunAllTasksNow() #72 0x7f5099905fc1 content::BrowserMainLoop::CreateStartupTasks() #73 0x7f509990cece content::BrowserMainRunnerImpl::Initialize() #74 0x7f5099903361 content::BrowserMain() #75 0x7f509ac6ad2b content::RunBrowserProcessMain() #76 0x7f509ac6bfe6 content::ContentMainRunnerImpl::RunServiceManager() #77 0x7f509ac6baa0 content::ContentMainRunnerImpl::Run() #78 0x7f509ac69589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #79 0x7f507852c703 service_manager::Main() #80 0x7f509ac6a835 content::ContentMain() #81 0x55d8c43e7a19 content::BrowserTestBase::SetUp() #82 0x55d8c3a92f4e InProcessBrowserTest::SetUp() #83 0x55d8c187163e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #84 0x55d8c186d302 testing::internal::HandleExceptionsInMethodIfSupported<>() #85 0x55d8c1860b94 testing::Test::Run() #86 0x55d8c1861282 testing::TestInfo::Run() #87 0x55d8c1861793 testing::TestSuite::Run() #88 0x55d8c1869274 testing::internal::UnitTestImpl::RunAllTests() #89 0x55d8c18716ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #90 0x55d8c186e152 testing::internal::HandleExceptionsInMethodIfSupported<>() #91 0x55d8c1868f97 testing::UnitTest::Run() #92 0x55d8c3ab2d01 RUN_ALL_TESTS() #93 0x55d8c3ab1562 base::TestSuite::Run() #94 0x55d8c3a15b57 ChromeTestSuiteRunner::RunTestSuite() #95 0x55d8c3a15c43 ChromeTestLauncherDelegate::RunTestSuite() #96 0x55d8c442d005 content::LaunchTests() #97 0x55d8c3a15f87 LaunchChromeTests() #98 0x55d8c3a159ab main #99 0x7f50799f1f45 __libc_start_main #100 0x55d8bf56e02a _start [47/694] DevToolsReattachAfterCrashTest.TestReattachAfterCrashOnNetwork (CRASHED) [48/694] DevToolsSanityTest.TestSettings (10237 ms) [49/694] DevToolsSanityTest.TestDispatchKeyEventShowsAutoFill (14694 ms) [50/694] DomDistillerViewerSourceBrowserTest.EarlyTemplateLoad (6560 ms) [51/694] WorkerDevToolsSanityTest.InspectSharedWorker (10771 ms) [52/694] DomainReliabilityBrowserTest.ServiceCreated (6298 ms) [53/694] DownloadTest.DownloadMimeType (6567 ms) [54/694] DownloadTest.CloseNewTab4 (6821 ms) [55/694] DownloadTest.CloseNewTab3 (7096 ms) [56/694] DownloadTest.DownloadErrorReadonlyFolder (7086 ms) [57/694] DownloadTest.AltClickDownloadReferrerPolicy (7086 ms) [58/694] SavePageBrowserTest.SaveCompleteHTML (6826 ms) [59/694] SavePageAsMHTMLBrowserTest.SavePageAsMHTML (7083 ms) [60/694] GeolocationBrowserTest.NoPromptForAllowedOrigin (6834 ms) [61/694] GeolocationBrowserTest.InvalidUrlRequest (7084 ms) [62/694] DeprecatedProfileInvalidationProviderFactoryLoginScreenBrowserTest.NoInvalidationService (4472 ms) [63/694] InfoBarUiTest.InvokeUi_theme_installed (6568 ms) [64/694] InfoBarsTest.TestInfoBarsCloseOnNewTheme (9710 ms) [65/694] DeprecatedProfileInvalidationProviderFactoryGuestBrowserTest.NoInvalidationService (6831 ms) [66/694] BrowserCloseManagerBrowserTest.TestWithDangerousUrlDownload (7092 ms) [67/694] BrowserCloseManagerBrowserTest.TestHangInBeforeUnloadMultipleTabs (10492 ms) [68/694] ChromeResourceDispatcherHostDelegateMirrorBrowserTest.MirrorRequestHeader (8406 ms) [69/694] TestStatsDictionaryTest.StatsVerifyMembers (1586 ms) [70/694] EncryptedMediaSupportedTypesClearKeyTest.Video_WebM (7624 ms) [71/694] MediaStreamPermissionTest.TestDismissingRequest (9723 ms) [72/694] MetricsServiceBrowserTest.CloseRenderersNormally (10251 ms) [73/694] WebRtcBrowserTest.RunsAudioVideoWebRTCCallInTwoTabsH264 (19153 ms) [74/694] WebRtcBrowserTest.RunsAudioVideoWebRTCCallInTwoTabsOfferRsaAnswerRsa (21523 ms) [75/694] WebRtcBrowserTest.RunsAudioVideoWebRTCCallInTwoTabsGetStatsPromise (21255 ms) [76/694] StartupMetricsTest.ReportsValues (8683 ms) [77/694] DnsProbeBrowserTest.NxdomainProbeResultWithWorkingSlowCorrections (8676 ms) [78/694] DnsProbeBrowserTest.NoInternetProbeResultWithBrokenCorrections (7884 ms) [79/694] DnsProbeBrowserTest.ProbesDisabled (7608 ms) [80/694] ErrorPageNavigationCorrectionsFailTest.FetchCorrectionsFails (7353 ms) [81/694] LoadTimingBrowserTest.HTTPS (8419 ms) [82/694] NTPTilesTest.NavigateAfterSettingObserver (6838 ms) [83/694] AdsPageLoadMetricsObserverBrowserTest.DisplayNoneAdframeRecorded (8139 ms) [84/694] AdsPageLoadMetricsObserverBrowserTest.FrameWithSmallAreaNotConsideredVisible (8138 ms) [85/694] AdsPageLoadMetricsObserverResourceBrowserTest.ReceivedAdResourceMetrics (7613 ms) [86/694] MultiTabLoadingPageLoadMetricsBrowserTest.SingleTab (6571 ms) [87/694] SecurityStatePageLoadMetricsBrowserTest.Navigate_Both_NonHtmlMainResource (6558 ms) [88/694] PageLoadMetricsBrowserTest.NonHtmlMainResource (6819 ms) [89/694] PageLoadMetricsBrowserTest.DocumentWriteBlock (8394 ms) [90/694] LiveTabCountPageLoadMetricsBrowserTest.LoadMultipleTabsInForeground (17842 ms) [91/694] PageLoadMetricsBrowserTest.DocumentWriteAsync (8400 ms) [92/694] PageLoadMetricsBrowserTest.UseCounterFeaturesInIframes (8655 ms) [93/694] PasswordManagerBrowserTest.NoPromptForPushStateWhenFormPersists (8394 ms) [94/694] PasswordManagerBrowserTest.NoLastLoadGoodLastLoad (8662 ms) [95/694] PasswordManagerBrowserTest.InFrameNavigationDoesNotClearPopupState (8668 ms) [96/694] PasswordManagerBrowserTest.PSLMatchedCrossSiteFillTest (7345 ms) [97/694] PasswordManagerBrowserTest.SkipZeroClickNotToggledAfterSuccessfulSubmissionWithAPI (7345 ms) [98/694] SessionRestorePageLoadMetricsBrowserTest.MultipleSessionRestores (17051 ms) [99/694] PasswordManagerDialogBrowserTest.InvokeUi_normal (7348 ms) [100/694] PermissionRequestManagerBrowserTest.RequestsBeforeAfterLoad (7088 ms) [101/694] PDFExtensionTest.EnsurePDFFromLocalFileLoads (11291 ms) [102/694] PDFExtensionClipboardTest.IndividualShiftRightArrowPresses (11550 ms) [103/694] PictureInPictureWindowControllerBrowserTest.TabIconUpdated (8141 ms) [104/694] PictureInPictureWindowControllerBrowserTest.FrameEnterLeaveClosesWindow (7621 ms) [105/694] CloudPolicyManagerTest.Register (6562 ms) [106/694] ControlPictureInPictureWindowControllerBrowserTest.PictureInPictureAddControlAndFireEvent (8134 ms) [107/694] PolicyTest.ExtensionRecommendedInstallationMode (7083 ms) [108/694] PolicyTest.ExtensionMinimumVersionRequired (7886 ms) [109/694] PolicyTest.IncognitoEnabled (7356 ms) [110/694] PolicyTest.FullscreenAllowedApp (8137 ms) [111/694] MediaRouterDisabledPolicyTest.MediaRouterDisabled (6828 ms) [112/694] PolicyTest.URLBlacklistIncognito (13653 ms) [113/694] AutoplayPolicyTest.AutoplayDeniedByPolicy (7890 ms) [114/694] QuicAllowedPolicyIsFalse.QuicDisallowedForSafeBrowsing (6582 ms) [115/694] SitePerProcessPolicyBrowserTestEnabled.Simple (6039 ms) [116/694] SyncedPrefChangeRegistrarTest.IgnoreLocalChangesToManagedPrefs (6298 ms) [117/694] PrerenderBrowserTest.PrerenderPageRemovingLinkWithTwoLinksRemovingOne (7345 ms) [118/694] LoadingPredictorBrowserTestWithProxy.PrepareForPageLoadWithPrediction (8666 ms) [119/694] PrerenderBrowserTest.PrerenderAlertAfterOnload (7619 ms) [120/694] PrerenderBrowserTest.PrerenderClientRedirectNavigateToFirst (7361 ms) [121/694] PrerenderBrowserTest.PrerenderServerRedirectNavigateToSecond (7348 ms) [122/694] PrerenderBrowserTest.PrerenderLocationReplaceNavigateToFirst (8137 ms) [123/694] PrerenderBrowserTest.PrerenderNoSSLReferrer (7347 ms) [124/694] PrerenderBrowserTest.PrerenderFragmentNavigateFragment (7614 ms) [125/694] NoStatePrefetchBrowserTest.PrefetchCookieCrossDomain (7358 ms) [126/694] PrerenderBrowserTest.FirstContentfulPaintTimingTimeout (8664 ms) [127/694] NoStatePrefetchBrowserTest.PrefetchHistograms (9178 ms) [128/694] NoStatePrefetchBrowserTest.SSLError (6560 ms) [129/694] PreviewsLitePageServerBrowserTest.LitePagePreviewsReportSavings (8131 ms) [130/694] PreviewsLitePageServerBrowserTest.LitePagePreviewsRedirect (9716 ms) [131/694] PushMessagingBrowserTest.SubscribeFailureNoManifest (7617 ms) [132/694] PushMessagingBrowserTest.LegacyPushEvent (7886 ms) [133/694] PushMessagingBrowserTest.DenyNotificationsPermissionUnsubscribes (7617 ms) [134/694] ReferrerPolicyTest.Redirect (7355 ms) [135/694] ReferrerPolicyTest.RequestTabletSite (7606 ms) [136/694] ContextMenuBrowserTest.OpenInNewTabReferrer (7082 ms) [137/694] SpellingMenuObserverTest.NoSpellingServiceWhenOffTheRecord (6566 ms) [138/694] ChromeRenderProcessHostBackgroundingTestWithAudio.ProcessPriorityAfterAudioStopsOnNotVisibleTab (7345 ms) [139/694] TabActivityWatcherUkmTest.AllWindowMetricsArePopulated (7347 ms) [140/694] TabManagerTest.UrgentFastShutdownSharedTabProcess (7082 ms) [141/694] TabManagerTest.TabFreezeAndMakeVisible (8935 ms) [142/694] PopupTrackerBrowserTest.ControlClick_HasTracker (7887 ms) [143/694] SessionRestoreTest.ShareProcessesOnRestore (9184 ms) [144/694] SafeBrowsingTriggeredPopupBlockerBrowserTest.AllowCreatingNewWindows_NoLogToConsole (7615 ms) [145/694] SpellcheckServiceBrowserTest.StartWithoutSpellcheck (6572 ms) [146/694] ChromeSSLHostStateDelegateTest.HasSeenRecurrentErrorsPref (6563 ms) [147/694] BrowserTestNonsecureURLRequest.DidChangeVisibleSecurityStateObserverObsoleteTLSSettings (6556 ms) [148/694] ExpectCTBrowserTest.TestDynamicExpectCTHeaderProcessing (6820 ms) [149/694] DurableStorageBrowserTest.QueryBookmarkedPage (6820 ms) [150/694] SubresourceFilterInterceptingBrowserTest.SafeBrowsingNotificationsCheckBest (7082 ms) [151/694] SubresourceFilterBrowserTest.ActivationDisabled_NoConsoleMessage (7342 ms) [152/694] SubresourceFilterBrowserTest.HistoryNavigationActivation (11021 ms) [153/694] ViewSourceTest.ViewSourceInMenuDisabledOnAMediaPage (7086 ms) [154/694] ViewSourceFeaturePolicyTest.ViewSourceNotAffectedByHeaderPolicy (7619 ms) [155/694] TabContentsTagTest.PostExistingTaskProviding (8131 ms) [156/694] TranslateManagerBrowserTest.PageTranslationSuccess (7870 ms) [157/694] TranslateManagerBrowserTest.HrefTranslateConflict (8398 ms) [158/694] BrowserTest.DisableOptionsAndImportMenuItemsConsistently (6568 ms) [159/694] BrowserTest.ClearPendingOnFailUnlessNTP (8658 ms) [160/694] BrowserTest.InterstitialClosesDialogs (7350 ms) [161/694] BrowserTest.DefaultMediaDevices (8133 ms) [162/694] BrowserNavigatorTest.Disposition_CurrentTab (7359 ms) [163/694] BrowserNavigatorTest.Disposition_Settings_UseNonIncognitoWindow (8398 ms) [164/694] CollectedCookiesTest.InvokeUi_default (7353 ms) [165/694] CollectedCookiesTest.DoubleDisplay (7616 ms) [166/694] FullscreenControllerTest.KeyboardLockDoesNotExitOnEscPressWhenEscIsLocked (7091 ms) [167/694] FindInPageControllerTest.NoIncognitoPrepopulate (9190 ms) [168/694] LoginPromptBrowserTest.TestBasicAuth (8402 ms) [169/694] LoginPromptBrowserTest.TestTwoAuths (8676 ms) [170/694] UpdateRecommendedDialogTest.InvokeUi_default (7089 ms) [171/694] UsbChooserBrowserTest.InvokeUi_NoDevicesModal (7355 ms) [172/694] BrowserNavigatorTest.NavigateFromNTPToOptionsSingleton (32023 ms) [173/694] LocalNTPTest.EmbeddedSearchAPIOnlyAvailableOnNTP (13384 ms) [174/694] NewTabUIProcessPerTabTest.NavBeforeNTPCommits (9983 ms) [175/694] PasswordManagerInternalsWebUIBrowserTest.LogSavePasswordProgress_MultipleTabsIdentical (8406 ms) [176/694] PasswordManagerInternalsWebUIBrowserTest.LogSavePasswordProgress_NavigateAway (7894 ms) [177/694] ZoomControllerBrowserTest.OnPreferenceChanged (6309 ms) [178/694] FormAutocompleteTest.InteractingInDifferentForms_FocusNoLongerOnForm (2113 ms) [179/694] UnloadTest.BrowserCloseBeforeUnloadOK (6567 ms) [180/694] FormAutocompleteTest.FormSubmittedByDOMMutationAfterXHR (2099 ms) [181/694] FormAutofillTest.WebFormControlElementToFormFieldMonthInput (1838 ms) [182/694] FormAutofillTest.WebFormElementToFormData_IdAttributes (2100 ms) [183/694] FormAutofillTest.ExtractMultipleForms (2102 ms) [184/694] PolicyToolUITest.CheckPolicyTypeIncorrectBooleanTypeValidation (18629 ms) [185/694] FormAutofillTest.LabelsInferredPriorToImgOrBr (2100 ms) [186/694] FormAutofillTest.ClearOnlyAutofilledFields (2100 ms) [187/694] PasswordAutofillAgentTest.DontAutocompletePasswordForNotReadonlyUsernameFieldEvenWhenPrefixMatched (1842 ms) [188/694] WebUIRequiringGestureBrowserTest.MessageRequiringGestureIgnoredIfNoGesture (17319 ms) [189/694] PasswordAutofillAgentTest.SendPasswordFormsTest_VisibleFormWithNoUsername (2101 ms) [190/694] PasswordAutofillAgentTest.NoCredentialsOnPasswordClick (2102 ms) [191/694] PasswordAutofillAgentTest.RememberChosenUsernamePassword (2103 ms) [192/694] PasswordAutofillAgentTest.AutocompleteWhenPageUrlIsChanged (1837 ms) [193/694] PasswordAutofillAgentTest.ManualFallbackForSaving (2101 ms) [194/694] TranslateHelperBrowserTest.MultipleSimilarTranslations (1838 ms) [195/694] WebUIResourceBrowserTest.CrReloadTest (7084 ms) [196/694] WebUIResourceBrowserTest.GridTest (7346 ms) [197/694] WebUIResourceBrowserTest.MenuTest (7355 ms) [198/694] MemoryTracingBrowserTest.TestBackgroundMemoryInfra (12852 ms) [199/694] OutOfProcessPPAPITest.TCPServerSocketPrivate_Backlog (8935 ms) [200/694] OutOfProcessPPAPITest.TCPSocket_BindClosePipe (8668 ms) [201/694] OutOfProcessPPAPITest.TCPSocket_BindHangs (8398 ms) [202/694] OutOfProcessPPAPITest.TCPSocket_AcceptedSocketReadError (7104 ms) [203/694] OutOfProcessPPAPITest.TCPSocketPrivate_SSLHandshakeHangs (8662 ms) [204/694] OutOfProcessPPAPITest.UDPSocket_BindDropPipe (8400 ms) [205/694] OutOfProcessPPAPITest.URLRequest_SetProperty (8398 ms) [206/694] PPAPINaClNewlibTest.Graphics2D_Humongous (9183 ms) [207/694] OutOfProcessPPAPITest.WebSocket2 (14709 ms) [208/694] PPAPINaClNewlibTest.Graphics2D_Replace (9446 ms) [209/694] PPAPINaClNewlibTest.TCPSocketPrivate_ReadWriteSSL (9450 ms) [210/694] PPAPINaClNewlibTest.TCPSocket_ConnectClosePipe (8658 ms) [211/694] PPAPINaClNewlibTest.TCPSocket_SetSendBufferSizeError (8921 ms) [212/694] PPAPINaClNewlibTest.TCPSocket_AcceptError (8660 ms) [213/694] PPAPINaClNewlibTest.TCPSocket_AcceptHangs (8655 ms) [214/694] PPAPINaClPNaClNonSfiTest.TCPSocketPrivate_ConnectAddress (8394 ms) [215/694] PPAPINaClNewlibTest.TCPServerSocketPrivate_ListenHangs (9197 ms) [216/694] PPAPINaClPNaClNonSfiTest.TCPSocket_SetSendBufferSizeClosePipe (8397 ms) [217/694] PPAPINaClNewlibTest.WebSocket2 (13638 ms) [218/694] PPAPINaClPNaClNonSfiTest.URLRequest_AppendDataToBody (8135 ms) [219/694] PPAPINaClGLibcTest.TCPSocket_ReadWrite (10504 ms) [220/694] PPAPINaClPNaClNonSfiTest.WebSocket2 (13119 ms) [221/694] PPAPINaClGLibcTest.TCPSocket_SetNoDelayClosePipe (9710 ms) [222/694] PPAPINaClGLibcTest.UDPSocket_SetBroadcastError (9981 ms) [223/694] PPAPINaClGLibcTest.AudioConfig (9981 ms) [224/694] PPAPIFileChooserTestWithSBService.FileChooser_SaveAs_DangerousExecutable_Disallowed (7099 ms) [225/694] PPAPIFileChooserTest.FileChooser_Open_Cancel (8921 ms) [226/694] NaClGdbDebugStubTest.Empty (8661 ms) [227/694] NaClBrowserTestNewlib.IrtException (7616 ms) [228/694] NaClBrowserTestGLibc.ExitStatusNeg2 (8656 ms) [229/694] NaClBrowserTestPnacl.ExitStatus0 (9182 ms) [230/694] AppsBrowserApiTest.OpenTab (8401 ms) [231/694] NaClBrowserTestPnacl.PnaclDyncodeSyscallDisabled (10496 ms) [232/694] MusicManagerPrivateTest.DeviceIdValueReturned (8141 ms) [233/694] ExtensionApiTest.FontSettings (7352 ms) [234/694] ExtensionApiTest.InputImeApiBasic (7368 ms) [235/694] ExtensionApiTest.ContentSecurityPolicy (7096 ms) [236/694] AutomationApiTest.GetTreeByTabId (7872 ms) [237/694] AutomationApiTest.TabsAutomationBooleanPermissions (8400 ms) [238/694] BluetoothLowEnergyApiTestChromeOs.CreateService_NotKioskSession (7878 ms) [239/694] ExtensionBrowsingDataTest.BrowsingDataRemovalInputFromSettings (6559 ms) [240/694] ExtensionBrowsingDataTest.SettingsFunctionEmpty (6565 ms) [241/694] AutomationApiTest.DesktopHitTest (9714 ms) [242/694] CastStreamingApiTest.Basics (7094 ms) [243/694] CastStreamingApiTest.DestinationNotSet (7089 ms) [244/694] CommandServiceTest.GetExtensionActionCommandQuerySuggested (7607 ms) [245/694] DeclarativeApiTest.NoTracesAfterUninstalling (8920 ms) [246/694] DownloadExtensionTest.DownloadExtensionTest_PauseResumeCancelErase (7354 ms) [247/694] DeclarativeContentApiTest.NotBookmarkedRulesEvaluatedOnBookmarkEvents (9448 ms) [248/694] DeclarativeContentApiTest.UninstallWhileActivePageAction (10237 ms) [249/694] DownloadExtensionTest.DownloadExtensionTest_Download_File (7871 ms) [250/694] DownloadExtensionTest.DownloadExtensionTest_OnDeterminingFilename_IllegalFilenameExtension (8138 ms) [251/694] DownloadExtensionTest.DownloadExtensionTest_AcceptDanger (8142 ms) [252/694] NavigatingExtensionPopupBrowserTest.Webpage (8662 ms) [253/694] FileSystemApiTest.FileSystemApiOpenDirectoryWithOnlyWritePermissionTest (7874 ms) [254/694] FileSystemApiTest.FileSystemApiOpenDirectoryOnGraylistTest (7610 ms) [255/694] FileSystemApiTest.FileSystemApiOpenDirectorySubdirectoryOfGraylistTest (7870 ms) [256/694] IdentityGetAccountsFunctionTest.PrimaryAccountHasNoRefreshToken (5772 ms) [257/694] IdentityGetProfileUserInfoFunctionTest.NotSignedInNoEmail (5508 ms) [258/694] FileSystemApiTest.FileSystemApiOpenMultipleWritableExistingFilesTest (7353 ms) [259/694] GetAuthTokenFunctionTest.NoninteractiveQueue (6037 ms) [260/694] GetAuthTokenFunctionTest.ComponentWithChromeClientId (5771 ms) [261/694] OnSignInChangedEventTest.FireOnPrimaryAccountRefreshTokenRevoked (5509 ms) [262/694] ExtensionManagementApiBrowserTest.LaunchAppFromBackground (7081 ms) [263/694] ExtensionManagementApiBrowserTest.SelfUninstallNoPermissions (6821 ms) [264/694] ExtensionManagementApiTest.NoPermission (6819 ms) [265/694] ExtensionPreferenceApiTest.PersistentIncognito (6555 ms) [266/694] ExtensionApiTestWithManagementPolicy.InitiatorProtectedByPolicy (6818 ms) [267/694] PermissionsApiTest.AlwaysAllowed (6824 ms) [ RUN ] NavigatingExtensionPopupBrowserTest.DownloadViaPost [1:1:0212/011337.604017:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [28695:28695:0212/011338.584212:WARNING:user_policy_manager_factory_chromeos.cc(210)] No policy loaded for known non-enterprise user [28695:28695:0212/011338.712645:WARNING:merge_session_throttling_utils.cc(143)] Loading content for a profile without session restore? [28695:28695:0212/011339.048636:WARNING:merge_session_throttling_utils.cc(143)] Loading content for a profile without session restore? [28695:28695:0212/011339.206479:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [28695:28972:0212/011342.221435:WARNING:simple_synchronous_entry.cc(1425)] Could not open platform files for entry. [28695:28695:0212/011402.243069:ERROR:surface_manager.cc(486)] Old/orphaned temporary reference to SurfaceId(FrameSinkId[](5, 2), LocalSurfaceId(2, 2, F645...)) [28695:28695:0212/011402.243254:ERROR:surface_manager.cc(486)] Old/orphaned temporary reference to SurfaceId(FrameSinkId[](5, 2), LocalSurfaceId(1, 2, F645...)) BrowserTestBase received signal: Terminated. Backtrace: #0 0x7f18fdafd901 base::debug::CollectStackTrace() #1 0x7f18fd965c1d base::debug::StackTrace::StackTrace() #2 0x7f18fd965bd5 base::debug::StackTrace::StackTrace() #3 0x558ef1ce281d content::(anonymous namespace)::DumpStackTraceSignalHandler() #4 0x7f18d627acb0 <unknown> #5 0x7f18d63426d3 epoll_wait #6 0x7f18fdb8606f epoll_dispatch #7 0x7f18fdb797f5 event_base_loop #8 0x7f18fdb320af base::MessagePumpLibevent::Run() #9 0x7f18fda6202c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #10 0x7f18fda069d7 base::RunLoop::Run() #11 0x558ef1d2ec8e content::RunThisRunLoop() #12 0x558ef1d2ec5c content::RunMessageLoop() #13 0x558ef1cfb0be content::DownloadTestObserver::WaitForFinished() #14 0x558eedc89e61 extensions::(anonymous namespace)::NavigatingExtensionPopupBrowserTest_DownloadViaPost_Test::RunTestOnMainThread() #15 0x558ef1ce1e13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #16 0x558eecec669d base::internal::FunctorTraits<>::Invoke<>() #17 0x558eecec65e1 base::internal::InvokeHelper<>::MakeItSo<>() #18 0x558eecec6587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #19 0x558eed09283c base::internal::Invoker<>::Run() #20 0x558eeceb9f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #21 0x558ef142ed9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #22 0x558ef142db52 ChromeBrowserMainParts::PreMainMessageLoopRun() #23 0x558eeec104dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #24 0x7f18f617b807 content::BrowserMainLoop::PreMainMessageLoopRun() #25 0x7f18f555761d base::internal::FunctorTraits<>::Invoke<>() #26 0x7f18f5557591 base::internal::InvokeHelper<>::MakeItSo<>() #27 0x7f18f5557537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #28 0x7f18f5f2311c base::internal::Invoker<>::Run() #29 0x7f18f54cbd5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #30 0x7f18f698eacc content::StartupTaskRunner::RunAllTasksNow() #31 0x7f18f6179fc1 content::BrowserMainLoop::CreateStartupTasks() #32 0x7f18f6180ece content::BrowserMainRunnerImpl::Initialize() #33 0x7f18f6177361 content::BrowserMain() #34 0x7f18f74ded2b content::RunBrowserProcessMain() #35 0x7f18f74dffe6 content::ContentMainRunnerImpl::RunServiceManager() #36 0x7f18f74dfaa0 content::ContentMainRunnerImpl::Run() #37 0x7f18f74dd589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #38 0x7f18d4da0703 service_manager::Main() #39 0x7f18f74de835 content::ContentMain() #40 0x558ef1ce1a19 content::BrowserTestBase::SetUp() #41 0x558ef138cf4e InProcessBrowserTest::SetUp() #42 0x558ef1323dfb extensions::ExtensionBrowserTest::SetUp() #43 0x558eef16b63e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #44 0x558eef167302 testing::internal::HandleExceptionsInMethodIfSupported<>() #45 0x558eef15ab94 testing::Test::Run() #46 0x558eef15b282 testing::TestInfo::Run() #47 0x558eef15b793 testing::TestSuite::Run() #48 0x558eef163274 testing::internal::UnitTestImpl::RunAllTests() #49 0x558eef16b6ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #50 0x558eef168152 testing::internal::HandleExceptionsInMethodIfSupported<>() #51 0x558eef162f97 testing::UnitTest::Run() #52 0x558ef13acd01 RUN_ALL_TESTS() #53 0x558ef13ab562 base::TestSuite::Run() #54 0x558ef130fb57 ChromeTestSuiteRunner::RunTestSuite() #55 0x558ef130fc43 ChromeTestLauncherDelegate::RunTestSuite() #56 0x558ef1d27005 content::LaunchTests() #57 0x558ef130ff87 LaunchChromeTests() #58 0x558ef130f9ab main #59 0x7f18d6265f45 __libc_start_main #60 0x558eece6802a _start [268/694] NavigatingExtensionPopupBrowserTest.DownloadViaPost (TIMED OUT) [269/694] ExtensionPreferenceApiTest.OnChangeSplitWithNoOTRProfile (6297 ms) [270/694] ProcessesApiTest.ProcessesApiListeners (6826 ms) [271/694] SocketApiTest.SocketTCPServerExtension (6826 ms) [272/694] WebNavigationApiTest.Api (7346 ms) [273/694] ExtensionWebRequestApiTest.WebRequestDeclarativePermissionSplit2 (8661 ms) [274/694] ExtensionWebRequestApiTest.WebRequestDeclarativePermissionSpanning2 (8668 ms) [275/694] ExtensionWebRequestApiTest.WebRequestApiClearsBindingOnFirstListener (5513 ms) [276/694] WebrtcLoggingPrivateApiTest.TestStartStopRtpDump (5771 ms) [277/694] WebrtcLoggingPrivateApiBrowserTest.TestGetLogsDirectoryReadsFiles (6557 ms) [278/694] ExtensionWebRequestApiTest.WebRequestSubresourceRedirectsWithExtraHeaders (18895 ms) [279/694] WebrtcLoggingPrivateApiBrowserTest.TestStartAudioDebugRecordingsForWebviewFromApp (9452 ms) [280/694] ExtensionWebstorePrivateApiTest.FrameWebstorePageBlocked (7612 ms) [281/694] ExtensionWebstorePrivateApiTestChild.InstallBlocked (7615 ms) [282/694] AppBackgroundPageApiTest.OpenThenClose (9977 ms) [283/694] AppApiTest.ClientRedirectToAppFromExtension (8414 ms) [284/694] ContentCapabilitiesTest.NoCapabilities (7356 ms) [285/694] BookmarkAppNavigationThrottleExperimentalBrowserTest.AccessOpenerAppWindowFromChildWindow (9972 ms) [286/694] ExtensionCrxInstallerTest.HiDpiThemeTest (6561 ms) [287/694] ErrorConsoleBrowserTest.ReportManifestErrors (6561 ms) [288/694] EventsApiTest.UpdateDispatchesOnInstalledAfterEnablement (8656 ms) [289/694] ExecuteScriptApiTest.ExecuteScriptInFrame (8669 ms) [290/694] ExecuteScriptApiTest.InjectScriptInFileFrameAllowed (7615 ms) [291/694] FlagOffExtensionActionRunnerBrowserTest.ScriptsExecuteWhenFlagAbsent_ContentScripts (6825 ms) [292/694] ExtensionContextMenuBrowserTest.ClickInFrame (7356 ms) [293/694] ExtensionContextMenuBrowserTest.TopLevel (9715 ms) [294/694] ClipboardApiTest.HostedApp (7888 ms) [295/694] IncognitoApiTest.Incognito (10755 ms) [296/694] ExtensionStorageMonitorTest.TwoHostedAppsInSameOrigin (8930 ms) [297/694] ExtensionApiTabTest.TabSize (8679 ms) [298/694] ExtensionUnloadBrowserTest.UnloadWithContentScripts (7356 ms) [299/694] ExtensionURLLoaderThrottleBrowserTest.DoNotThrottleCachedResponse_NonRedirectCached (7876 ms) [300/694] ExtensionFetchTest.ExtensionCanFetchExtensionResource (7345 ms) [301/694] NativeBindingsApiTest.SimpleEndToEndTest (10501 ms) [302/694] ExtensionWebUITest.SanityCheckAvailableAPIs (12606 ms) [303/694] NativeBindingsApiTest.FileSystemApiGetDisplayPath (8417 ms) [304/694] ProcessManagementTest.NavigateToBlockedExtensionPageInNewTab (9473 ms) [305/694] PresentationReceiverWindowControllerBrowserTest.CreatesWindow (7346 ms) [306/694] WindowOpenApiTest.PopupBlockingHostedApp (8927 ms) [307/694] ExtensionInstallDialogViewTest.NotifyDelegate (6574 ms) [308/694] ExtensionInstallDialogViewInteractiveBrowserTest.InvokeUi_MultilinePermission (5776 ms) [309/694] SaveCardBubbleViewsFullFormBrowserTest.Upload_SubmittingFormWithExpirationDateMonthAndYearExpired (13124 ms) [310/694] BrowserViewTest.CloseWithTabs (6295 ms) [311/694] MediaRouterWebUIBrowserTest.OpenDialogFromContextMenu (6302 ms) [312/694] MediaRouterViewsUIBrowserTest.PinAndUnpinToolbarIcon (6558 ms) [313/694] OmniboxPopupContentsViewTest.ThemeIntegration (7869 ms) [314/694] PageInfoBubbleViewBrowserTest.SiteSettingsLinkWithNonDefaultPort (8661 ms) [315/694] PageInfoBubbleViewBrowserTest.InvokeUi_InternalExtension (7365 ms) [316/694] PageInfoBubbleViewBrowserTest.ClosesOnUserNavigateToSamePage (7094 ms) [317/694] PaymentRequestEmptyUpdateTest.NoCrash (7609 ms) [318/694] PaymentRequestErrorMessageTest.CompleteFail (7619 ms) [319/694] PaymentRequestModifiersTest.NoTotalInModifierDoesNotCrash (7096 ms) [320/694] PaymentRequestCanMakePaymentMetricsTest.UserAborted_NavigationToDifferentOrigin (7613 ms) [321/694] PaymentRequestCompletionStatusMetricsTest.MerchantAborted_Reload (7346 ms) [322/694] PaymentRequestCompletionStatusMetricsTest.MerchantAborted_Abort (7355 ms) [323/694] PaymentRequestCompletionStatusMetricsTest.UserAborted_TabClosed (7352 ms) [324/694] PaymentRequestCompleteSuggestionsForEverythingTest.UserDidNotHaveCompleteSuggestionsForEverything_NoCard (7358 ms) [325/694] PaymentRequestPaymentAppTest.SkipUIEnabledWithBobPay (8137 ms) [326/694] PaymentSheetViewControllerNoShippingTest.SupportedCard (7364 ms) [327/694] PaymentRequestShippingAddressEditorTest.NoErrorLabelForPossibleButInvalidPhoneNumber (7359 ms) [328/694] PaymentRequestShippingAddressEditorTest.RetryWithShippingAddressErrors_HasSameValueButDifferentErrorsShown (8137 ms) [329/694] PasswordReuseModalWarningTest.TestBasicDialogBehavior (6820 ms) [330/694] AccessibilityManagerTest.ChangingTypePrefInvokesNotification (7347 ms) [331/694] MagnificationManagerTest.TypePref (5001 ms) [332/694] DictationTest.SwitchInputContext (6300 ms) [333/694] TaskManagerViewTest.SelectionConsistency (12077 ms) [334/694] MagnificationManagerTest.ScalePref (4223 ms) [335/694] KioskAppManagerTest.Basic (6559 ms) [336/694] ArcActiveDirectoryEnrollmentTokenFetcherBrowserTest.SamlFlowSucceedsWithAuthRetry (6824 ms) [337/694] SelectToSpeakTest.ActivatesWithTapOnSelectToSpeakTray (8394 ms) [338/694] ArcAuthServiceChildAccountTest.ChildTransition (7347 ms) [339/694] ArcSettingsServiceTest.ProxyModePolicyTest (6304 ms) [340/694] DriveIntegrationServiceBrowserTest.CreatedDuringLogin (6041 ms) [341/694] ChromeOSInfoPrivateTest.Chromebit (7086 ms) [342/694] UsersPrivateApiLoginStatusTest.User (6831 ms) [343/694] UsersPrivateApiLockStatusTest.ScreenLock (8405 ms) [344/694] LocalFileSystemExtensionApiTest.FileWatch (7088 ms) [345/694] DriveFileSystemExtensionApiTest.FileBrowserHandlers (7619 ms) [346/694] FileManagerJsTest.ContentMetadataProvider (6303 ms) [347/694] FileManagerJsTest.ThumbnailModel (6557 ms) [348/694] FileManagerJsTest.FilesTooltip (9184 ms) [349/694] FileManagerJsTest.FileListSelectionModelTest (5519 ms) [350/694] GalleryBrowserTest.CheckAvailabilityOfShareButtonOnDownloads (15480 ms) [351/694] GalleryBrowserTestInGuestMode.OpenMultipleImagesOnDownloads (14956 ms) [352/694] GalleryBrowserTest.ExposureImageOnDrive (17313 ms) [353/694] FirstRunUIBrowserTest.ModalWindowDoesNotBlock (7350 ms) [354/694] FirstRunUIBrowserTest.EscapeCancelsTutorial (7614 ms) [0212/011727.813343:ERROR:kill_posix.cc(84)] Unable to terminate process group 4669: No such process (3) [ RUN ] LocalFileSystemExtensionApiTest.FileSystemOperations [1:1:0212/011643.929811:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [4669:4669:0212/011644.674978:WARNING:user_policy_manager_factory_chromeos.cc(210)] No policy loaded for known non-enterprise user [4669:4669:0212/011644.792779:WARNING:merge_session_throttling_utils.cc(143)] Loading content for a profile without session restore? [4669:4669:0212/011645.084604:WARNING:merge_session_throttling_utils.cc(143)] Loading content for a profile without session restore? [4669:4669:0212/011645.296138:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [4669:4669:0212/011647.914826:INFO:CONSOLE(280)] "testing:local", source: chrome-extension://pkplfbidichfdicaijlchgnapepdginl/test.js (280) [4669:4669:0212/011647.963286:INFO:CONSOLE(0)] "[SUCCESS] getDirectoryTest", source: chrome-extension://pkplfbidichfdicaijlchgnapepdginl/_generated_background_page.html (0) [4669:4669:0212/011647.979073:INFO:CONSOLE(0)] "[SUCCESS] createDirectoryTest", source: chrome-extension://pkplfbidichfdicaijlchgnapepdginl/_generated_background_page.html (0) [4669:4669:0212/011647.991961:INFO:CONSOLE(0)] "[SUCCESS] getFileTest", source: chrome-extension://pkplfbidichfdicaijlchgnapepdginl/_generated_background_page.html (0) [4669:4669:0212/011648.005388:INFO:CONSOLE(0)] "[SUCCESS] createFileTest", source: chrome-extension://pkplfbidichfdicaijlchgnapepdginl/_generated_background_page.html (0) [4669:4669:0212/011648.045747:INFO:CONSOLE(0)] "[SUCCESS] readFileTest", source: chrome-extension://pkplfbidichfdicaijlchgnapepdginl/_generated_background_page.html (0) [4669:4669:0212/011648.103880:INFO:CONSOLE(0)] "[SUCCESS] writeFileTest", source: chrome-extension://pkplfbidichfdicaijlchgnapepdginl/_generated_background_page.html (0) [4669:4669:0212/011648.141856:INFO:CONSOLE(0)] "[SUCCESS] truncateFileShortTest", source: chrome-extension://pkplfbidichfdicaijlchgnapepdginl/_generated_background_page.html (0) [4669:4669:0212/011648.181889:INFO:CONSOLE(0)] "[SUCCESS] truncateFileLongTest", source: chrome-extension://pkplfbidichfdicaijlchgnapepdginl/_generated_background_page.html (0) [4669:4669:0212/011648.232087:INFO:CONSOLE(0)] "[SUCCESS] abortWriteTest", source: chrome-extension://pkplfbidichfdicaijlchgnapepdginl/_generated_background_page.html (0) [1:1:0212/011648.233137:FATAL:file_writer_base.cc(125)] Check failed: false. #0 0x7f676a69d901 base::debug::CollectStackTrace() #1 0x7f676a505c1d base::debug::StackTrace::StackTrace() #2 0x7f676a505bd5 base::debug::StackTrace::StackTrace() #3 0x7f676a540827 logging::LogMessage::~LogMessage() #4 0x7f67468c6fc4 blink::FileWriterBase::DidWrite() #5 0x7f67468c63b8 base::internal::FunctorTraits<>::Invoke<>() #6 0x7f67468c62f7 base::internal::InvokeHelper<>::MakeItSo<>() #7 0x7f67468c624c _ZN4base8internal7InvokerINS0_9BindStateIMN5blink14FileWriterBaseEFvlbEJNS3_14WeakPersistentINS3_10FileWriterEEEEEEFvlbEE7RunImplIRKS6_RKNSt4__Cr5tupleIJS9_EEEJLm0EEEEvOT_OT0_NSG_16integer_sequenceImJXspT1_EEEEOlOb #8 0x7f67468c61d4 base::internal::Invoker<>::Run() #9 0x7f67468b3582 _ZNKR4base17RepeatingCallbackIFvlbEE3RunElb #10 0x7f67468bc08d WTF::ThreadCheckingCallbackWrapper<>::RunInternal() #11 0x7f67468bb700 WTF::ThreadCheckingCallbackWrapper<>::Run() #12 0x7f67468bc034 base::internal::FunctorTraits<>::Invoke<>() #13 0x7f67468bbf6b base::internal::InvokeHelper<>::MakeItSo<>() #14 0x7f67468bbedc _ZN4base8internal7InvokerINS0_9BindStateIMN3WTF29ThreadCheckingCallbackWrapperINS_17RepeatingCallbackIFvlbEEES6_EEFvlbEJNSt4__Cr10unique_ptrIS8_NSB_14default_deleteIS8_EEEEEEES6_E7RunImplIRKSA_RKNSB_5tupleIJSF_EEEJLm0EEEEvOT_OT0_NSB_16integer_sequenceImJXspT1_EEEEOlOb #15 0x7f67468bbe64 base::internal::Invoker<>::Run() #16 0x7f67468b3582 _ZNKR4base17RepeatingCallbackIFvlbEE3RunElb #17 0x7f67468b203f blink::FileSystemDispatcher::DidWrite() #18 0x7f67468bbaaa base::internal::FunctorTraits<>::Invoke<>() #19 0x7f67468bb9a5 base::internal::InvokeHelper<>::MakeItSo<>() #20 0x7f67468bb8ce _ZN4base8internal7InvokerINS0_9BindStateIMN5blink20FileSystemDispatcherEFvRKNS_17RepeatingCallbackIFvlbEEEilbEJNS3_14WeakPersistentIS4_EES7_iEEES6_E7RunImplIRKSB_RKNSt4__Cr5tupleIJSD_S7_iEEEJLm0ELm1ELm2EEEEvOT_OT0_NSJ_16integer_sequenceImJXspT1_EEEEOlOb #21 0x7f67468bb774 base::internal::Invoker<>::Run() #22 0x7f67468b3582 _ZNKR4base17RepeatingCallbackIFvlbEE3RunElb #23 0x7f67468bc08d WTF::ThreadCheckingCallbackWrapper<>::RunInternal() #24 0x7f67468bb700 WTF::ThreadCheckingCallbackWrapper<>::Run() #25 0x7f67468bc034 base::internal::FunctorTraits<>::Invoke<>() #26 0x7f67468bbf6b base::internal::InvokeHelper<>::MakeItSo<>() #27 0x7f67468bbedc _ZN4base8internal7InvokerINS0_9BindStateIMN3WTF29ThreadCheckingCallbackWrapperINS_17RepeatingCallbackIFvlbEEES6_EEFvlbEJNSt4__Cr10unique_ptrIS8_NSB_14default_deleteIS8_EEEEEEES6_E7RunImplIRKSA_RKNSB_5tupleIJSF_EEEJLm0EEEEvOT_OT0_NSB_16integer_sequenceImJXspT1_EEEEOlOb #28 0x7f67468bbe64 base::internal::Invoker<>::Run() #29 0x7f67468b3582 _ZNKR4base17RepeatingCallbackIFvlbEE3RunElb #30 0x7f67468bc96b blink::FileSystemDispatcher::WriteListener::DidWrite() #31 0x7f67490c1de5 blink::mojom::blink::FileSystemOperationListenerStubDispatch::Accept() #32 0x7f67468b3ae6 blink::mojom::blink::FileSystemOperationListenerStub<>::Accept() #33 0x7f676a7e46d3 mojo::InterfaceEndpointClient::HandleValidatedMessage() #34 0x7f676a7e4151 mojo::InterfaceEndpointClient::HandleIncomingMessageThunk::Accept() #35 0x7f676a7e2ee9 mojo::FilterChain::Accept() #36 0x7f676a7e5f06 mojo::InterfaceEndpointClient::HandleIncomingMessage() #37 0x7f676a7ef032 mojo::internal::MultiplexRouter::ProcessIncomingMessage() #38 0x7f676a7ee719 mojo::internal::MultiplexRouter::Accept() #39 0x7f676a7e2ee9 mojo::FilterChain::Accept() #40 0x7f676a7d3f9a mojo::Connector::DispatchMessage() #41 0x7f676a7d3a50 mojo::Connector::DispatchNextMessageInQueue() #42 0x7f676a7d8ddf base::internal::FunctorTraits<>::Invoke<>() #43 0x7f676a7d8d51 base::internal::FunctorTraits<>::Invoke<>() #44 0x7f676a7d8cf8 base::internal::InvokeHelper<>::MakeItSo<>() #45 0x7f676a7d8ca2 _ZN4base8internal7InvokerINS0_9BindStateINS0_18IgnoreResultHelperIMN4mojo9ConnectorEFbvEEEJNS_7WeakPtrIS5_EEEEEFvvEE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEE #46 0x7f676a7d8bde base::internal::Invoker<>::RunOnce() #47 0x7f676a4de86e _ZNO4base12OnceCallbackIFvvEE3RunEv #48 0x7f676a506cc5 base::debug::TaskAnnotator::RunTask() #49 0x7f676a6015e0 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl() #50 0x7f676a601029 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoSomeWork() #51 0x7f676a601829 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoSomeWork() #52 0x7f676a558ad8 base::MessagePumpDefault::Run() #53 0x7f676a60202c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #54 0x7f676a5a69d7 base::RunLoop::Run() #55 0x7f6763d47be1 content::RendererMain() #56 0x7f676407ea0d content::RunZygote() #57 0x7f676407ee35 content::RunOtherNamedProcessTypeMain() #58 0x7f676407fad0 content::ContentMainRunnerImpl::Run() #59 0x7f676407d589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #60 0x7f6741940703 service_manager::Main() #61 0x7f676407e835 content::ContentMain() #62 0x555ed4e81f41 content::LaunchTests() #63 0x555ed446af87 LaunchChromeTests() #64 0x555ed446a9ab main #65 0x7f6742e05f45 __libc_start_main #66 0x555ecffc302a _start [4669:4750:0212/011648.655361:ERROR:crash_handler_host_linux.cc(443)] Failed to write crash dump for pid 4900 Cannot upload crash dump: failed to open Failed to save crash dump: failed to open [4669:4750:0212/011648.663281:ERROR:crash_handler_host_linux.cc(443)] Failed to write crash dump for pid 4900 Cannot upload crash dump: failed to open Failed to save crash dump: failed to open BrowserTestBase received signal: Terminated. Backtrace: #0 0x7f5a2a109901 base::debug::CollectStackTrace() #1 0x7f5a29f71c1d base::debug::StackTrace::StackTrace() #2 0x7f5a29f71bd5 base::debug::StackTrace::StackTrace() #3 0x5557fea3f81d content::(anonymous namespace)::DumpStackTraceSignalHandler() #4 0x7f5a02886cb0 <unknown> #5 0x7f5a0294e6d3 epoll_wait #6 0x7f5a2a19206f epoll_dispatch #7 0x7f5a2a1857f5 event_base_loop #8 0x7f5a2a13e0af base::MessagePumpLibevent::Run() #9 0x7f5a2a06e02c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #10 0x7f5a2a0129d7 base::RunLoop::Run() #11 0x5557fea8bc8e content::RunThisRunLoop() #12 0x5558018b1e31 extensions::ResultCatcher::GetNextResult() #13 0x5557faf98f88 file_manager::(anonymous namespace)::FileSystemExtensionApiTestBase::RunFileSystemExtensionApiTest() #14 0x5557faf97e12 file_manager::(anonymous namespace)::LocalFileSystemExtensionApiTest_FileSystemOperations_Test::RunTestOnMainThread() #15 0x5557fea3ee13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #16 0x5557f9c2369d base::internal::FunctorTraits<>::Invoke<>() #17 0x5557f9c235e1 base::internal::InvokeHelper<>::MakeItSo<>() #18 0x5557f9c23587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #19 0x5557f9def83c base::internal::Invoker<>::Run() #20 0x5557f9c16f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #21 0x5557fe18bd9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #22 0x5557fe18ab52 ChromeBrowserMainParts::PreMainMessageLoopRun() #23 0x5557fb96d4dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #24 0x7f5a22787807 content::BrowserMainLoop::PreMainMessageLoopRun() #25 0x7f5a21b6361d base::internal::FunctorTraits<>::Invoke<>() #26 0x7f5a21b63591 base::internal::InvokeHelper<>::MakeItSo<>() #27 0x7f5a21b63537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #28 0x7f5a2252f11c base::internal::Invoker<>::Run() #29 0x7f5a21ad7d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #30 0x7f5a22f9aacc content::StartupTaskRunner::RunAllTasksNow() #31 0x7f5a22785fc1 content::BrowserMainLoop::CreateStartupTasks() #32 0x7f5a2278cece content::BrowserMainRunnerImpl::Initialize() #33 0x7f5a22783361 content::BrowserMain() #34 0x7f5a23aead2b content::RunBrowserProcessMain() #35 0x7f5a23aebfe6 content::ContentMainRunnerImpl::RunServiceManager() #36 0x7f5a23aebaa0 content::ContentMainRunnerImpl::Run() #37 0x7f5a23ae9589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #38 0x7f5a013ac703 service_manager::Main() #39 0x7f5a23aea835 content::ContentMain() #40 0x5557fea3ea19 content::BrowserTestBase::SetUp() #41 0x5557fe0e9f4e InProcessBrowserTest::SetUp() #42 0x5557fe080dfb extensions::ExtensionBrowserTest::SetUp() #43 0x5557faf976f6 file_manager::(anonymous namespace)::FileSystemExtensionApiTestBase::SetUp() #44 0x5557fbec863e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #45 0x5557fbec4302 testing::internal::HandleExceptionsInMethodIfSupported<>() #46 0x5557fbeb7b94 testing::Test::Run() #47 0x5557fbeb8282 testing::TestInfo::Run() #48 0x5557fbeb8793 testing::TestSuite::Run() #49 0x5557fbec0274 testing::internal::UnitTestImpl::RunAllTests() #50 0x5557fbec86ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #51 0x5557fbec5152 testing::internal::HandleExceptionsInMethodIfSupported<>() #52 0x5557fbebff97 testing::UnitTest::Run() #53 0x5557fe109d01 RUN_ALL_TESTS() #54 0x5557fe108562 base::TestSuite::Run() #55 0x5557fe06cb57 ChromeTestSuiteRunner::RunTestSuite() #56 0x5557fe06cc43 ChromeTestLauncherDelegate::RunTestSuite() #57 0x5557fea84005 content::LaunchTests() #58 0x5557fe06cf87 LaunchChromeTests() #59 0x5557fe06c9ab main #60 0x7f5a02871f45 __libc_start_main #61 0x5557f9bc502a _start [355/694] LocalFileSystemExtensionApiTest.FileSystemOperations (TIMED OUT) [356/694] GalleryBrowserTestInGuestMode.ExposureImageOnDownloads (14979 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ActiveDirectoryLoginTest.PRE_PasswordChange_ReopenClearErrors --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsWPb33E/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dwRoDES ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=DemoSessionUnownedDeviceTest.NotDemoMode --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsyk65Sd/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dipsytr ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=DemoSetupTest.OfflineDemoModeUnavailable --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsqiCoIM/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dGd9Ii0 ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=DemoSetupTest.ClickConnectedNetworkOnNetworkScreen --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsTO3Wxl/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dnDD97y [357/694] ActiveDirectoryLoginTest.PRE_PasswordChange_ReopenClearErrors (24135 ms) [358/694] DemoSessionUnownedDeviceTest.NotDemoMode (25966 ms) [359/694] DemoSetupTest.ClickConnectedNetworkOnNetworkScreen (29919 ms) [360/694] DemoSetupTest.OfflineDemoModeUnavailable (31224 ms) [361/694] AttestationAuthEnrollmentScreenTest.TestCancel (7094 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=EnableDebuggingTest.ShowAndCancelRemoveProtection --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultseXaLnU/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/d9bMPX7 ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=HandsOffEnrollmentTest.EnrollmentError --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsLCv831/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dHFCXDf ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=EnterpriseEnrollmentConfigurationTest.TestSwitchLanguageIME --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/results6kOHUA/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/d2rWouO ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=EnterpriseEnrollmentConfigurationTest.TestDemoModePreferences --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsPjzwL9/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/diVT5kn [362/694] EnableDebuggingTest.ShowAndCancelRemoveProtection (28344 ms) [363/694] HandsOffEnrollmentTest.EnrollmentError (30437 ms) [364/694] EnterpriseEnrollmentConfigurationTest.TestSwitchLanguageIME (29907 ms) [365/694] EnterpriseEnrollmentConfigurationTest.TestDemoModePreferences (29640 ms) [366/694] LoginGuestTest.GuestIsOTR (6825 ms) [367/694] ScreenLockerTest.PasswordAuthWhenAuthDisabled (7087 ms) [368/694] LoginCursorTest.CursorHidden (5251 ms) [369/694] KioskUpdateTest.PRE_LaunchOfflineEnabledAppNoNetwork (32789 ms) [370/694] UpdateScreenTest.TestAPReselection (7349 ms) [371/694] KioskEnterpriseTest.EnterpriseKioskApp (33581 ms) [372/694] LoginScreenPolicyTest.RestrictInputMethods (27815 ms) [373/694] WizardControllerTest.VolumeIsChangedForChromeVox (5247 ms) [374/694] LoginUIKeyboardTestWithUsersAndOwner.PRE_CheckPODScreenKeyboard (28588 ms) [375/694] WizardControllerKioskFlowTest.ControlFlowEnrollmentBack (4466 ms) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=DeviceIDTest.PRE_PRE_PRE_PRE_PRE_NewUsers --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsubt7Bd/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dtLfyar ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=WebviewClientCertsLoginTest.SigninFrameNoAuthorityGiven --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsOMatvM/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/d9X7L3Z ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=WizardControllerDemoSetupTest.DemoPreferencesCanceled --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsJuD3ct/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dmhkYKG ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=DeviceLocalAccountTest.StartSession --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsqn1r71/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dLcBeFf [376/694] WizardControllerDemoSetupTest.DemoPreferencesCanceled (20726 ms) [377/694] WebviewClientCertsLoginTest.SigninFrameNoAuthorityGiven (29392 ms) [378/694] DeviceLocalAccountTest.StartSession (27820 ms) [379/694] DeviceIDTest.PRE_PRE_PRE_PRE_NewUsers (SKIPPED) [380/694] DeviceIDTest.PRE_PRE_PRE_NewUsers (SKIPPED) [381/694] DeviceIDTest.PRE_PRE_NewUsers (SKIPPED) [382/694] DeviceIDTest.PRE_NewUsers (SKIPPED) [383/694] DeviceIDTest.NewUsers (SKIPPED) [ RUN ] DeviceIDTest.PRE_PRE_PRE_PRE_PRE_NewUsers HTTPS server started on 127.0.0.1:37367... sending server_data: {"host": "127.0.0.1", "port": 37367} (36 bytes) [1:1:0212/011859.888902:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [8498:8498:0212/011900.347005:ERROR:child_process_security_policy_impl.cc(1395)] Ignoring port number in isolated origin: https://accounts.google.com:37367 [8498:8498:0212/011902.294190:WARNING:CONSOLE(0)] "HTML Imports is deprecated and will be removed in M73, around March 2019. Please use ES modules instead. See https://www.chromestatus.com/features/5144752345317376 for more details.", source: (0) [8498:8498:0212/011903.304966:WARNING:CONSOLE(442)] "document.registerElement is deprecated and will be removed in M73, around March 2019. Please use window.customElements.define instead. See https://www.chromestatus.com/features/4642138092470272 for more details.", source: chrome://resources/polymer/v1_0/polymer/polymer-micro-extracted.js (442) [8498:8498:0212/011908.456665:WARNING:CONSOLE(2083)] "Element.createShadowRoot is deprecated and will be removed in M73, around March 2019. Please use Element.attachShadow instead. See https://www.chromestatus.com/features/4507242028072960 for more details.", source: chrome://resources/polymer/v1_0/polymer/polymer-mini-extracted.js (2083) [8498:8498:0212/011908.735033:WARNING:CONSOLE(2651)] "Could not find style data in module named", source: chrome://resources/polymer/v1_0/polymer/polymer-extracted.js (2651) [8498:8498:0212/011912.978065:WARNING:CONSOLE(2651)] "Could not find style data in module named", source: chrome://resources/polymer/v1_0/polymer/polymer-extracted.js (2651) [8498:8498:0212/011913.041556:WARNING:CONSOLE(2651)] "Could not find style data in module named", source: chrome://resources/polymer/v1_0/polymer/polymer-extracted.js (2651) [8498:8498:0212/011913.490866:WARNING:CONSOLE(2651)] "Could not find style data in module named", source: chrome://resources/polymer/v1_0/polymer/polymer-extracted.js (2651) ALSA lib confmisc.c:768:(parse_card) cannot find card '0' ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default [8498:8613:0212/011915.451599:ERROR:alsa_util.cc(204)] PcmOpen: default,No such file or directory ALSA lib confmisc.c:768:(parse_card) cannot find card '0' ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default [8498:8613:0212/011915.452438:ERROR:alsa_util.cc(204)] PcmOpen: plug:default,No such file or directory [8498:8613:0212/011915.452842:ERROR:audio_output_resampler.cc(384)] Unable to open audio device in high latency mode. Falling back to fake audio output. [8498:8498:0212/011916.417574:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: resource_coordinator.mojom.FrameCoordinationUnit [8498:8498:0212/011916.510674:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: resource_coordinator.mojom.FrameCoordinationUnit [8498:8498:0212/011916.611792:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: content.mojom.RendererAudioOutputStreamFactory [8498:8498:0212/011916.612746:WARNING:render_frame_host_impl.cc(479)] InterfaceRequest was dropped, the document is no longer active: resource_coordinator.mojom.FrameCoordinationUnit [8498:8498:0212/011917.296580:WARNING:chrome_browsing_data_remover_delegate.cc(1024)] Failed to find user for current profile. [8498:8498:0212/011917.297594:WARNING:wizard_controller.cc(1630)] SkipPostLoginScreensForTesting(): Ignore screen 1 [8498:8498:0212/011917.298165:INFO:CONSOLE(9237)] "Loading asset bundle oauth-enrollment", source: chrome://oobe/oobe.js (9237) [8498:8498:0212/011917.344836:INFO:lock_screen_utils.cc(56)] GetUserLastInputMethod: no input method for this user [8498:8498:0212/011921.812324:INFO:signin_screen_handler.cc(1356)] Login WebUI >> active: 1, source: gaia-signin [8498:8674:0212/011922.574801:WARNING:fake_gaia.cc(288)] Serving request /embedded/setup/v2/chromeos 127.0.0.1 - - [12/Feb/2019 01:19:22] "GET /embedded/setup/v2/chromeos?chrometype=chromedevice&client_id=dummytoken&client_version=74.0.3704.0&platform_version=0.0.0.0&endpoint_gen=1.0&mi=ee%2C&is_first_user=true&hl=en-US HTTP/1.1" 200 - ALSA lib confmisc.c:768:(parse_card) cannot find card '0' ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default [8498:8613:0212/011923.304292:ERROR:alsa_util.cc(204)] PcmOpen: default,No such file or directory ALSA lib confmisc.c:768:(parse_card) cannot find card '0' ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file or directory ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default [8498:8613:0212/011923.304755:ERROR:alsa_util.cc(204)] PcmOpen: plug:default,No such file or directory [8498:8613:0212/011923.304855:ERROR:audio_output_resampler.cc(384)] Unable to open audio device in high latency mode. Falling back to fake audio output. [8498:8498:0212/011924.182062:WARNING:CONSOLE(293)] "<webview>: The load has aborted with error -102: ERR_CONNECTION_REFUSED.", source: extensions::webViewEvents (293) [8498:8674:0212/011924.383031:ERROR:fake_gaia.cc(291)] Unhandled request /favicon.ico [8498:8674:0212/011924.383580:WARNING:embedded_test_server.cc(237)] Request not handled. Returning 404: /favicon.ico 127.0.0.1 - - [12/Feb/2019 01:19:24] "GET /favicon.ico HTTP/1.1" 404 - [8498:8498:0212/011924.404562:WARNING:CONSOLE(293)] "<webview>: The load has aborted with error -102: ERR_CONNECTION_REFUSED.", source: extensions::webViewEvents (293) [8498:8498:0212/011924.793267:WARNING:CONSOLE(293)] "<webview>: The load has aborted with error -102: ERR_CONNECTION_REFUSED.", source: extensions::webViewEvents (293) [8498:8498:0212/011924.931515:WARNING:CONSOLE(2651)] "Could not find style data in module named", source: chrome://resources/polymer/v1_0/polymer/polymer-extracted.js (2651) [8498:8498:0212/011926.190264:INFO:CONSOLE(9221)] "Finished loading asset bundle oauth-enrollment", source: chrome://oobe/oobe.js (9221) [8498:8498:0212/011926.190805:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Cannot access contents of the page. Extension manifest must request permission to access the respective host.", source: chrome://oobe/oobe (0) [8498:8498:0212/011926.191278:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Cannot access contents of the page. Extension manifest must request permission to access the respective host.", source: chrome://oobe/oobe (0) [8498:8674:0212/011926.692982:WARNING:fake_gaia.cc(288)] Serving request /_/embedded/lookup/accountlookup 127.0.0.1 - - [12/Feb/2019 01:19:26] "POST /_/embedded/lookup/accountlookup HTTP/1.1" 200 - [8498:8674:0212/011926.705025:WARNING:fake_gaia.cc(288)] Serving request /_/embedded/signin/challenge 127.0.0.1 - - [12/Feb/2019 01:19:26] "POST /_/embedded/signin/challenge HTTP/1.1" 200 - [8498:8498:0212/011926.893443:WARNING:CONSOLE(16704)] "Unrecognized message from GAIA: clearOldAttempts", source: chrome://oobe/oobe.js (16704) [8498:8498:0212/011926.894076:WARNING:CONSOLE(16704)] "Unrecognized message from GAIA: clearOldAttempts", source: chrome://oobe/oobe.js (16704) [8498:8498:0212/011926.973669:INFO:signin_screen_handler.cc(1356)] Login WebUI >> active: 0, source: gaia-signin [8498:8604:0212/011927.561750:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [8498:8604:0212/011927.588245:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [8498:8498:0212/011927.590282:WARNING:gaia_auth_fetcher.cc(882)] Could not reach Google Accounts servers: errno -107 [8498:8498:0212/011928.101268:WARNING:CONSOLE(16704)] "Unrecognized message from GAIA: clearOldAttempts", source: chrome://oobe/oobe.js (16704) [8498:8498:0212/011928.104704:WARNING:CONSOLE(16704)] "Unrecognized message from GAIA: clearOldAttempts", source: chrome://oobe/oobe.js (16704) [8498:8604:0212/011930.620561:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [8498:8604:0212/011930.639957:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [8498:8498:0212/011930.642765:WARNING:gaia_auth_fetcher.cc(882)] Could not reach Google Accounts servers: errno -107 [8498:8604:0212/011933.665790:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [8498:8604:0212/011933.686412:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [8498:8498:0212/011933.688303:WARNING:gaia_auth_fetcher.cc(882)] Could not reach Google Accounts servers: errno -107 [8498:8604:0212/011936.713308:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [8498:8604:0212/011936.732652:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [8498:8498:0212/011936.734412:WARNING:gaia_auth_fetcher.cc(882)] Could not reach Google Accounts servers: errno -107 [8498:8604:0212/011939.766139:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [8498:8604:0212/011939.796446:ERROR:ssl_client_socket_impl.cc(984)] handshake failed; returned -1, SSL error code 1, net_error -107 [8498:8498:0212/011939.799489:WARNING:gaia_auth_fetcher.cc(882)] Could not reach Google Accounts servers: errno -107 BrowserTestBase received signal: Terminated. Backtrace: #0 0x7f581758c901 base::debug::CollectStackTrace() #1 0x7f58173f4c1d base::debug::StackTrace::StackTrace() #2 0x7f58173f4bd5 base::debug::StackTrace::StackTrace() #3 0x5573f115881d content::(anonymous namespace)::DumpStackTraceSignalHandler() #4 0x7f57efd09cb0 <unknown> #5 0x7f57efdd16d3 epoll_wait #6 0x7f581761506f epoll_dispatch #7 0x7f58176087f5 event_base_loop #8 0x7f58175c10af base::MessagePumpLibevent::Run() #9 0x7f58174f102c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #10 0x7f58174959d7 base::RunLoop::Run() #11 0x5573f11a624e content::WindowedNotificationObserver::Wait() #12 0x5573ed808610 chromeos::DeviceIDTest::WaitForSessionStart() #13 0x5573ed8074c2 chromeos::DeviceIDTest::SignInOnline() #14 0x5573ed8051c3 chromeos::DeviceIDTest_PRE_PRE_PRE_PRE_PRE_NewUsers_Test::RunTestOnMainThread() #15 0x5573f1157e13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #16 0x5573ec33c69d base::internal::FunctorTraits<>::Invoke<>() #17 0x5573ec33c5e1 base::internal::InvokeHelper<>::MakeItSo<>() #18 0x5573ec33c587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #19 0x5573ec50883c base::internal::Invoker<>::Run() #20 0x5573ec32ff8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #21 0x5573f08a4d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #22 0x5573f08a3b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #23 0x5573ee0864dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #24 0x7f580fc0a807 content::BrowserMainLoop::PreMainMessageLoopRun() #25 0x7f580efe661d base::internal::FunctorTraits<>::Invoke<>() #26 0x7f580efe6591 base::internal::InvokeHelper<>::MakeItSo<>() #27 0x7f580efe6537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #28 0x7f580f9b211c base::internal::Invoker<>::Run() #29 0x7f580ef5ad5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #30 0x7f581041dacc content::StartupTaskRunner::RunAllTasksNow() #31 0x7f580fc08fc1 content::BrowserMainLoop::CreateStartupTasks() #32 0x7f580fc0fece content::BrowserMainRunnerImpl::Initialize() #33 0x7f580fc06361 content::BrowserMain() #34 0x7f5810f6dd2b content::RunBrowserProcessMain() #35 0x7f5810f6efe6 content::ContentMainRunnerImpl::RunServiceManager() #36 0x7f5810f6eaa0 content::ContentMainRunnerImpl::Run() #37 0x7f5810f6c589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #38 0x7f57ee82f703 service_manager::Main() #39 0x7f5810f6d835 content::ContentMain() #40 0x5573f1157a19 content::BrowserTestBase::SetUp() #41 0x5573f0802f4e InProcessBrowserTest::SetUp() #42 0x5573f0799dfb extensions::ExtensionBrowserTest::SetUp() #43 0x5573ed818db4 chromeos::OobeBaseTest::SetUp() #44 0x5573ee5e163e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #45 0x5573ee5dd302 testing::internal::HandleExceptionsInMethodIfSupported<>() #46 0x5573ee5d0b94 testing::Test::Run() #47 0x5573ee5d1282 testing::TestInfo::Run() #48 0x5573ee5d1793 testing::TestSuite::Run() #49 0x5573ee5d9274 testing::internal::UnitTestImpl::RunAllTests() #50 0x5573ee5e16ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #51 0x5573ee5de152 testing::internal::HandleExceptionsInMethodIfSupported<>() #52 0x5573ee5d8f97 testing::UnitTest::Run() #53 0x5573f0822d01 RUN_ALL_TESTS() #54 0x5573f0821562 base::TestSuite::Run() #55 0x5573f0785b57 ChromeTestSuiteRunner::RunTestSuite() #56 0x5573f0785c43 ChromeTestLauncherDelegate::RunTestSuite() #57 0x5573f119d005 content::LaunchTests() #58 0x5573f0785f87 LaunchChromeTests() #59 0x5573f07859ab main #60 0x7f57efcf4f45 __libc_start_main #61 0x5573ec2de02a _start [384/694] DeviceIDTest.PRE_PRE_PRE_PRE_PRE_NewUsers (TIMED OUT) [385/694] DeviceStatusCollectorTest.MixedStates (1312 ms) [386/694] DeviceStatusCollectorTest.MixedStatesForArcKiosk (1314 ms) [387/694] DeviceStatusCollectorTest.TestAvailableMemory (1316 ms) [388/694] DeviceStatusCollectorTest.TestSoundVolume (1313 ms) [389/694] ConsumerDeviceStatusCollectorTimeLimitDisabledTest.ReportingBootMode (1576 ms) [390/694] ConsumerDeviceStatusCollectorTimeLimitEnabledTest.ReportingActivityTimesSessionTransistions (1314 ms) [391/694] DownloadNotificationTest.CloseNotificationWhileDownloading (7344 ms) [392/694] ManagedSessionsTest.ForceInstalledExtension (23868 ms) [393/694] DeviceLocalAccountTest.ExtensionsUncached (28075 ms) [394/694] CertificateProviderRequestPinTest.ShowPinDialogCloseWhileProcessing (7092 ms) [395/694] NetworkingPrivateApiTest.SetProperties (6837 ms) [396/694] NetworkingPrivateApiTest.GetDeviceStates (7105 ms) [397/694] NetworkingPrivateApiTest.StartDisconnect (7344 ms) [398/694] NetworkingPrivateApiTestFail.SetProperties (7084 ms) [399/694] PowerPolicyLoginScreenBrowserTest.SetDevicePolicy (25714 ms) [400/694] NetworkingPrivateApiTestFail.GetNetworks (7090 ms) [401/694] NetworkingPrivateChromeOSApiTest.GetVisibleNetworksWifi (7088 ms) [402/694] NetworkingPrivateChromeOSApiTest.GetDeviceStates (7364 ms) [403/694] NetworkingPrivateChromeOSApiTest.GetCellularPropertiesDefault (7353 ms) [404/694] NetworkingPrivateChromeOSApiTest.OnNetworksChangedEventConnect (7354 ms) [405/694] KeyboardEndToEndOverscrollTest.ToggleKeyboardOnMaximizedWindowAffectsViewport (9183 ms) [406/694] LauncherPlatformAppBrowserTest.UnpinRunning (7870 ms) [407/694] ShelfAppBrowserTest.SettingsAndTaskManagerWindows (7877 ms) [408/694] ShelfAppBrowserTest.LauncherContextMenuVerifyCloseItemAppearance (6575 ms) [409/694] ShelfAppBrowserTestNoDefaultBrowser.EnumerateAllBrowsersAndTabs (8155 ms) [410/694] ChromeNativeAppWindowViewsAuraAshBrowserTest.ImmersiveModeFullscreenRestoreType (8669 ms) [411/694] ArcAppPermissionDialogViewBrowserTest.ArcUsbPermissionBasicFlow (7081 ms) [412/694] TopControlsSlideControllerTest.DisabledForHostedApps (7377 ms) [413/694] PhishingClassifierTest.TestClassificationWhenSchemeNotSupported (2102 ms) [414/694] SBNavigationObserverBrowserTest.DownloadAttributionWithURLFragment (7619 ms) [415/694] SBNavigationObserverBrowserTest.AppendRecentNavigationsToEmptyReferrerChain (7354 ms) [416/694] SBNavigationObserverBrowserTest.CreateIframeElementGetsReferrerChain (6820 ms) [417/694] CaptivePortalBrowserTest.RequestFails (6822 ms) [418/694] AppListClientImplBrowserTest.ShowContextMenu (6573 ms) [419/694] PrintBrowserTest.RegularPrinting (7083 ms) [420/694] BluetoothLowEnergyApiTest.ReadDescriptorValue (7094 ms) [421/694] BluetoothLowEnergyApiTest.PermissionDenied (6823 ms) [422/694] ZipFileCreatorTest.SomeFilesZip (6296 ms) [423/694] SitePerProcessPrintBrowserTest.BasicPrint (14952 ms) [424/694] AppManagementMainViewTest.All (13123 ms) [425/694] InvalidationsWebUITest.testRegisteringNewIds (8144 ms) [426/694] DownloadsUrlTest.All (11033 ms) [427/694] InvalidationsWebUITest.testUpdatingInternalDisplay (6820 ms) [428/694] BluetoothInternalsTest.Startup_BluetoothInternals (17064 ms) [429/694] CrElementsRadioGroupTest.All (8135 ms) [430/694] Mock4JSWebUITestFails.CalledTwiceExpectOnceFails (7376 ms) [431/694] MaterialHistorySupervisedUserTest.All (14164 ms) [432/694] MediaRouterElementsBrowserTest.MediaRouterSearchHighlighter (10525 ms) [433/694] NetInternalsTest.netInternalsDomainSecurityPolicyViewAddTwice (9193 ms) [434/694] CrSettingsPrefUtilTest.All (8151 ms) [435/694] CrSettingsAutofillSectionCompanyDisabledTest.All (16019 ms) [436/694] CrSettingsInternetDetailPageTest.InternetDetailPage (18908 ms) [437/694] CrSettingsPrivacyPageTest.All (21515 ms) [438/694] CrSettingsSiteFaviconTest.All (7352 ms) [439/694] CrSettingsLanguagesPageTest.LanguageMenu (19173 ms) [440/694] TextDefaultsTest.ScrapeMDStyles (7088 ms) [441/694] CrExtensionsItemsTest.EnableToggle (9180 ms) [442/694] CrExtensionsDetailViewTest.LayoutSource (11027 ms) [443/694] CrExtensionsItemListTest.Filtering (10506 ms) [444/694] CrExtensionsManagerUnitTest.ProfileSettings (13392 ms) [445/694] CrExtensionsNavigationHelperTest.Basic (9718 ms) [446/694] CrExtensionsManagerTestWithIdQueryParam.UrlNavigationToActivityLogFail (15500 ms) [447/694] CrExtensionsOptionsDialogTest.Layout (15496 ms) [448/694] CrExtensionsNavigationHelperTest.Conversion (8664 ms) [449/694] PrintPreviewSettingsSectionsTest.SetMargins (15233 ms) [450/694] PrintPreviewSettingsSectionsTest.SetPages (16798 ms) [451/694] PrintPreviewSettingsSectionsTest.PresetDuplex (14706 ms) [452/694] PrintPreviewDestinationSelectTest.MultipleRecentDestinationsOneRequest (14692 ms) [453/694] PrintPreviewAdvancedDialogTest.AdvancedSettingsClose (9713 ms) [454/694] PrintPreviewCustomMarginsTest.ControlsCheck (9709 ms) [455/694] PrintPreviewDestinationListTest.FireDestinationSelected (9442 ms) [456/694] PrintPreviewNewDestinationSearchTest.ResolutionFails (11023 ms) [457/694] BluetoothPrivateApiTest.CancelPairing (6823 ms) [458/694] MediaRouterIntegrationBrowserTest.Fail_SendMessage (8141 ms) [459/694] ExtensionOptionsApiTest.ShouldNotEmbedOtherExtensionsOptions (9457 ms) [460/694] ChromeVoxBackgroundTest.InitialFocus (18388 ms) [461/694] ChromeVoxBackgroundTest.ForwardBackwardNavigation (22848 ms) [462/694] ChromeVoxBackgroundTest.NodeVsSubnode (18903 ms) [0212/012259.091515:ERROR:kill_posix.cc(84)] Unable to terminate process group 15668: No such process (3) <truncated> /*! * Chai - getPathValue utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * @see https://github.com/logicalparadox/filtr * MIT Licensed */ var getPathInfo = require('./getPathInfo'); /** * ### .getPathValue(path, object) * * This allows the retrieval of values in an * object given a string path. * * var obj = { * prop1: { * arr: ['a', 'b', 'c'] * , str: 'Hello' * } * , prop2: { * arr: [ { nested: 'Universe' } ] * , str: 'Hello again!' * } * } * * The following would be the results. * * getPathValue('prop1.str', obj); // Hello * getPathValue('prop1.att[2]', obj); // b * getPathValue('prop2.arr[0].nested', obj); // Universe * * @param {String} path * @param {Object} object * @returns {Object} value or `undefined` * @name getPathValue * @api public */ module.exports = function(path, obj) { var info = getPathInfo(path, obj); return info.value; }; },{"./getPathInfo":18}],20:[function(require,module,exports){ /*! * Chai - getProperties utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### .getProperties(object) * * This allows the retrieval of property names of an object, enumerable or not, * inherited or not. * * @param {Object} object * @returns {Array} * @name getProperties * @api public */ module.exports = function getProperties(object) { var result = Object.getOwnPropertyNames(object); function addProperty(property) { if (result.indexOf(property) === -1) { result.push(property); } } var proto = Object.getPrototypeOf(object); while (proto !== null) { Object.getOwnPropertyNames(proto).forEach(addProperty); proto = Object.getPrototypeOf(proto); } return result; }; },{}],21:[function(require,module,exports){ /*! * Chai - hasProperty utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ var type = require('type-detect'); /** * ### .hasProperty(object, name) * * This allows checking whether an object has * named property or numeric array index. * * Basically does the same thing as the `in` * operator but works properly with natives * and null/undefined values. * * var obj = { * arr: ['a', 'b', 'c'] * , str: 'Hello' * } * * The following would be the results. * * hasProperty('str', obj); // true * hasProperty('constructor', obj); // true * hasProperty('bar', obj); // false * * hasProperty('length', obj.str); // true * hasProperty(1, obj.str); // true * hasProperty(5, obj.str); // false * * hasProperty('length', obj.arr); // true * hasProperty(2, obj.arr); // true * hasProperty(3, obj.arr); // false * * @param {Objuect} object * @param {String|Number} name * @returns {Boolean} whether it exists * @name getPathInfo * @api public */ var literals = { 'number': Number , 'string': String }; module.exports = function hasProperty(name, obj) { var ot = type(obj); // Bad Object, obviously no props at all if(ot === 'null' || ot === 'undefined') return false; // The `in` operator does not work with certain literals // box these before the check if(literals[ot] && typeof obj !== 'object') obj = new literals[ot](obj); return name in obj; }; },{"type-detect":35}],22:[function(require,module,exports){ /*! * chai * Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Main exports */ var exports = module.exports = {}; /*! * test utility */ exports.test = require('./test'); /*! * type utility */ exports.type = require('type-detect'); /*! * expectTypes utility */ exports.expectTypes = require('./expectTypes'); /*! * message utility */ exports.getMessage = require('./getMessage'); /*! * actual utility */ exports.getActual = require('./getActual'); /*! * Inspect util */ exports.inspect = require('./inspect'); /*! * Object Display util */ exports.objDisplay = require('./objDisplay'); /*! * Flag utility */ exports.flag = require('./flag'); /*! * Flag transferring utility */ exports.transferFlags = require('./transferFlags'); /*! * Deep equal utility */ exports.eql = require('deep-eql'); /*! * Deep path value */ exports.getPathValue = require('./getPathValue'); /*! * Deep path info */ exports.getPathInfo = require('./getPathInfo'); /*! * Check if a property exists */ exports.hasProperty = require('./hasProperty'); /*! * Function name */ exports.getName = require('./getName'); /*! * add Property */ exports.addProperty = require('./addProperty'); /*! * add Method */ exports.addMethod = require('./addMethod'); /*! * overwrite Property */ exports.overwriteProperty = require('./overwriteProperty'); /*! * overwrite Method */ exports.overwriteMethod = require('./overwriteMethod'); /*! * Add a chainable method */ exports.addChainableMethod = require('./addChainableMethod'); /*! * Overwrite chainable method */ exports.overwriteChainableMethod = require('./overwriteChainableMethod'); },{"./addChainableMethod":9,"./addMethod":10,"./addProperty":11,"./expectTypes":12,"./flag":13,"./getActual":14,"./getMessage":16,"./getName":17,"./getPathInfo":18,"./getPathValue":19,"./hasProperty":21,"./inspect":23,"./objDisplay":24,"./overwriteChainableMethod":25,"./overwriteMethod":26,"./overwriteProperty":27,"./test":28,"./transferFlags":29,"deep-eql":31,"type-detect":35}],23:[function(require,module,exports){ // This is (almost) directly from Node.js utils // https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js var getName = require('./getName'); var getProperties = require('./getProperties'); var getEnumerable <truncated (345485 bytes)> essibility * audit. Only for use in testing. * @return {Array<Object>} */ getAccessibilityResults: function() { return this.a11yResults_; }, /** * Run accessibility checks after this test completes. */ enableAccessibilityChecks: function() { this.runAccessibilityChecks = true; }, /** * Don't run accessibility checks after this test completes. */ disableAccessibilityChecks: function() { this.runAccessibilityChecks = false; }, /** * Create a new class to handle |messageNames|, assign it to * |this.mockHandler|, register its messages and return it. * @return {Mock} Mock handler class assigned to |this.mockHandler|. */ makeAndRegisterMockHandler: function(messageNames) { var MockClass = makeMockClass(messageNames); this.mockHandler = mock(MockClass); registerMockMessageCallbacks(this.mockHandler, MockClass); return this.mockHandler; }, /** * Create a new class to handle |functionNames|, assign it to * |this.mockGlobals|, register its global overrides, and return it. * @return {Mock} Mock handler class assigned to |this.mockGlobals|. * @see registerMockGlobals */ makeAndRegisterMockGlobals: function(functionNames) { var MockClass = makeMockClass(functionNames); this.mockGlobals = mock(MockClass); registerMockGlobals(this.mockGlobals, MockClass); return this.mockGlobals; }, /** * Create a container of mocked standalone functions to handle * '.'-separated |apiNames|, assign it to |this.mockApis|, register its API * overrides and return it. * @return {Mock} Mock handler class. * @see makeMockFunctions * @see registerMockApis */ makeAndRegisterMockApis: function(apiNames) { var apiMockNames = apiNames.map(function(name) { return name.replace(/\./g, '_'); }); this.mockApis = makeMockFunctions(apiMockNames); registerMockApis(this.mockApis); return this.mockApis; }, /** * Create a container of mocked standalone functions to handle * |functionNames|, assign it to |this.mockLocalFunctions| and return it. * @param {!Array<string>} functionNames * @return {Mock} Mock handler class. * @see makeMockFunctions */ makeMockLocalFunctions: function(functionNames) { this.mockLocalFunctions = makeMockFunctions(functionNames); return this.mockLocalFunctions; }, /** * Override this method to perform initialization during preload (such as * creating mocks and registering handlers). * @type {Function} */ preLoad: function() {}, /** * Override this method to perform tasks before running your test. * @type {Function} */ setUp: function() { // These should be ignored in many of the web UI tests. // user-image-stream and supervised-user-creation-image-stream are // streaming video elements used for capturing a user image so they // won't have captions and should be ignored everywhere. this.accessibilityAuditConfig.ignoreSelectors( 'videoWithoutCaptions', '.user-image-stream'); this.accessibilityAuditConfig.ignoreSelectors( 'videoWithoutCaptions', '.supervised-user-creation-image-stream'); }, /** * Override this method to perform tasks after running your test. If you * create a mock class, you must call Mock4JS.verifyAllMocks() in this * phase. * @type {Function} */ tearDown: function() { if (typeof document != 'undefined') { var noAnimationStyle = document.getElementById('no-animation'); if (noAnimationStyle) { noAnimationStyle.parentNode.removeChild(noAnimationStyle); } } Mock4JS.verifyAllMocks(); }, /** * Called to run the body from the perspective of this fixture. * @type {Function} */ runTest: function(testBody) { testBody.call(this); }, /** * Called to run the accessibility audit from the perspective of this * fixture. */ runAccessibilityAudit: function() { if (!this.runAccessibilityChecks || typeof document === 'undefined') { return; } var auditConfig = this.accessibilityAuditConfig; if (!runAccessibilityAudit(this.a11yResults_, auditConfig)) { var report = accessibilityAuditReport(this.a11yResults_); if (this.accessibilityIssuesAreErrors) { throw new Error(report); } else { console.warn(report); } } }, /** * Create a closure function for continuing the test at a later time. May be * used as a listener function. * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {Function} completion The function to call to complete the test. * @param {...*} var_args Arguments to pass when calling completionAction. * @return {function(): void} Return a function, bound to this test fixture, * which continues the test. */ continueTest: function(whenTestDone, completion) { var savedArgs = new SaveMockArguments(); var completionAction = new CallFunctionAction( this, savedArgs, completion, Array.prototype.slice.call(arguments, 2)); if (whenTestDone === WhenTestDone.DEFAULT) { whenTestDone = WhenTestDone.ASSERT; } var runAll = new RunAllAction(true, whenTestDone, [completionAction]); return function() { savedArgs.arguments = Array.prototype.slice.call(arguments); runAll.invoke(); }; }, /** * Call this during setUp to defer the call to runTest() until later. The * caller must call the returned function at some point to run the test. * @type {Function} * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {...*} var_args Arguments to pass when running the * |currentTestCase|. * @return {function(): void} A function which will run the current body of * the currentTestCase. */ deferRunTest: function(whenTestDone) { if (whenTestDone === WhenTestDone.DEFAULT) { whenTestDone = WhenTestDone.ALWAYS; } return currentTestCase.deferRunTest.apply( currentTestCase, [whenTestDone].concat(Array.prototype.slice.call(arguments, 1))); }, }; /** * This class is not exported and is available to hold the state of the * |currentTestCase| throughout preload and test run. * @param {string} name The name of the test case. * @param {Test} fixture The fixture object for this test case. * @param {Function} body The code to run for the test. * @constructor */ function TestCase(name, fixture, body) { this.name = name; this.fixture = fixture; this.body = body; } TestCase.prototype = { /** * The name of this test. * @type {string} */ name: null, /** * The test fixture to set |this| to when running the test |body|. * @type {testing.Test} */ fixture: null, /** * The test body to execute in runTest(). * @type {Function} */ body: null, /** * True when the test fixture will run the test later. * @type {boolean} * @private */ deferred_: false, /** * Called at preload time, proxies to the fixture. * @type {Function} */ preLoad: function(name) { if (this.fixture) { this.fixture.preLoad(); } }, /** * Called before a test runs. */ setUp: function() { if (this.fixture) { this.fixture.setUp(); } }, /** * Called before a test is torn down (by testDone()). */ tearDown: function() { if (this.fixture) { this.fixture.tearDown(); } }, /** * Called to run this test's body. */ runTest: function() { if (this.body && this.fixture) { this.fixture.runTest(this.body); } }, /** * Called after a test is run (in testDone) to test accessibility. */ runAccessibilityAudit: function() { if (this.fixture) { this.fixture.runAccessibilityAudit(); } }, /** * Runs this test case with |this| set to the |fixture|. * * Note: Tests created with TEST_F may depend upon |this| being set to an * instance of this.fixture. The current implementation of TEST creates a * dummy constructor, but tests created with TEST should not rely on |this| * being set. * @type {Function} */ run: function() { try { this.setUp(); } catch (e) { // Mock4JSException doesn't inherit from Error, so fall back on // toString(). console.error(e.stack || e.toString()); } if (!this.deferred_) { this.runTest(); } // tearDown called by testDone(). }, /** * Cause this TestCase to be deferred (don't call runTest()) until the * returned function is called. * @type {Function} * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {...*} var_args Arguments to pass when running the * |currentTestCase|. * @return {function(): void} A function that will run this TestCase when * called. */ deferRunTest: function(whenTestDone) { this.deferred_ = true; var savedArgs = new SaveMockArguments(); var completionAction = new CallFunctionAction( this, savedArgs, this.runTest, Array.prototype.slice.call(arguments, 1)); var runAll = new RunAllAction(true, whenTestDone, [completionAction]); return function() { savedArgs.arguments = Array.prototype.slice.call(arguments); runAll.invoke(); }; }, }; /** * Registry of javascript-defined callbacks for {@code chrome.send}. * @type {Object} */ var sendCallbacks = {}; /** * Registers the message, object and callback for {@code chrome.send} * @param {string} name The name of the message to route to this |callback|. * @param {Object} messageHandler Pass as |this| when calling the |callback|. * @param {function(...)} callback Called by {@code chrome.send}. * @see sendCallbacks */ function registerMessageCallback(name, messageHandler, callback) { sendCallbacks[name] = [messageHandler, callback]; } /** * Register all methods of {@code mockClass.prototype} with messages of the * same name as the method, using the proxy of the |mockObject| as the * |messageHandler| when registering. * @param {Mock4JS.Mock} mockObject The mock to register callbacks against. * @param {function(new:Object)} mockClAss Constructor for the mocked class. * @see registerMessageCallback * @see overrideChrome */ function registerMockMessageCallbacks(mockObject, mockClass) { if (!deferGlobalOverrides && !originalChrome) { overrideChrome(); } var mockProxy = mockObject.proxy(); for (var func in mockClass.prototype) { if (typeof mockClass.prototype[func] === 'function') { registerMessageCallback(func, mockProxy, mockProxy[func]); } } } /** * Holds the mapping of name -> global override information. * @type {Object} */ var globalOverrides = {}; /** * When preloading JavaScript libraries, this is true until the * DOMContentLoaded event has been received as globals cannot be overridden * until the page has loaded its JavaScript. * @type {boolean} */ var deferGlobalOverrides = false; /** * Override the global function |funcName| with its registered mock. This * should not be called twice for the same |funcName|. * @param {string} funcName The name of the global function to override. */ function overrideGlobal(funcName) { assertNotEquals(undefined, this[funcName]); var globalOverride = globalOverrides[funcName]; assertNotEquals(undefined, globalOverride); assertEquals(undefined, globalOverride.original); globalOverride.original = this[funcName]; this[funcName] = globalOverride.callback.bind(globalOverride.object); } /** * Registers the global function name, object and callback. * @param {string} name The name of the message to route to this |callback|. * @param {Object} object Pass as |this| when calling the |callback|. * @param {function(...)} callback Called by {@code chrome.send}. * @see overrideGlobal */ function registerMockGlobal(name, object, callback) { assertEquals(undefined, globalOverrides[name]); globalOverrides[name] = { object: object, callback: callback, }; if (!deferGlobalOverrides) { overrideGlobal(name); } } /** * Registers the mock API call and its function. * @param {string} name The '_'-separated name of the API call. * @param {function(...)} theFunction Mock function for this API call. */ function registerMockApi(name, theFunction) { var path = name.split('_'); var namespace = this; for (var i = 0; i < path.length - 1; i++) { var fieldName = path[i]; if (!namespace[fieldName]) { namespace[fieldName] = {}; } namespace = namespace[fieldName]; } var fieldName = path[path.length - 1]; namespace[fieldName] = theFunction; } /** * Empty function for use in making mocks. * @const */ function emptyFunction() {} /** * Make a mock from the supplied |methodNames| array. * @param {Array<string>} methodNames Array of names of methods to mock. * @return {Function} Constructor with prototype filled in with methods * matching |methodNames|. */ function makeMockClass(methodNames) { function MockConstructor() {} for (var i = 0; i < methodNames.length; i++) { MockConstructor.prototype[methodNames[i]] = emptyFunction; } return MockConstructor; } /** * Create a new class to handle |functionNames|, add method 'functions()' * that returns a container of standalone functions based on the mock class * members, and return it. * @return {Mock} Mock handler class. */ function makeMockFunctions(functionNames) { var MockClass = makeMockClass(functionNames); var mockFunctions = mock(MockClass); var mockProxy = mockFunctions.proxy(); mockFunctions.functions_ = {}; for (var func in MockClass.prototype) { if (typeof MockClass.prototype[func] === 'function') { mockFunctions.functions_[func] = mockProxy[func].bind(mockProxy); } } mockFunctions.functions = function() { return this.functions_; }; return mockFunctions; } /** * Register all methods of {@code mockClass.prototype} as overrides to global * functions of the same name as the method, using the proxy of the * |mockObject| to handle the functions. * @param {Mock4JS.Mock} mockObject The mock to register callbacks against. * @param {function(new:Object)} mockClass Constructor for the mocked class. * @see registerMockGlobal */ function registerMockGlobals(mockObject, mockClass) { var mockProxy = mockObject.proxy(); for (var func in mockClass.prototype) { if (typeof mockClass.prototype[func] === 'function') { registerMockGlobal(func, mockProxy, mockProxy[func]); } } } /** * Register all functions in |mockObject.functions()| as global API calls. * @param {Mock4JS.Mock} mockObject The mock to register callbacks against. * @see registerMockApi */ function registerMockApis(mockObject) { var functions = mockObject.functions(); for (var func in functions) { if (typeof functions[func] === 'function') { registerMockApi(func, functions[func]); } } } /** * Overrides {@code chrome.send} for routing messages to javascript * functions. Also falls back to sending with the original chrome object. * @param {string} messageName The message to route. */ function send(messageName) { var callback = sendCallbacks[messageName]; if (callback != undefined) { callback[1].apply(callback[0], Array.prototype.slice.call(arguments, 1)); } else { this.__proto__.send.apply(this.__proto__, arguments); } } /** * true when testDone has been called. * @type {boolean} */ var testIsDone = false; /** * Holds the errors, if any, caught by expects so that the test case can * fail. Cleared when results are reported from runTest() or testDone(). * @type {Array<Error>} */ var errors = []; /** * URL to dummy WebUI page for testing framework. * @type {string} */ var DUMMY_URL = 'chrome://DummyURL'; /** * Resets test state by clearing |errors| and |testIsDone| flags. */ function resetTestState() { errors.splice(0, errors.length); testIsDone = false; } /** * Notifies the running browser test of the test results. Clears |errors|. * @param {Array<boolean, string>=} result When passed, this is used for the * testResult message. */ function testDone(result) { if (!testIsDone) { testIsDone = true; if (currentTestCase) { var ok = true; ok = createExpect( currentTestCase.runAccessibilityAudit.bind(currentTestCase)) .call(null) && ok; ok = createExpect(currentTestCase.tearDown.bind(currentTestCase)) .call(null) && ok; if (!ok && result) { result = [false, errorsToMessage(errors, result[1])]; } currentTestCase = null; } if (!result) { result = testResult(); } if (hasWindow && window.webUiTest) { let testRunner; if (webUiTest.mojom.TestRunnerPtr) { // For mojo WebUI tests. testRunner = new webUiTest.mojom.TestRunnerPtr(); Mojo.bindInterface( webUiTest.mojom.TestRunner.name, mojo.makeRequest(testRunner).handle); } else if (webUiTest.mojom.TestRunnerProxy) { // For mojo-lite WebUI tests. testRunner = webUiTest.mojom.TestRunner.getProxy(); } else { assertNotReached( 'Mojo bindings found, but no valid test interface loaded'); } if (result[0]) { testRunner.testComplete(); } else { testRunner.testComplete(result[1]); } } else if (chrome.send) { // For WebUI and v8 unit tests. chrome.send('testResult', result); } else if (window.domAutomationController.send) { // For extension tests. valueResult = {'result': result[0], message: result[1]}; window.domAutomationController.send(JSON.stringify(valueResult)); } else { assertNotReached('No test framework available'); } errors.splice(0, errors.length); } else { console.warn('testIsDone already'); } } /** * Converts each Error in |errors| to a suitable message, adding them to * |message|, and returns the message string. * @param {Array<Error>} errors Array of errors to add to |message|. * @param {string=} opt_message Message to append error messages to. * @return {string} |opt_message| + messages of all |errors|. */ function errorsToMessage(errors, opt_message) { var message = ''; if (opt_message) { message += opt_message + '\n'; } for (var i = 0; i < errors.length; ++i) { var errorMessage = errors[i].stack || errors[i].message; message += 'Failed: ' + currentTestFunction + '(' + currentTestArguments.map(JSON.stringify) + ')\n' + errorMessage; } return message; } /** * Returns [success, message] & clears |errors|. * @param {boolean} errorsOk When true, errors are ok. * @return {Array<boolean, string>} */ function testResult(errorsOk) { var result = [true, '']; if (errors.length) { result = [!!errorsOk, errorsToMessage(errors)]; } return result; } // Asserts. // Use the following assertions to verify a condition within a test. /** * @param {boolean} value The value to check. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertTrue(value, opt_message) { chai.assert.isTrue(value, opt_message); } /** * @param {boolean} value The value to check. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertFalse(value, opt_message) { chai.assert.isFalse(value, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertGE(value1, value2, opt_message) { chai.expect(value1).to.be.at.least(value2, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertGT(value1, value2, opt_message) { chai.assert.isAbove(value1, value2, opt_message); } /** * @param {*} expected The expected value. * @param {*} actual The actual value. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertEquals(expected, actual, opt_message) { chai.assert.strictEqual(actual, expected, opt_message); } /** * @param {*} expected * @param {*} actual * {string=} opt_message * @throws {Error} */ function assertDeepEquals(expected, actual, opt_message) { chai.assert.deepEqual(actual, expected, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertLE(value1, value2, opt_message) { chai.expect(value1).to.be.at.most(value2, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertLT(value1, value2, opt_message) { chai.assert.isBelow(value1, value2, opt_message); } /** * @param {*} expected The expected value. * @param {*} actual The actual value. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertNotEquals(expected, actual, opt_message) { chai.assert.notStrictEqual(actual, expected, opt_message); } /** * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertNotReached(opt_message) { chai.assert.fail(null, null, opt_message); } /** * @param {Function} testFunction * @param {Function=|string=|RegExp=} opt_expected The expected Error * constructor, partial or complete error message string, or RegExp to * test the error message. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertThrows(testFunction, opt_expected, opt_message) { chai.assert.throws(testFunction, opt_expected, opt_message); } /** * Run an accessibility audit on the current page state. * @type {Function} * @param {Array} a11yResults * @param {axs.AuditConfiguration=} opt_config * @return {boolean} Whether there were any errors or warnings * @private */ function runAccessibilityAudit(a11yResults, opt_config) { var auditResults = axs.Audit.run(opt_config); for (var i = 0; i < auditResults.length; i++) { var auditResult = auditResults[i]; if (auditResult.result == axs.constants.AuditResult.FAIL) { var auditRule = auditResult.rule; // TODO(aboxhall): more useful error messages (sadly non-trivial) a11yResults.push(auditResult); } } // TODO(aboxhall): have strict (no errors or warnings) vs non-strict // (warnings ok) // TODO(aboxhall): some kind of info logging for warnings only?? return (a11yResults.length == 0); } /** * Concatenates the accessibility error messages for each result in * |a11yResults| and * |a11yWarnings| in to an accessibility report, appends it to the given * |message| and returns the resulting message string. * @param {Array<string>} a11yResults The list of accessibility results * @return {string} |message| + accessibility report. */ function accessibilityAuditReport(a11yResults, message) { message = message ? message + '\n\n' : '\n'; message += 'Accessibility issues found on ' + window.location.href + '\n'; message += axs.Audit.createReport(a11yResults); return message; } /** * Asserts that the current page state passes the accessibility audit. * @param {Array=} opt_results Array to fill with results, if desired. */ function assertAccessibilityOk(opt_results) { var a11yResults = opt_results || []; var auditConfig = currentTestCase.fixture.accessibilityAuditConfig; if (!runAccessibilityAudit(a11yResults, auditConfig)) { throw new Error(accessibilityAuditReport(a11yResults)); } } /** * Creates a function based upon a function that throws an exception on * failure. The new function stuffs any errors into the |errors| array for * checking by runTest. This allows tests to continue running other checks, * while failing the overall test if any errors occurred. * @param {Function} assertFunc The function which may throw an Error. * @return {function(...*):bool} A function that applies its arguments to * |assertFunc| and returns true if |assertFunc| passes. * @see errors * @see runTestFunction */ function createExpect(assertFunc) { return function() { try { assertFunc.apply(null, arguments); } catch (e) { errors.push(e); return false; } return true; }; } /** * This is the starting point for tests run by WebUIBrowserTest. If an error * occurs, it reports a failure and a message created by joining individual * error messages. This supports sync tests and async tests by calling * testDone() when |isAsync| is not true, relying on async tests to call * testDone() when they complete. * @param {boolean} isAsync When false, call testDone() with the test result * otherwise only when assertions are caught. * @param {string} testFunction The function name to call. * @param {Array} testArguments The arguments to call |testFunction| with. * @return {boolean} true always to signal successful execution (but not * necessarily successful results) of this test. * @see errors * @see runTestFunction */ function runTest(isAsync, testFunction, testArguments) { // If waiting for user to attach a debugger, retry in 1 second. if (waitUser) { setTimeout(runTest, 1000, isAsync, testFunction, testArguments); return true; } // Avoid eval() if at all possible, since it will not work on pages // that have enabled content-security-policy. var testBody = this[testFunction]; // global object -- not a method. var testName = testFunction; // Depending on how we were called, |this| might not resolve to the global // context. if (testName == 'RUN_TEST_F' && testBody === undefined) { testBody = RUN_TEST_F; } if (typeof testBody === 'undefined') { testBody = eval(testFunction); testName = testBody.toString(); } if (testBody != RUN_TEST_F) { console.log('Running test ' + testName); } // Async allow expect errors, but not assert errors. var result = runTestFunction(testFunction, testBody, testArguments, isAsync); if (!isAsync || !result[0]) { testDone(result); } return true; } /** * This is the guts of WebUIBrowserTest. It runs the test surrounded by an * expect to catch Errors. If |errors| is non-empty, it reports a failure and * a message by joining |errors|. Consumers can use this to use assert/expect * functions asynchronously, but are then responsible for reporting errors to * the browser themselves through testDone(). * @param {string} testFunction The function name to report on failure. * @param {Function} testBody The function to call. * @param {Array} testArguments The arguments to call |testBody| with. * @param {boolean} onlyAssertFails When true, only assertions cause failing * testResult. * @return {Array<boolean, string>} [test-succeeded, message-if-failed] * @see createExpect * @see testResult */ function runTestFunction( testFunction, testBody, testArguments, onlyAssertFails) { currentTestFunction = testFunction; currentTestArguments = testArguments; var ok = createExpect(testBody).apply(null, testArguments); return testResult(onlyAssertFails && ok); } /** * Creates a new test case for the given |testFixture| and |testName|. Assumes * |testFixture| describes a globally available subclass of type Test. * @param {string} testFixture The fixture for this test case. * @param {string} testName The name for this test case. * @return {TestCase} A newly created TestCase. */ function createTestCase(testFixture, testName) { var fixtureConstructor = this[testFixture]; assertTrue( !!fixtureConstructor, `The testFixture \'${testFixture}\' was not found.`); var testBody = fixtureConstructor.testCaseBodies[testName]; assertTrue( !!testBody, `Test \'${testName} was not found in \'${testFixture}\'.`); var fixture = new fixtureConstructor(); fixture.name = testFixture; return new TestCase(testName, fixture, testBody); } /** * Overrides the |chrome| object to enable mocking calls to chrome.send(). */ function overrideChrome() { if (originalChrome) { console.error('chrome object already overridden'); return; } originalChrome = chrome; chrome = { __proto__: originalChrome, send: send, originalSend: originalChrome.send.bind(originalChrome), }; } /** * Used by WebUIBrowserTest to preload the javascript libraries at the * appropriate time for javascript injection into the current page. This * creates a test case and calls its preLoad for any early initialization such * as registering handlers before the page's javascript runs it's OnLoad * method. This is called before the page is loaded, so the |chrome| object is * not yet bound and this DOMContentLoaded listener will be called first to * override |chrome| in order to route messages registered in |sendCallbacks|. * @param {string} testFixture The test fixture name. * @param {string} testName The test name. * @see sendCallbacks */ function preloadJavascriptLibraries(testFixture, testName) { deferGlobalOverrides = true; // The document seems to change from the point of preloading to the point of // events (and doesn't fire), whereas the window does not. Listening to the // capture phase allows this event to fire first. window.addEventListener('DOMContentLoaded', function() { if (chrome.send) { overrideChrome(); } // Override globals at load time so they will be defined. assertTrue(deferGlobalOverrides); deferGlobalOverrides = false; for (var funcName in globalOverrides) { overrideGlobal(funcName); } }, true); currentTestCase = createTestCase(testFixture, testName); currentTestCase.preLoad(); } /** * Sets |waitUser| to true so |runTest| function waits for user to attach a * debugger. */ function setWaitUser() { waitUser = true; console.log('Waiting for debugger...'); console.log('Run: go() in the JS console when you are ready.'); } /** * Sets |waitUser| to false, so |runTest| function stops waiting for user and * start running the tests. */ function go() { waitUser = false; } /** * During generation phase, this outputs; do nothing at runtime. */ function GEN() {} /** * During generation phase, this outputs; do nothing at runtime. */ function GEN_INCLUDE() {} /** * At runtime, register the testName with a test fixture. Since this method * doesn't have a test fixture, create a dummy fixture to hold its |name| * and |testCaseBodies|. * @param {string} testCaseName The name of the test case. * @param {string} testName The name of the test function. * @param {Function} testBody The body to execute when running this test. */ function TEST(testCaseName, testName, testBody) { var fixtureConstructor = this[testCaseName]; if (fixtureConstructor === undefined) { fixtureConstructor = function() {}; this[testCaseName] = fixtureConstructor; fixtureConstructor.prototype = { __proto__: Test.prototype, name: testCaseName, }; fixtureConstructor.testCaseBodies = {}; } fixtureConstructor.testCaseBodies[testName] = testBody; } /** * At runtime, register the testName with its fixture. Stuff the |name| into * the |testFixture|'s prototype, if needed, and the |testCaseBodies| into its * constructor. * @param {string} testFixture The name of the test fixture class. * @param {string} testName The name of the test function. * @param {Function} testBody The body to execute when running this test. * @param {string=} opt_preamble C++ code to be generated before the test. Does * nothing here in the runtime phase. */ function TEST_F(testFixture, testName, testBody, opt_preamble) { var fixtureConstructor = this[testFixture]; if (!fixtureConstructor.prototype.name) { fixtureConstructor.prototype.name = testFixture; } if (fixtureConstructor['testCaseBodies'] === undefined) { fixtureConstructor.testCaseBodies = {}; } fixtureConstructor.testCaseBodies[testName] = testBody; } /** * Similar to TEST_F above but with a mandatory |preamble|. * @param {string} preamble C++ code to be generated before the test. Does * nothing here in the runtime phase. * @param {string} testFixture The name of the test fixture class. * @param {string} testName The name of the test function. * @param {Function} testBody The body to execute when running this test. */ function TEST_F_WITH_PREAMBLE(preamble, testFixture, testName, testBody) { TEST_F(testFixture, testName, testBody); } /** * RunJavascriptTestF uses this as the |testFunction| when invoking * runTest. If |currentTestCase| is non-null at this point, verify that * |testFixture| and |testName| agree with the preloaded values. Create * |currentTestCase|, if needed, run it, and clear the |currentTestCase|. * @param {string} testFixture The name of the test fixture class. * @param {string} testName The name of the test function. * @see preloadJavascriptLibraries * @see runTest */ function RUN_TEST_F(testFixture, testName) { if (!currentTestCase) { currentTestCase = createTestCase(testFixture, testName); } assertEquals(currentTestCase.name, testName); assertEquals(currentTestCase.fixture.name, testFixture); console.log('Running TestCase ' + testFixture + '.' + testName); currentTestCase.run(); } /** * This Mock4JS matcher object pushes each |actualArgument| parameter to * match() calls onto |args|. * @param {Array} args The array to push |actualArgument| onto. * @param {Object} realMatcher The real matcher check arguments with. * @constructor * @extends {realMatcher} */ function SaveMockArgumentMatcher(args, realMatcher) { this.arguments_ = args; this.realMatcher_ = realMatcher; } SaveMockArgumentMatcher.prototype = { /** * Holds the arguments to push each |actualArgument| onto. * @type {Array} * @private */ arguments_: null, /** * The real Mock4JS matcher object to check arguments with. * @type {Object} */ realMatcher_: null, /** * Pushes |actualArgument| onto |arguments_| and call |realMatcher_|. Clears * |arguments_| on non-match. * @param {*} actualArgument The argument to match and save. * @return {boolean} Result of calling the |realMatcher|. */ argumentMatches: function(actualArgument) { this.arguments_.push(actualArgument); var match = this.realMatcher_.argumentMatches(actualArgument); if (!match) { this.arguments_.splice(0, this.arguments_.length); } return match; }, /** * Proxy to |realMatcher_| for description. * @return {string} Description of this Mock4JS matcher. */ describe: function() { return this.realMatcher_.describe(); }, }; /** * Actions invoked by Mock4JS's "will()" syntax do not receive arguments from * the mocked method. This class works with SaveMockArgumentMatcher to save * arguments so that the invoked Action can pass arguments through to the * invoked function. * @param {!Object} realMatcher The real matcher to perform matching with. * @constructor */ function SaveMockArguments() { this.arguments = []; } SaveMockArguments.prototype = { /** * Wraps the |realMatcher| with an object which will push its argument onto * |arguments| and call realMatcher. * @param {Object} realMatcher A Mock4JS matcher object for this argument. * @return {SaveMockArgumentMatcher} A new matcher which will push its * argument onto |arguments|. */ match: function(realMatcher) { return new SaveMockArgumentMatcher(this.arguments, realMatcher); }, /** * Remember the argument passed to this stub invocation. * @type {Array} */ arguments: null, }; /** * CallFunctionAction is provided to allow mocks to have side effects. * @param {Object} obj The object to set |this| to when calling |func_|. * @param {?SaveMockArguments} savedArgs when non-null, saved arguments are * passed to |func|. * @param {Function} func The function to call. * @param {Array=} args Any arguments to pass to func. * @constructor */ function CallFunctionAction(obj, savedArgs, func, args) { this.obj_ = obj; this.savedArgs_ = savedArgs; this.func_ = func; this.args_ = args ? args : []; } CallFunctionAction.prototype = { /** * Set |this| to |obj_| when calling |func_|. * @type {?Object} */ obj_: null, /** * The SaveMockArguments to hold arguments when invoking |func_|. * @type {?SaveMockArguments} * @private */ savedArgs_: null, /** * The function to call when invoked. * @type {!Function} * @private */ func_: null, /** * Arguments to pass to |func_| when invoked. * @type {!Array} */ args_: null, /** * Accessor for |func_|. * @return {Function} The function to invoke. */ get func() { return this.func_; }, /** * Called by Mock4JS when using .will() to specify actions for stubs() or * expects(). Clears |savedArgs_| so it can be reused. * @return The results of calling |func_| with the concatenation of * |savedArgs_| and |args_|. */ invoke: function() { var prependArgs = []; if (this.savedArgs_) { prependArgs = this.savedArgs_.arguments.splice(0, this.savedArgs_.arguments.length); } return this.func.apply(this.obj_, prependArgs.concat(this.args_)); }, /** * Describe this action to Mock4JS. * @return {string} A description of this action. */ describe: function() { return 'calls the given function with saved arguments and ' + this.args_; } }; /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {Function} func The function to call when the method is invoked. * @param {...*} var_args Arguments to pass when calling func. * @return {CallFunctionAction} Action for use in will. */ function callFunction(func) { return new CallFunctionAction( null, null, func, Array.prototype.slice.call(arguments, 1)); } /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {SaveMockArguments} savedArgs Arguments saved with this object * are passed to |func|. * @param {Function} func The function to call when the method is invoked. * @param {...*} var_args Arguments to pass when calling func. * @return {CallFunctionAction} Action for use in will. */ function callFunctionWithSavedArgs(savedArgs, func) { return new CallFunctionAction( null, savedArgs, func, Array.prototype.slice.call(arguments, 2)); } /** * CallGlobalAction as a subclass of CallFunctionAction looks up the original * global object in |globalOverrides| using |funcName| as the key. This allows * tests, which need to wait until a global function to be called in order to * start the test to run the original function. When used with runAllActions * or runAllActionsAsync, Mock4JS expectations may call start or continue the * test after calling the original function. * @param {?SaveMockArguments} savedArgs when non-null, saved arguments are * passed to the global function |funcName|. * @param {string} funcName The name of the global function to call. * @param {Array} args Any arguments to pass to func. * @constructor * @extends {CallFunctionAction} * @see globalOverrides */ function CallGlobalAction(savedArgs, funcName, args) { CallFunctionAction.call(this, null, savedArgs, funcName, args); } CallGlobalAction.prototype = { __proto__: CallFunctionAction.prototype, /** * Fetch and return the original global function to call. * @return {Function} The global function to invoke. * @override */ get func() { var func = globalOverrides[this.func_].original; assertNotEquals(undefined, func); return func; }, }; /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {SaveMockArguments} savedArgs Arguments saved with this object * are passed to the global function |funcName|. * @param {string} funcName The name of a registered mock global function to * call when the method is invoked. * @param {...*} var_args Arguments to pass when calling func. * @return {CallGlobalAction} Action for use in Mock4JS will(). */ function callGlobalWithSavedArgs(savedArgs, funcName) { return new CallGlobalAction( savedArgs, funcName, Array.prototype.slice.call(arguments, 2)); } /** * When to call testDone(). * @enum {number} */ var WhenTestDone = { /** * Default for the method called. */ DEFAULT: -1, /** * Never call testDone(). */ NEVER: 0, /** * Call testDone() on assert failure. */ ASSERT: 1, /** * Call testDone() if there are any assert or expect failures. */ EXPECT: 2, /** * Always call testDone(). */ ALWAYS: 3, }; /** * Runs all |actions|. * @param {boolean} isAsync When true, call testDone() on Errors. * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {Array<Object>} actions Actions to run. * @constructor */ function RunAllAction(isAsync, whenTestDone, actions) { this.isAsync_ = isAsync; this.whenTestDone_ = whenTestDone; this.actions_ = actions; } RunAllAction.prototype = { /** * When true, call testDone() on Errors. * @type {boolean} * @private */ isAsync_: false, /** * Call testDone() at appropriate time. * @type {WhenTestDone} * @private * @see WhenTestDone */ whenTestDone_: WhenTestDone.ASSERT, /** * Holds the actions to execute when invoked. * @type {Array} * @private */ actions_: null, /** * Runs all |actions_|, returning the last one. When running in sync mode, * throws any exceptions to be caught by runTest() or * runTestFunction(). Call testDone() according to |whenTestDone_| setting. */ invoke: function() { try { var result; for (var i = 0; i < this.actions_.length; ++i) { result = this.actions_[i].invoke(); } if ((this.whenTestDone_ == WhenTestDone.EXPECT && errors.length) || this.whenTestDone_ == WhenTestDone.ALWAYS) { testDone(); } return result; } catch (e) { if (!(e instanceof Error)) { e = new Error(e.toString()); } if (!this.isAsync_) { throw e; } errors.push(e); if (this.whenTestDone_ != WhenTestDone.NEVER) { testDone(); } } }, /** * Describe this action to Mock4JS. * @return {string} A description of this action. */ describe: function() { return 'Calls all actions: ' + this.actions_; }, }; /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {...Object} var_actions Actions to run. * @return {RunAllAction} Action for use in will. */ function runAllActions() { return new RunAllAction( false, WhenTestDone.NEVER, Array.prototype.slice.call(arguments)); } /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {...Object} var_actions Actions to run. * @return {RunAllAction} Action for use in will. */ function runAllActionsAsync(whenTestDone) { return new RunAllAction( true, whenTestDone, Array.prototype.slice.call(arguments, 1)); } /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * Creates an action for will() that invokes a callback that the tested code * passes to a mocked function. * @param {SaveMockArguments} savedArgs Arguments that will contain the * callback once the mocked function is called. * @param {number} callbackParameter Index of the callback parameter in * |savedArgs|. * @param {...Object} var_args Arguments to pass to the callback. * @return {CallFunctionAction} Action for use in will(). */ function invokeCallback(savedArgs, callbackParameter, var_args) { var callbackArguments = Array.prototype.slice.call(arguments, 2); return callFunction(function() { savedArgs.arguments[callbackParameter].apply(null, callbackArguments); // Mock4JS does not clear the saved args after invocation. // To allow reuse of the same SaveMockArguments for multiple // invocations with similar arguments, clear them here. savedArgs.arguments.splice(0, savedArgs.arguments.length); }); } /** * Mock4JS matcher object that matches the actual argument and the expected * value iff their JSON representations are same. * @param {Object} expectedValue * @constructor */ function MatchJSON(expectedValue) { this.expectedValue_ = expectedValue; } MatchJSON.prototype = { /** * Checks that JSON representation of the actual and expected arguments are * same. * @param {Object} actualArgument The argument to match. * @return {boolean} Result of the comparison. */ argumentMatches: function(actualArgument) { return JSON.stringify(this.expectedValue_) === JSON.stringify(actualArgument); }, /** * Describes the matcher. * @return {string} Description of this Mock4JS matcher. */ describe: function() { return 'eqJSON(' + JSON.stringify(this.expectedValue_) + ')'; }, }; /** * Builds a MatchJSON argument matcher for a given expected value. * @param {Object} expectedValue * @return {MatchJSON} Resulting Mock4JS matcher. */ function eqJSON(expectedValue) { return new MatchJSON(expectedValue); } /** * Mock4JS matcher object that matches the actual argument and the expected * value iff the the string representation of the actual argument is equal to * the expected value. * @param {string} expectedValue * @constructor */ function MatchToString(expectedValue) { this.expectedValue_ = expectedValue; } MatchToString.prototype = { /** * Checks that the the string representation of the actual argument matches * the expected value. * @param {*} actualArgument The argument to match. * @return {boolean} Result of the comparison. */ argumentMatches: function(actualArgument) { return this.expectedValue_ === String(actualArgument); }, /** * Describes the matcher. * @return {string} Description of this Mock4JS matcher. */ describe: function() { return 'eqToString("' + this.expectedValue_ + '")'; }, }; /** * Builds a MatchToString argument matcher for a given expected value. * @param {Object} expectedValue * @return {MatchToString} Resulting Mock4JS matcher. */ function eqToString(expectedValue) { return new MatchToString(expectedValue); } /** * Exports assertion methods. All assertion methods delegate to the chai.js * assertion library. */ function exportChaiAsserts() { exports.assertTrue = assertTrue; exports.assertFalse = assertFalse; exports.assertGE = assertGE; exports.assertGT = assertGT; exports.assertEquals = assertEquals; exports.assertDeepEquals = assertDeepEquals; exports.assertLE = assertLE; exports.assertLT = assertLT; exports.assertNotEquals = assertNotEquals; exports.assertNotReached = assertNotReached; exports.assertThrows = assertThrows; } /** * Exports expect methods. 'expect*' methods allow tests to run until the end * even in the presence of failures. */ function exportExpects() { exports.expectTrue = createExpect(assertTrue); exports.expectFalse = createExpect(assertFalse); exports.expectGE = createExpect(assertGE); exports.expectGT = createExpect(assertGT); exports.expectEquals = createExpect(assertEquals); exports.expectDeepEquals = createExpect(assertDeepEquals); exports.expectLE = createExpect(assertLE); exports.expectLT = createExpect(assertLT); exports.expectNotEquals = createExpect(assertNotEquals); exports.expectNotReached = createExpect(assertNotReached); exports.expectAccessibilityOk = createExpect(assertAccessibilityOk); exports.expectThrows = createExpect(assertThrows); } /** * Exports methods related to Mock4JS mocking. */ function exportMock4JsHelpers() { exports.callFunction = callFunction; exports.callFunctionWithSavedArgs = callFunctionWithSavedArgs; exports.callGlobalWithSavedArgs = callGlobalWithSavedArgs; exports.eqJSON = eqJSON; exports.eqToString = eqToString; exports.invokeCallback = invokeCallback; exports.SaveMockArguments = SaveMockArguments; // Import the Mock4JS helpers. Mock4JS.addMockSupport(exports); } // Exports. testing.Test = Test; exports.testDone = testDone; exportChaiAsserts(); exports.assertAccessibilityOk = assertAccessibilityOk; exportExpects(); exportMock4JsHelpers(); exports.preloadJavascriptLibraries = preloadJavascriptLibraries; exports.setWaitUser = setWaitUser; exports.go = go; exports.registerMessageCallback = registerMessageCallback; exports.registerMockGlobals = registerMockGlobals; exports.registerMockMessageCallbacks = registerMockMessageCallbacks; exports.resetTestState = resetTestState; exports.runAccessibilityAudit = runAccessibilityAudit; exports.runAllActions = runAllActions; exports.runAllActionsAsync = runAllActionsAsync; exports.runTest = runTest; exports.runTestFunction = runTestFunction; exports.DUMMY_URL = DUMMY_URL; exports.TEST = TEST; exports.TEST_F = TEST_F; exports.TEST_F_WITH_PREAMBLE = TEST_F_WITH_PREAMBLE; exports.RUNTIME_TEST_F = TEST_F; exports.GEN = GEN; exports.GEN_INCLUDE = GEN_INCLUDE; exports.WhenTestDone = WhenTestDone; })(this); ; //# sourceURL=file:///b/s/w/ir/chrome/test/data/webui/test_api.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Common testing utilities. /** * Shortcut for document.getElementById. * @param {string} id of the element. * @return {HTMLElement} with the id. */ function $(id) { return document.getElementById(id); } /** * @constructor */ var TestUtils = function() {}; /** * Extracts some inlined html encoded as a comment inside a function, * so you can use it like this: * * this.appendDoc(function() {/*! * <p>Html goes here</p> * * /}); * * @param {Function} commentEncodedHtml The html , embedded as a * comment inside an anonymous function - see example, above. * @param {!Array=} opt_args Optional arguments to be substituted in the form * $0, ... within the code block. * @return {string} The html text. */ TestUtils.extractHtmlFromCommentEncodedString = function( commentEncodedHtml, opt_args) { var stringified = commentEncodedHtml.toString(); if (opt_args) { for (var i = 0; i < opt_args.length; i++) stringified = stringified.replace('$' + i, opt_args[i]); } return stringified.replace(/^[^\/]+\/\*!?/, '').replace(/\*\/[^\/]+$/, ''); }; /** * Creates a data url for a document. * @param {function() : void} doc Snippet wrapped inside of a function. * @return {string} */ TestUtils.createUrlForDoc = function(doc) { var docString = TestUtils.extractHtmlFromCommentEncodedString(doc); return 'data:text/html,<!doctype html>' + encodeURIComponent(TestUtils.collapseWhitespace( docString.replace(/[\n\r]/g, '').trim())); }; /** * Collapses inner whitespace. * @param {string} str * @return {string} */ TestUtils.collapseWhitespace = function(str) { return str.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, ''); }; /** * Similar to |TEST_F|. Generates a test for the given |testFixture|, * |testName|, and |testFunction|. * Used this variant when an |isAsync| fixture wants to temporarily mix in an * sync test. * @param {string} testFixture Fixture name. * @param {string} testName Test name. * @param {function} testFunction The test impl. */ function SYNC_TEST_F(testFixture, testName, testFunction) { TEST_F(testFixture, testName, function() { this.newCallback(testFunction)(); }); } ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/common.js // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Creates wrappers for callbacks and calls testDone() when all callbacks * have been invoked. * @param {testing.Test} fixture */ function CallbackHelper(fixture) { /** @type {Object} fixture */ this.fixture_ = fixture; /** @type {number} */ this.pendingCallbacks_ = 0; } CallbackHelper.prototype = { /** * @param {Function=} opt_callback * @return {Function} */ wrap: function(opt_callback) { var callback = opt_callback || function() {}; var savedArgs = new SaveMockArguments(); var lastCall = null; var completionAction = callFunctionWithSavedArgs(savedArgs, function() { if (lastCall) { throw new Error('Called more than once, first call here: ' + lastCall); } else { lastCall = new Error().stack; } callback.apply(this.fixture_, arguments); if (--this.pendingCallbacks_ <= 0) CallbackHelper.testDone_(); }.bind(this)); // runAllActionsAsync catches exceptions and puts them in the test // framework's list of errors and fails the test if appropriate. var runAll = runAllActionsAsync(WhenTestDone.ASSERT, completionAction); ++this.pendingCallbacks_; return function() { savedArgs.arguments = Array.prototype.slice.call(arguments); runAll.invoke(); }; } }; /** * @private */ CallbackHelper.testDone_ = this.testDone; // Remove testDone for public use since directly using it conflicts with // this callback helper. delete this.testDone; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/callback_helper.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. GEN_INCLUDE(['common.js', 'callback_helper.js']); /** * Base test fixture for ChromeVox end to end tests. * * These tests run against production ChromeVox inside of the extension's * background page context. * @constructor */ function ChromeVoxE2ETest() { this.callbackHelper_ = new CallbackHelper(this); } ChromeVoxE2ETest.prototype = { __proto__: testing.Test.prototype, /** * @override * No UI in the background context. */ runAccessibilityChecks: false, /** @override */ isAsync: true, /** @override */ browsePreload: null, /** @override */ testGenCppIncludes: function() { GEN(` #include "ash/accessibility/accessibility_delegate.h" #include "ash/shell.h" #include "base/bind.h" #include "base/callback.h" #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" #include "chrome/common/extensions/extension_constants.h" `); }, /** @override */ testGenPreamble: function() { GEN(` base::Closure load_cb = base::Bind(&chromeos::AccessibilityManager::EnableSpokenFeedback, base::Unretained(chromeos::AccessibilityManager::Get()), true); WaitForExtension(extension_misc::kChromeVoxExtensionId, load_cb); `); }, /** * Launch a new tab, wait until tab status complete, then run callback. * @param {function() : void} doc Snippet wrapped inside of a function. * @param {function()} callback Called once the document is ready. */ runWithLoadedTab: function(doc, callback) { this.launchNewTabWithDoc(doc, function(tab) { chrome.tabs.onUpdated.addListener(function(tabId, changeInfo) { if (tabId == tab.id && changeInfo.status == 'complete') { callback(tabId); } }); }); }, /** * Launches the given document in a new tab. * @param {function() : void} doc Snippet wrapped inside of a function. * @param {function(url: string)} opt_callback Called once the * document is created. */ runWithTab: function(doc, opt_callback) { var url = TestUtils.createUrlForDoc(doc); var createParams = {active: true, url: url}; chrome.tabs.create(createParams, function(tab) { if (opt_callback) opt_callback(tab.url); }); }, /** * Increment the selected index of a select control. * @param {number} tabId Of the page. * @param {string} elementQueryString */ incrementSelectedIndex: function(tabId, elementQueryString) { var code = TestUtils.extractHtmlFromCommentEncodedString( function() { /*! var target = document.body.querySelector('$0'); target.focus(); target.selectedIndex++; */ }, [elementQueryString]); chrome.tabs.executeScript(tabId, {code: code}); }, /** * Creates a callback that optionally calls {@code opt_callback} when * called. If this method is called one or more times, then * {@code testDone()} will be called when all callbacks have been called. * @param {Function=} opt_callback Wrapped callback that will have its this * reference bound to the test fixture. * @return {Function} */ newCallback: function(opt_callback) { return this.callbackHelper_.wrap(opt_callback); } }; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Include test fixture. GEN_INCLUDE(['chromevox_e2e_test_base.js']); /** * Base test fixture for ChromeVox Next end to end tests. * * These tests are identical to ChromeVoxE2ETests except for performing the * necessary setup to run ChromeVox Next. * @constructor * @extends {ChromeVoxE2ETest} */ function ChromeVoxNextE2ETest() { ChromeVoxE2ETest.call(this); if (this.runtimeDeps.length > 0) { chrome.extension.getViews().forEach(function(w) { this.runtimeDeps.forEach(function(dep) { if (w[dep]) window[dep] = w[dep]; }.bind(this)); }.bind(this)); } // For tests, enable announcement of events we trigger via automation. DesktopAutomationHandler.announceActions = true; this.originalOutputContextValues_ = {}; for (var role in Output.ROLE_INFO_) { this.originalOutputContextValues_[role] = Output.ROLE_INFO_[role]['outputContextFirst']; } } ChromeVoxNextE2ETest.prototype = { __proto__: ChromeVoxE2ETest.prototype, /** * Dependencies defined on a background window other than this one. * @type {!Array<string>} */ runtimeDeps: [], /** * Gets the desktop from the automation API and Launches a new tab with * the given document, and runs |callback| when a load complete fires. * Arranges to call |testDone()| after |callback| returns. * NOTE: Callbacks creatd instide |opt_callback| must be wrapped with * |this.newCallback| if passed to asynchonous calls. Otherwise, the test * will be finished prematurely. * @param {function() : void} doc Snippet wrapped inside of a function. * @param {function(chrome.automation.AutomationNode)} callback * Called once the document is ready. * @param {string=} opt_url Optional url to wait for. Defaults to undefined. */ runWithLoadedTree: function(doc, callback, opt_url) { callback = this.newCallback(callback); chrome.automation.getDesktop(function(r) { var url = opt_url || TestUtils.createUrlForDoc(doc); var listener = function(evt) { if (evt.target.root.url != url) return; if (!evt.target.root.docLoaded) return; r.removeEventListener('focus', listener, true); r.removeEventListener('loadComplete', listener, true); CommandHandler.onCommand('nextObject'); callback && callback(evt.target); callback = null; }; r.addEventListener('focus', listener, true); r.addEventListener('loadComplete', listener, true); var createParams = {active: true, url: url}; chrome.tabs.create(createParams); }.bind(this)); }, listenOnce: function(node, eventType, callback, capture) { var innerCallback = this.newCallback(function() { node.removeEventListener(eventType, innerCallback, capture); callback.apply(this, arguments); }); node.addEventListener(eventType, innerCallback, capture); }, /** * Forces output to place context utterances at the end of output. This eases * rebaselining when changing context ordering for a specific role. */ forceContextualLastOutput: function() { for (var role in Output.ROLE_INFO_) Output.ROLE_INFO_[role]['outputContextFirst'] = undefined; }, /** * Forces output to place context utterances at the beginning of output. */ forceContextualFirstOutput: function() { for (var role in Output.ROLE_INFO_) Output.ROLE_INFO_[role]['outputContextFirst'] = true; }, /** Resets contextual output values to their defaults. */ resetContextualOutput: function() { for (var role in Output.ROLE_INFO_) { Output.ROLE_INFO_[role]['outputContextFirst'] = this.originalOutputContextValues_[role]; } } }; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Asserts that a given argument's value is undefined. * @param {object} a The argument to check. */ function assertUndefined(a) { if (a !== undefined) { throw new Error('Assertion failed: expected undefined'); } } /** * Asserts that the argument is neither null nor undefined. * @param {object} obj The argument to check. * @param {string=} opt_message Error message if the condition is not met. */ function assertNotNullNorUndefined(obj, opt_message) { if (obj === undefined || obj === null) { throw new Error( 'Can\'t be null or undefined: ' + (opt_message || '') + '\n' + 'Actual: ' + obj); } } /** * Asserts that a given function call throws an exception. * @param {string} msg Message to print if exception not thrown. * @param {Function} fn The function to call. * @param {string} error The name of the exception we expect {@code fn} to * throw. */ function assertException(msg, fn, error) { try { fn(); } catch (e) { if (error && e.name != error) { throw new Error( 'Expected to throw ' + error + ' but threw ' + e.name + ' - ' + msg); } return; } throw new Error('Expected to throw exception ' + error + ' - ' + msg); } /** * Asserts that two arrays of strings are equal. * @param {Array<string>} array1 The expected array. * @param {Array<string>} array2 The test array. */ function assertEqualStringArrays(array1, array2) { var same = true; if (array1.length != array2.length) { same = false; } for (var i = 0; i < Math.min(array1.length, array2.length); i++) { if (array1[i].trim() != array2[i].trim()) { same = false; } } if (!same) { throw new Error( 'Expected ' + JSON.stringify(array1) + ', got ' + JSON.stringify(array2)); } } /** * Asserts that two objects have the same JSON serialization. * @param {Object} expected The expected object. * @param {Object} actual The actual object. * @param {string=} opt_message Message used for errors. */ function assertEqualsJSON(expected, actual, opt_message) { if (JSON.stringify(actual) !== JSON.stringify(expected)) { throw new Error( (opt_message ? opt_message + '\n' : '') + 'Expected ' + JSON.stringify(expected) + '\n' + 'Got ' + JSON.stringify(actual)); } } /** * Asserts that two ArrayBuffers have the same content. * @param {ArrayBuffer} arrayBufA The expected ArrayBuffer. * @param {ArrayBuffer} arrayBufB The test ArrayBuffer. */ function assertArrayBuffersEquals(arrayBufA, arrayBufB) { var view1 = new Uint8Array(arrayBufA); var view2 = new Uint8Array(arrayBufB); assertEquals(JSON.stringify(view1), JSON.stringify(view2)); } /** * Asserts that two Arrays have the same content. * @param {ArrayBuffer} arrayA The expected array. * @param {ArrayBuffer} arrayB The test array. */ function assertArraysEquals(arrayA, arrayB) { assertEquals(JSON.stringify(arrayA), JSON.stringify(arrayB)); } /** * Asserts and fails immediately once called. */ function assertNotReached() { assertFalse(true); } /** * Asserts an actual DOM equals an expected stringified DOM. * @param {string} expected * @param {Node} actual */ function assertEqualsDOM(expected, actual) { expected = expected.replace(/>\s+</gm, '><').trim(/\s/gm); var actualStr = actual.outerHTML; actualStr = actualStr.replace(/>\s+</gm, '><').trim(/\s/gm); for (var i = 0; i < expected.length; i++) assertEquals( expected[i], actualStr[i], 'Mismatch at index ' + i + ' in expected:\n' + expected + '\nactual:\n' + actualStr + '\n'); } assertSame = assertEquals; assertNotSame = assertNotEquals; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/assert_additions.js // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview This file contains the |MockFeedback| class which is * a combined mock class for speech, braille, and earcon feedback. A * test that uses this class may add expectations for speech * utterances, braille display content to be output, and earcons * played (by name). The |install| method sets appropriate mock * classes as the |cvox.ChromeVox.tts|, |cvox.ChromeVox.braille| and * |cvox.ChromeVox.earcons| objects, respectively. Output sent to * those objects will then be collected in an internal queue. * * Expectations can be added using the |expectSpeech|, * |expectBraille|, and |expectEarcon| methods. These methods take * either strings or regular expressions to match against. Strings * must match a full utterance (or display content) exactly, while a * regular expression must match a substring (use anchor operators if * needed). * * Function calls may be inserted in the stream of expectations using the * |call| method. Such callbacks are called after all preceding expectations * have been met, and before any further expectations are matched. Callbacks * are called in the order they were added to the mock. * * The |replay| method starts processing any pending utterances, * braille display content, and earcons and will try to match * expectations as new feedback enters the queue asynchronously. When * all expectations have been met and callbacks called, the finish * callback, if any was provided to the constructor, is called. * * This mock class is lean, meaning that feedback that doesn't match * any expectations is silently ignored. * * NOTE: for asynchronous tests, the processing will never finish if there * are unmet expectations. To help debugging in such situations, the mock * will output its pending state if there are pending expectations and no * output is received within a few seconds. * * See mock_feedback_test.js for example usage of this class. */ /** * Combined mock class for braille and speech output. * @param {function=} opt_finishedCallback Called when all expectations have * been met. * @constructor */ var MockFeedback = function(opt_finishedCallback) { /** * @type {function} * @private */ this.finishedCallback_ = opt_finishedCallback || null; /** * True when |replay| has been called and actions are being replayed. * @type {boolean} * @private */ this.replaying_ = false; /** * True when inside the |process| function to prevent nested calls. * @type {boolean} * @private */ this.inProcess_ = false; /** * Pending expectations and callbacks. * @type {Array<{perform: function(): boolean, toString: function(): string}>} * @private */ this.pendingActions_ = []; /** * Pending speech utterances. * @type {Array<{text: string, callback: (function|undefined)}>} * @private */ this.pendingUtterances_ = []; /** * Pending braille output. * @type {Array<{text: string, callback: (function|undefined)}>} * @private */ this.pendingBraille_ = []; /** * Pending earcons. * @type {Array<{text: string, callback: (function|undefined)}>} * @private */ this.pendingEarcons_ = []; /** * Handle for the timeout set for debug logging. * @type {number} * @private */ this.logTimeoutId_ = 0; /** * @type {cvox.NavBraille} * @private */ this.lastMatchedBraille_ = null; }; MockFeedback.prototype = { /** * Install mock objects as |cvox.ChromeVox.tts| and |cvox.ChromeVox.braille| * to collect feedback. */ install: function() { assertFalse(this.replaying_); var MockTts = function() {}; MockTts.prototype = { __proto__: cvox.TtsInterface.prototype, speak: this.addUtterance_.bind(this) }; cvox.ChromeVox.tts = new MockTts(); var MockBraille = function() {}; MockBraille.prototype = { __proto__: cvox.BrailleInterface.prototype, write: this.addBraille_.bind(this) }; cvox.ChromeVox.braille = new MockBraille(); var MockEarcons = function() {}; MockEarcons.prototype = { __proto__: cvox.AbstractEarcons.prototype, playEarcon: this.addEarcon_.bind(this) }; // cvox.ChromeVox.earcons is a getter that switches between Classic and // Next; replace it with MockEarcons. delete cvox.ChromeVox.earcons; cvox.ChromeVox.earcons = new MockEarcons(); }, /** * Adds an expectation for one or more spoken utterances. * @param {...(string|RegExp)} var_args One or more utterance to add as * expectations. * @return {MockFeedback} |this| for chaining */ expectSpeech: function() { assertFalse(this.replaying_); Array.prototype.forEach.call(arguments, function(text) { this.pendingActions_.push({ perform: function() { return !!MockFeedback.matchAndConsume_( text, {}, this.pendingUtterances_); }.bind(this), toString: function() { return 'Speak \'' + text + '\''; } }); }.bind(this)); return this; }, /** * Adds an expectation for one spoken utterance that will be enqueued * with a given queue mode. * @param {string|RegExp} text One utterance expectation. * @param {cvox.QueueMode} queueMode The expected queue mode. * @return {MockFeedback} |this| for chaining */ expectSpeechWithQueueMode: function(text, queueMode) { assertFalse(this.replaying_); this.pendingActions_.push({ perform: function() { return !!MockFeedback.matchAndConsume_( text, {queueMode: queueMode}, this.pendingUtterances_); }.bind(this), toString: function() { return 'Speak \'' + text + '\' with mode ' + queueMode; } }); return this; }, /** * Adds an expectation for one spoken utterance that will be queued. * @param {string|RegExp} text One utterance expectation. * @return {MockFeedback} |this| for chaining */ expectQueuedSpeech: function(text) { return this.expectSpeechWithQueueMode(text, cvox.QueueMode.QUEUE); }, /** * Adds an expectation for one spoken utterance that will be flushed. * @param {string|RegExp} text One utterance expectation. * @return {MockFeedback} |this| for chaining */ expectFlushingSpeech: function(text) { return this.expectSpeechWithQueueMode(text, cvox.QueueMode.FLUSH); }, /** * Adds an expectation for one spoken utterance that will be queued * with the category flush mode. * @param {string|RegExp} text One utterance expectation. * @return {MockFeedback} |this| for chaining */ expectCategoryFlushSpeech: function(text) { return this.expectSpeechWithQueueMode(text, cvox.QueueMode.CATEGORY_FLUSH); }, /** * Adds expectations for spoken utterances with specified language. * @param {string} language The expected output language for utterances. * @param {...(string)} rest One or more utterances to add as expectations. * @return {MockFeedback} |this| for chaining */ expectSpeechWithLanguage: function(language, ...rest) { assertFalse(this.replaying_); Array.prototype.forEach.call(rest, function(text) { this.pendingActions_.push({ perform: function() { return !!MockFeedback.matchAndConsume_( text, {lang: language}, this.pendingUtterances_); }.bind(this), toString: function() { return 'Speak \'' + text + '\' with language ' + language; } }); }.bind(this)); return this; }, /** * Adds an expectation that the next spoken utterances do *not* match * the given arguments. * * This is only guaranteed to work for the immediately following utterance. * If you use it to check an utterance other than the immediately following * one the results may be flaky. * * @param {...(string|RegExp)} var_args One or more utterance to add as * negative expectations. * @return {MockFeedback} |this| for chaining */ expectNextSpeechUtteranceIsNot: function() { assertFalse(this.replaying_); Array.prototype.forEach.call(arguments, function(text) { this.pendingActions_.push({ perform: function() { if (this.pendingUtterances_.length == 0) return false; if (MockFeedback.matchAndConsume_( text, {}, this.pendingUtterances_)) { throw new Error('Got disallowed utterance "' + text + '".'); } return true; }.bind(this), toString: function() { return 'Do not speak \'' + text + '\''; } }); }.bind(this)); return this; }, /** * Adds an expectation for braille output. * @param {string|RegExp} text * @param {Object=} opt_props Additional properties to match in the * |NavBraille| * @return {MockFeedback} |this| for chaining */ expectBraille: function(text, opt_props) { assertFalse(this.replaying_); var props = opt_props || {}; this.pendingActions_.push({ perform: function() { var match = MockFeedback.matchAndConsume_(text, props, this.pendingBraille_); if (match) this.lastMatchedBraille_ = match; return !!match; }.bind(this), toString: function() { return 'Braille \'' + text + '\' ' + JSON.stringify(props); } }); return this; }, /** * Adds an expectation for a played earcon. * @param {string} earconName The name of the earcon. * @return {MockFeedback} |this| for chaining */ expectEarcon: function(earconName, opt_props) { assertFalse(this.replaying_); this.pendingActions_.push({ perform: function() { var match = MockFeedback.matchAndConsume_(earconName, {}, this.pendingEarcons_); return !!match; }.bind(this), toString: function() { return 'Earcon \'' + earconName + '\''; } }); return this; }, /** * Arranges for a callback to be invoked when all expectations that were * added before this call have been met. Callbacks are called in the * order they are added. * @param {Function} callback * @return {MockFeedback} |this| for chaining */ call: function(callback) { assertFalse(this.replaying_); this.pendingActions_.push({ perform: function() { callback(); return true; }, toString: function() { return 'Callback'; } }); return this; }, /** * Clears all pending output. Useful in cases where previous output might * overlap with future expectations. * @return {MockFeedback} |this| for chaining */ clearPendingOutput: function() { this.call(function() { this.pendingUtterances_.length = 0; this.pendingBraille_.length = 0; this.pendingEarcons_.length = 0; }.bind(this)); return this; }, /** * Processes any feedback that has been received so far and treis to * satisfy the registered expectations. Any feedback that is received * after this call (via the installed mock objects) is processed immediately. * When all expectations are satisfied and registered callbacks called, * the finish callbcak, if any, is called. * This function may only be called once. */ replay: function() { assertFalse(this.replaying_); this.replaying_ = true; this.process_(); }, /** * Returns the |NavBraille| that matched an expectation. This is * intended to be used by a callback to invoke braille commands that * depend on display contents. * @type {cvox.NavBraille} */ get lastMatchedBraille() { assertTrue(this.replaying_); return this.lastMatchedBraille_; }, /** * @param {string} textString * @param {cvox.QueueMode} queueMode * @param {Object=} properties * @private */ addUtterance_: function(textString, queueMode, properties) { var callback; if (properties && (properties.startCallback || properties.endCallback)) { var startCallback = properties.startCallback; var endCallback = properties.endCallback; callback = function() { startCallback && startCallback(); endCallback && endCallback(); }; } this.pendingUtterances_.push({ text: textString, queueMode: queueMode, lang: properties ? properties['lang'] : undefined, callback: callback }); this.process_(); }, /** @private */ addBraille_: function(navBraille) { this.pendingBraille_.push(navBraille); this.process_(); }, /** @private */ addEarcon_: function(earconName) { this.pendingEarcons_.push({text: earconName}); this.process_(); }, /*** @private */ process_: function() { if (!this.replaying_ || this.inProcess_) return; try { this.inProcess_ = true; while (this.pendingActions_.length > 0) { var action = this.pendingActions_[0]; if (action.perform()) { this.pendingActions_.shift(); if (this.logTimeoutId_) { window.clearTimeout(this.logTimeoutId_); this.logTimeoutId_ = 0; } } else { break; } } if (this.pendingActions_.length == 0) { if (this.finishedCallback_) { this.finishedCallback_(); this.finishedCallback_ = null; } } else { // If there are pending actions and no matching feedback for a few // seconds, log the pending state to ease debugging. if (!this.logTimeoutId_) { this.logTimeoutId_ = window.setTimeout(this.logPendingState_.bind(this), 2000); } } } finally { this.inProcess_ = false; } }, /** @private */ logPendingState_: function() { if (this.pendingActions_.length > 0) console.log('Still waiting for ' + this.pendingActions_[0].toString()); function logPending(desc, list) { if (list.length > 0) console.log( 'Pending ' + desc + ':\n ' + list.map(function(i) { var ret = '\'' + i.text + '\''; if ('startIndex' in i) ret += ' startIndex=' + i.startIndex; if ('endIndex' in i) ret += ' endIndex=' + i.endIndex; return ret; }) .join('\n ') + '\n '); } logPending('speech utterances', this.pendingUtterances_); logPending('braille', this.pendingBraille_); logPending('earcons', this.pendingEarcons_); this.logTimeoutId_ = 0; }, }; /** * @param {string} text * @param {Object} props * @param {Array<{text: (string|RegExp), callback: (function|undefined)}>} * pending * @return {Object} * @private */ MockFeedback.matchAndConsume_ = function(text, props, pending) { for (var i = 0, candidate; candidate = pending[i]; ++i) { var candidateText = candidate.text; if (typeof(candidateText) != 'string') candidateText = candidateText.toString(); if (text === candidateText || (text instanceof RegExp && text.test(candidateText)) || (typeof (text) == 'function' && text(candidate))) { var matched = true; for (prop in props) { if (candidate[prop] !== props[prop]) { matched = false; break; } } if (matched) break; } } if (candidate) { var consumed = pending.splice(0, i + 1); consumed.forEach(function(item) { if (item.callback) item.callback(); }); } return candidate; }; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/mock_feedback.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Include test fixture. GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js', '../../testing/assert_additions.js']); GEN_INCLUDE(['../../testing/mock_feedback.js']); /** * Test fixture for Background. * @constructor * @extends {ChromeVoxNextE2ETest} */ function ChromeVoxBackgroundTest() { ChromeVoxNextE2ETest.call(this); } ChromeVoxBackgroundTest.prototype = { __proto__: ChromeVoxNextE2ETest.prototype, /** @override */ setUp: function() { window.EventType = chrome.automation.EventType; window.RoleType = chrome.automation.RoleType; window.doCmd = this.doCmd; window.press = this.press; window.Mod = constants.ModifierFlag; this.forceContextualLastOutput(); }, /** * @return {!MockFeedback} */ createMockFeedback: function() { var mockFeedback = new MockFeedback(this.newCallback(), this.newCallback.bind(this)); mockFeedback.install(); return mockFeedback; }, /** * Create a function which perform the command |cmd|. * @param {string} cmd * @return {function() : void} */ doCmd: function(cmd) { return function() { CommandHandler.onCommand(cmd); }; }, press: function(keyCode, modifiers) { return function() { BackgroundKeyboardHandler.sendKeyPress(keyCode, modifiers); }; }, linksAndHeadingsDoc: function() {/*! <p>start</p> <a href='#a'>alpha</a> <a href='#b'>beta</a> <p> <h1>charlie</h1> <a href='foo'>delta</a> </p> <a href='#bar'>echo</a> <h2>foxtraut</h2> <p>end<span>of test</span></p> */}, buttonDoc: function() {/*! <p>start</p> <button>hello button one</button> cats <button>hello button two</button> <p>end</p> */}, formsDoc: function() {/*! <select id="fruitSelect"> <option>apple</option> <option>grape</option> <option> banana</option> </select> */}, iframesDoc: function() {/*! <p>start</p> <button>Before</button> <iframe srcdoc="<button>Inside</button><h1>Inside</h1>"></iframe> <button>After</button> */}, disappearingObjectDoc: function() {/*! <p>start</p> <div role="group"> <p>Before1</p> <p>Before2</p> <p>Before3</p> </div> <div role="group"> <p id="disappearing">Disappearing</p> </div> <div role="group"> <p>After1</p> <p>After2</p> <p>After3</p> </div> <div id="live" aria-live="assertive"></div> <div id="delete" role="button">Delete</div> <script> document.getElementById('delete').addEventListener('click', function() { var d = document.getElementById('disappearing'); d.parentElement.removeChild(d); document.getElementById('live').innerText = 'Deleted'; document.body.offsetTop }); </script> */}, detailsDoc: function() {/*! <p aria-details="details">start</p> <div role="group"> <p>Before</p> <p id="details">Details</p> <p>After</p> </div> */}, }; /** Tests that ChromeVox classic is in this context. */ SYNC_TEST_F('ChromeVoxBackgroundTest', 'ClassicNamespaces', function() { assertEquals('object', typeof(cvox)); assertEquals('function', typeof(cvox.ChromeVoxBackground)); }); /** Tests that ChromeVox next is in this context. */ SYNC_TEST_F('ChromeVoxBackgroundTest', 'NextNamespaces', function() { assertEquals('function', typeof(Background)); }); /** Tests consistency of navigating forward and backward. */ TEST_F('ChromeVoxBackgroundTest', 'ForwardBackwardNavigation', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(this.linksAndHeadingsDoc, function() { mockFeedback.expectSpeech('start').expectBraille('start'); mockFeedback.call(doCmd('nextLink')) .expectSpeech('alpha', 'Link') .expectBraille('alpha lnk'); mockFeedback.call(doCmd('nextLink')) .expectSpeech('beta', 'Link') .expectBraille('beta lnk'); mockFeedback.call(doCmd('nextLink')) .expectSpeech('delta', 'Link') .expectBraille('delta lnk'); mockFeedback.call(doCmd('previousLink')) .expectSpeech('beta', 'Link') .expectBraille('beta lnk'); mockFeedback.call(doCmd('nextHeading')) .expectSpeech('charlie', 'Heading 1') .expectBraille('charlie h1'); mockFeedback.call(doCmd('nextHeading')) .expectSpeech('foxtraut', 'Heading 2') .expectBraille('foxtraut h2'); mockFeedback.call(doCmd('previousHeading')) .expectSpeech('charlie', 'Heading 1') .expectBraille('charlie h1'); mockFeedback.call(doCmd('nextObject')) .expectSpeech('delta', 'Link') .expectBraille('delta lnk'); mockFeedback.call(doCmd('nextObject')) .expectSpeech('echo', 'Link') .expectBraille('echo lnk'); mockFeedback.call(doCmd('nextObject')) .expectSpeech('foxtraut', 'Heading 2') .expectBraille('foxtraut h2'); mockFeedback.call(doCmd('nextObject')) .expectSpeech('end') .expectBraille('end'); mockFeedback.call(doCmd('previousObject')) .expectSpeech('foxtraut', 'Heading 2') .expectBraille('foxtraut h2'); mockFeedback.call(doCmd('nextLine')) .expectSpeech('foxtraut'); mockFeedback.call(doCmd('nextLine')) .expectSpeech('end', 'of test') .expectBraille('endof test'); mockFeedback.call(doCmd('jumpToTop')) .expectSpeech('start') .expectBraille('start'); mockFeedback.call(doCmd('jumpToBottom')) .expectSpeech('of test') .expectBraille('of test'); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'CaretNavigation', function() { // TODO(plundblad): Add braille expectaions when crbug.com/523285 is fixed. var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(this.linksAndHeadingsDoc, function() { mockFeedback.expectSpeech('start'); mockFeedback.call(doCmd('nextCharacter')) .expectSpeech('t'); mockFeedback.call(doCmd('nextCharacter')) .expectSpeech('a'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('alpha', 'Link'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('beta', 'Link'); mockFeedback.call(doCmd('previousWord')) .expectSpeech('alpha', 'Link'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('beta', 'Link'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('charlie', 'Heading 1'); mockFeedback.call(doCmd('nextLine')) .expectSpeech('delta', 'Link'); mockFeedback.call(doCmd('nextLine')) .expectSpeech('echo', 'Link'); mockFeedback.call(doCmd('nextLine')) .expectSpeech('foxtraut', 'Heading 2'); mockFeedback.call(doCmd('nextLine')) .expectSpeech('end', 'of test'); mockFeedback.call(doCmd('nextCharacter')) .expectSpeech('n'); mockFeedback.call(doCmd('previousCharacter')) .expectSpeech('e'); mockFeedback.call(doCmd('previousCharacter')) .expectSpeech('t', 'Heading 2'); mockFeedback.call(doCmd('previousWord')) .expectSpeech('foxtraut'); mockFeedback.call(doCmd('previousWord')) .expectSpeech('echo', 'Link'); mockFeedback.call(doCmd('previousCharacter')) .expectSpeech('a', 'Link'); mockFeedback.call(doCmd('previousCharacter')) .expectSpeech('t'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('echo', 'Link'); mockFeedback.replay(); }); }); /** Tests that individual buttons are stops for move-by-word functionality. */ TEST_F('ChromeVoxBackgroundTest', 'CaretNavigationTreatsButtonAsWord', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(this.buttonDoc, function() { mockFeedback.expectSpeech('start'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('hello button one', 'Button'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('cats'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('hello button two', 'Button'); mockFeedback.call(doCmd('nextWord')) .expectSpeech('end'); mockFeedback.call(doCmd('previousWord')) .expectSpeech('hello button two', 'Button'); mockFeedback.call(doCmd('previousWord')) .expectSpeech('cats'); mockFeedback.call(doCmd('previousWord')) .expectSpeech('hello button one', 'Button'); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'SelectSingleBasic', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(this.formsDoc, function() { var incrementSelectedIndex = this.incrementSelectedIndex.bind(this, undefined, '#fruitSelect'); mockFeedback.expectSpeech('apple', 'has pop up', 'Collapsed') .expectBraille('apple btn +popup +') .call(incrementSelectedIndex) .expectSpeech('grape', /2 of 3/) .expectBraille('grape mnuitm 2/3 (x)') .call(incrementSelectedIndex) .expectSpeech('banana', /3 of 3/) .expectBraille('banana mnuitm 3/3 (x)'); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ContinuousRead', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(this.linksAndHeadingsDoc, function() { mockFeedback.expectSpeech('start') .call(doCmd('readFromHere')) .expectSpeech( 'start', 'alpha', 'Link', 'beta', 'Link', 'charlie', 'Heading 1'); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'InitialFocus', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree('<a href="a">a</a>', function(rootNode) { mockFeedback.expectSpeech('a') .expectSpeech('Link'); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'AriaLabel', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree('<a aria-label="foo" href="a">a</a>', function(rootNode) { rootNode.find({role: RoleType.LINK}).focus(); mockFeedback.expectSpeech('foo') .expectSpeech('Link') .expectSpeech('Press Search+Space to activate.') .expectBraille('foo lnk'); mockFeedback.replay(); } ); }); TEST_F('ChromeVoxBackgroundTest', 'ShowContextMenu', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree('<p>before</p><a href="a">a</a>', function(rootNode) { var go = rootNode.find({ role: RoleType.LINK }); // Menus no longer nest a message loop, so we can launch menu and confirm // expected speech. The menu will not block test shutdown. mockFeedback.call(go.focus.bind(go)) .expectSpeech('a', 'Link') .call(doCmd('contextMenu')) .expectSpeech(/menu opened/); mockFeedback.replay(); }.bind(this)); }); TEST_F('ChromeVoxBackgroundTest', 'BrailleRouting', function() { var mockFeedback = this.createMockFeedback(); var route = function(position) { assertTrue(ChromeVoxState.instance.onBrailleKeyEvent( {command: cvox.BrailleKeyCommand.ROUTING, displayPosition: position}, mockFeedback.lastMatchedBraille)); }; this.runWithLoadedTree( function() {/*! <p>start</p> <button type="button" id="btn1">Click me</button> <p>Some text</p> <button type="button" id="btn2">Focus me</button> <p>Some more text</p> <input type="text" id ="text" value="Edit me"> <script> document.getElementById('btn1').addEventListener('click', function() { document.getElementById('btn2').focus(); }, false); </script> */}, function(rootNode) { var button1 = rootNode.find({role: RoleType.BUTTON, attributes: { name: 'Click me' }}); var textField = rootNode.find( {role: RoleType.TEXT_FIELD}); mockFeedback.expectBraille('start') .call(button1.focus.bind(button1)) .expectBraille(/^Click me btn/) .call(route.bind(null, 5)) .expectBraille(/Focus me btn/) .call(textField.focus.bind(textField)) .expectBraille('Edit me ed', {startIndex: 0}) .call(route.bind(null, 3)) .expectBraille('Edit me ed', {startIndex: 3}) .call(function() { assertEquals(3, textField.textSelStart); }); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'FocusInputElement', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( function() {/*! <input id="name" value="Lancelot"> <input id="quest" value="Grail"> <input id="color" value="Blue"> */}, function(rootNode) { var name = rootNode.find({ attributes: { value: 'Lancelot' } }); var quest = rootNode.find({ attributes: { value: 'Grail' } }); var color = rootNode.find({ attributes: { value: 'Blue' } }); mockFeedback.call(quest.focus.bind(quest)) .expectSpeech('Grail', 'Edit text') .call(color.focus.bind(color)) .expectSpeech('Blue', 'Edit text') .call(name.focus.bind(name)) .expectNextSpeechUtteranceIsNot('Blue') .expectSpeech('Lancelot', 'Edit text'); mockFeedback.replay(); }.bind(this)); }); // Flaky, see https://crbug.com/622387. TEST_F('ChromeVoxBackgroundTest', 'DISABLED_UseEditableState', function() { this.runWithLoadedTree( function() {/*! <input type="text"></input> <p tabindex=0>hi</p> */}, function(rootNode) { var assertExists = this.newCallback(function (evt) { assertNotNullNorUndefined( DesktopAutomationHandler.instance.textEditHandler); evt.stopPropagation(); }); var assertDoesntExist = this.newCallback(function (evt) { assertTrue( !DesktopAutomationHandler.instance.textEditHandler.editableTextHandler_); evt.stopPropagation(); // Focus the other text field here to make this test not racey. editable.focus(); }); var editable = rootNode.find({ role: RoleType.TEXT_FIELD }); var nonEditable = rootNode.find({ role: RoleType.PARAGRAPH }); this.listenOnce(nonEditable, 'focus', assertDoesntExist); this.listenOnce(editable, 'focus', assertExists); nonEditable.focus(); }.bind(this)); }); TEST_F('ChromeVoxBackgroundTest', 'EarconsForControls', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree( function() {/*! <p>Initial focus will be on something that's not a control.</p> <a href="#">MyLink</a> <button>MyButton</button> <input type=checkbox> <input type=checkbox checked> <input> <select multiple><option>1</option></select> <select><option>2</option></select> <input type=range value=5> */}, function(rootNode) { mockFeedback.call(doCmd('nextObject')) .expectSpeech('MyLink') .expectEarcon(cvox.Earcon.LINK) .call(doCmd('nextObject')) .expectSpeech('MyButton') .expectEarcon(cvox.Earcon.BUTTON) .call(doCmd('nextObject')) .expectSpeech('Check box') .expectEarcon(cvox.Earcon.CHECK_OFF) .call(doCmd('nextObject')) .expectSpeech('Check box') .expectEarcon(cvox.Earcon.CHECK_ON) .call(doCmd('nextObject')) .expectSpeech('Edit text') .expectEarcon(cvox.Earcon.EDITABLE_TEXT) // Editable text Search re-mappings are in effect. .call(doCmd('toggleStickyMode')) .expectSpeech('Sticky mode enabled') .call(doCmd('nextObject')) .expectSpeech('List box') .expectEarcon(cvox.Earcon.LISTBOX) .call(doCmd('nextObject')) .expectSpeech('Button', 'has pop up') .expectEarcon(cvox.Earcon.POP_UP_BUTTON) .call(doCmd('nextObject')) .expectSpeech(/Slider/) .expectEarcon(cvox.Earcon.SLIDER); mockFeedback.replay(); }.bind(this)); }); SYNC_TEST_F('ChromeVoxBackgroundTest', 'GlobsToRegExp', function() { assertEquals('/^()$/', Background.globsToRegExp_([]).toString()); assertEquals( '/^(http:\\/\\/host\\/path\\+here)$/', Background.globsToRegExp_(['http://host/path+here']).toString()); assertEquals( '/^(url1.*|u.l2|.*url3)$/', Background.globsToRegExp_(['url1*', 'u?l2', '*url3']).toString()); }); // Flaky, see https://crbug.com/622387. TEST_F('ChromeVoxBackgroundTest', 'DISABLED_ActiveOrInactive', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <a href="a">a</a> <button>b</button> <input type="text"></input> */}, function(rootNode) { var focusButton = function() { rootNode.find({role: RoleType.BUTTON}).focus(); }; var on = function() { cvox.ChromeVox.isActive = true; }; var off = function() { cvox.ChromeVox.isActive = false; }; function focusThen(toFocus, then) { toFocus.addEventListener('focus', function innerFocus(e) { if (e.target != toFocus) return; rootNode.removeEventListener('focus', innerFocus, true); then && then(); }, true); toFocus.focus(); } mockFeedback.call(focusButton) .expectSpeech('b').expectSpeech('Button') .call(off) .call(focusThen.bind(this, rootNode.find( { role: RoleType.LINK }), on)) .call(focusThen.bind(this, rootNode.find( { role: RoleType.TEXT_FIELD }))) .expectNextSpeechUtteranceIsNot('a') .expectSpeech('Edit text'); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ShouldNotFocusIframe', function() { this.runWithLoadedTree( function() {/*! <iframe tabindex=0 src="data:text/html,<p>Inside</p>"></iframe> <button>outside</button> */}, function(root) { var iframe = root.find({role: RoleType.IFRAME}); var button = root.find({role: RoleType.BUTTON}); assertEquals('iframe', iframe.role); assertEquals('button', button.role); var didFocus = false; iframe.addEventListener('focus', function() { didFocus = true; }); var b = ChromeVoxState.instance; b.currentRange_ = cursors.Range.fromNode(button); doCmd('previousElement'); assertFalse(didFocus); }.bind(this)); }); TEST_F('ChromeVoxBackgroundTest', 'ShouldFocusLink', function() { this.runWithLoadedTree( function() {/*! <div><a href="#">mylink</a></div> <button>after</button> */}, function(root) { var link = root.find({role: RoleType.LINK}); var button = root.find({role: RoleType.BUTTON}); assertEquals('link', link.role); assertEquals('button', button.role); var didFocus = false; link.addEventListener('focus', this.newCallback(function() { // Success })); var b = ChromeVoxState.instance; b.currentRange_ = cursors.Range.fromNode(button); doCmd('previousElement'); }); }); TEST_F('ChromeVoxBackgroundTest', 'NoisySlider', function() { var mockFeedback = this.createMockFeedback(); // Slider aria-valuetext must change otherwise blink suppresses event. this.runWithLoadedTree( function() {/*! <button id="go">go</button> <div id="slider" tabindex=0 role="slider"></div> <script> function update() { var s = document.getElementById('slider'); s.setAttribute('aria-valuetext', ''); s.setAttribute('aria-valuetext', 'noisy'); setTimeout(update, 500); } update(); </script> */}, function(root) { var go = root.find({role: RoleType.BUTTON}); var slider = root.find({role: RoleType.SLIDER}); var focusButton = go.focus.bind(go); var focusSlider = slider.focus.bind(slider); mockFeedback.call(focusButton) .expectNextSpeechUtteranceIsNot('noisy') .call(focusSlider) .expectSpeech('noisy') .expectSpeech('noisy') .replay(); }.bind(this)); }); TEST_F('ChromeVoxBackgroundTest', 'Checkbox', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div id="go" role="checkbox">go</div> <script> var go = document.getElementById('go'); var isChecked = true; go.addEventListener('click', function(e) { if (isChecked) go.setAttribute('aria-checked', true); else go.removeAttribute('aria-checked'); isChecked = !isChecked; }); </script> */}, function(root) { var cbx = root.find({role: RoleType.CHECK_BOX}); var click = cbx.doDefault.bind(cbx); var focus = cbx.focus.bind(cbx); mockFeedback.call(focus) .expectSpeech('go') .expectSpeech('Check box') .expectSpeech('Not checked') .call(click) .expectSpeech('go') .expectSpeech('Check box') .expectSpeech('Checked') .call(click) .expectSpeech('go') .expectSpeech('Check box') .expectSpeech('Not checked') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'MixedCheckbox', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div id="go" role="checkbox" aria-checked="mixed">go</div> */}, function(root) { mockFeedback.expectSpeech('go', 'Check box', 'Partially checked').replay(); }); }); /** Tests navigating into and out of iframes using nextButton */ TEST_F('ChromeVoxBackgroundTest', 'ForwardNavigationThroughIframeButtons', function() { var mockFeedback = this.createMockFeedback(); var running = false; var runTestIfIframeIsLoaded = function(rootNode) { if (running) return; // Return if the iframe hasn't loaded yet. var iframe = rootNode.find({role: RoleType.IFRAME}); var childDoc = iframe.firstChild; if (!childDoc || childDoc.children.length == 0) return; running = true; var beforeButton = rootNode.find({role: RoleType.BUTTON, name: 'Before'}); beforeButton.focus(); mockFeedback.expectSpeech('Before', 'Button'); mockFeedback.call(doCmd('nextButton')) .expectSpeech('Inside', 'Button'); mockFeedback.call(doCmd('nextButton')) .expectSpeech('After', 'Button'); mockFeedback.call(doCmd('previousButton')) .expectSpeech('Inside', 'Button'); mockFeedback.call(doCmd('previousButton')) .expectSpeech('Before', 'Button'); mockFeedback.replay(); }.bind(this); this.runWithLoadedTree(this.iframesDoc, function(rootNode) { chrome.automation.getDesktop(function(desktopNode) { runTestIfIframeIsLoaded(rootNode); desktopNode.addEventListener('loadComplete', function(evt) { runTestIfIframeIsLoaded(rootNode); }, true); }); }); }); /** Tests navigating into and out of iframes using nextObject */ TEST_F('ChromeVoxBackgroundTest', 'ForwardObjectNavigationThroughIframes', function() { var mockFeedback = this.createMockFeedback(); var running = false; var runTestIfIframeIsLoaded = function(rootNode) { if (running) return; // Return if the iframe hasn't loaded yet. var iframe = rootNode.find({role: 'iframe'}); var childDoc = iframe.firstChild; if (!childDoc || childDoc.children.length == 0) return; running = true; var suppressFocusActionOutput = function() { DesktopAutomationHandler.announceActions = false; }; var beforeButton = rootNode.find({role: RoleType.BUTTON, name: 'Before'}); mockFeedback.call(beforeButton.focus.bind(beforeButton)) .expectSpeech('Before', 'Button') .call(suppressFocusActionOutput) .call(doCmd('nextObject')) .expectSpeech('Inside', 'Button'); mockFeedback.call(doCmd('nextObject')) .expectSpeech('Inside', 'Heading 1'); mockFeedback.call(doCmd('nextObject')) .expectSpeech('After', 'Button'); mockFeedback.call(doCmd('previousObject')) .expectSpeech('Inside', 'Heading 1'); mockFeedback.call(doCmd('previousObject')) .expectSpeech('Inside', 'Button'); mockFeedback.call(doCmd('previousObject')) .expectSpeech('Before', 'Button'); mockFeedback.replay(); }.bind(this); this.runWithLoadedTree(this.iframesDoc, function(rootNode) { chrome.automation.getDesktop(function(desktopNode) { runTestIfIframeIsLoaded(rootNode); desktopNode.addEventListener('loadComplete', function(evt) { runTestIfIframeIsLoaded(rootNode); }, true); }); }); }); TEST_F('ChromeVoxBackgroundTest', 'SelectOptionSelected', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <select> <option>apple <option>banana <option>grapefruit </select> */}, function(root) { var select = root.find({role: RoleType.POP_UP_BUTTON}); var clickSelect = select.doDefault.bind(select); var lastOption = select.lastChild.lastChild; var selectLastOption = lastOption.doDefault.bind(lastOption); mockFeedback.call(clickSelect) .expectSpeech('apple') .expectSpeech('Button') .call(selectLastOption) .expectNextSpeechUtteranceIsNot('apple') .expectSpeech('grapefruit') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ToggleButton', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div aria-pressed="mixed" role="button">boldface</div> <div aria-pressed="true" role="button">ok</div> <div aria-pressed="false" role="button">cancel</div> <div aria-pressed role="button">close</div> */}, function(root) { var b = ChromeVoxState.instance; var move = doCmd('nextObject'); mockFeedback.call(move) .expectSpeech('boldface') .expectSpeech('Toggle Button') .expectSpeech('Partially pressed') .call(move) .expectSpeech('ok') .expectSpeech('Toggle Button') .expectSpeech('Pressed') .call(move) .expectSpeech('cancel') .expectSpeech('Toggle Button') .expectSpeech('Not pressed') .call(move) .expectSpeech('close') .expectSpeech('Button') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'EditText', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <input type="text"></input> <input role="combobox" type="text"></input> */}, function(root) { var nextEditText = doCmd('nextEditText'); var previousEditText = doCmd('previousEditText'); mockFeedback.call(nextEditText) .expectSpeech('Combo box') .call(previousEditText) .expectSpeech('Edit text') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'BackwardForwardSync', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <div aria-label="Group" role="group" tabindex=0> <input type="text"></input> </div> <ul> <li tabindex=0> <button>ok</button> </li> </ul> */}, function(root) { var listItem = root.find({role: RoleType.LIST_ITEM}); mockFeedback.call(listItem.focus.bind(listItem)) .expectSpeech('List item') .call(this.doCmd('nextObject')) .expectSpeech('\u2022 ') // bullet .call(this.doCmd('nextObject')) .expectSpeech('Button') .call(this.doCmd('previousObject')) .expectSpeech('\u2022 ') // bullet .call(this.doCmd('previousObject')) .expectSpeech('List item') .call(this.doCmd('previousObject')) .expectSpeech('Edit text') .call(this.doCmd('previousObject')) .expectSpeech('Group') .replay(); }); }); /** Tests that navigation works when the current object disappears. */ TEST_F('ChromeVoxBackgroundTest', 'DisappearingObject', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(this.disappearingObjectDoc, function(rootNode) { var deleteButton = rootNode.find({role: RoleType.BUTTON, attributes: { name: 'Delete' }}); var pressDelete = deleteButton.doDefault.bind(deleteButton); mockFeedback.expectSpeech('start').expectBraille('start'); mockFeedback.call(doCmd('nextObject')) .expectSpeech('Before1') .call(doCmd('nextObject')) .expectSpeech('Before2') .call(doCmd('nextObject')) .expectSpeech('Before3') .call(doCmd('nextObject')) .expectSpeech('Disappearing') .call(pressDelete) .expectSpeech('Deleted') .call(doCmd('nextObject')) .expectSpeech('After1') .call(doCmd('nextObject')) .expectSpeech('After2') .call(doCmd('previousObject')) .expectSpeech('After1') .call(doCmd('dumpTree')); /* // This is broken by cl/1260523 making tree updating (more) asynchronous. // TODO(aboxhall/dtseng): Add a function to wait for next tree update? mockFeedback .call(doCmd('previousObject')) .expectSpeech('Before3'); */ mockFeedback.replay(); }); }); /** Tests that focus jumps to details properly when indicated. */ TEST_F('ChromeVoxBackgroundTest', 'JumpToDetails', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(this.detailsDoc, function(rootNode) { mockFeedback.call(doCmd('jumpToDetails')) .expectSpeech('Details'); mockFeedback.replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ButtonNameValueDescription', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <input type="submit" aria-label="foo" value="foo"></input> */}, function(root) { var btn = root.find({role: RoleType.BUTTON}); mockFeedback.call(btn.focus.bind(btn)) .expectSpeech('foo') .expectSpeech('Button') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NameFromHeadingLink', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <p>before</p> <h1><a href="google.com">go</a><p>here</p></h1> */}, function(root) { var link = root.find({role: RoleType.LINK}); mockFeedback.call(link.focus.bind(link)) .expectSpeech('go') .expectSpeech('Link') .expectSpeech('Heading 1') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'OptionChildIndexCount', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <div role="listbox"> <p>Fruits</p> <div role="option">apple</div> <div role="option">banana</div> </div> */}, function(root) { mockFeedback.call(doCmd('nextObject')) .expectSpeech('Fruits') .expectSpeech('with 2 items') .expectSpeech('apple') .expectSpeech(' 1 of 2 ') .call(doCmd('nextObject')) .expectSpeech('banana') .expectSpeech(' 2 of 2 ') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ListMarkerIsIgnored', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <ul><li>apple</ul> */}, function(root) { mockFeedback.call(doCmd('nextObject')) .expectNextSpeechUtteranceIsNot('listMarker') .expectSpeech('apple') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'SymetricComplexHeading', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <h4><p>NW</p><p>NE</p></h4> <h4><p>SW</p><p>SE</p></h4> */}, function(root) { mockFeedback.call(doCmd('nextHeading')) .expectNextSpeechUtteranceIsNot('NE') .expectSpeech('NW') .call(doCmd('previousHeading')) .expectNextSpeechUtteranceIsNot('NE') .expectSpeech('NW') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ContentEditableJumpSyncsRange', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <p>start</p> <div contenteditable> <h1>Top News</h1> <h1>Most Popular</h1> <h1>Sports</h1> </div> */}, function(root) { var assertRangeHasText = function(text) { return function() { assertEquals(text, ChromeVoxState.instance.getCurrentRange().start.node.name); }; }; mockFeedback.call(doCmd('nextEditText')) .expectSpeech('Top News Most Popular Sports') .call(doCmd('nextHeading')) .expectSpeech('Top News') .call(assertRangeHasText('Top News')) .call(doCmd('nextHeading')) .expectSpeech('Most Popular') .call(assertRangeHasText('Most Popular')) .call(doCmd('nextHeading')) .expectSpeech('Sports') .call(assertRangeHasText('Sports')) .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'Selection', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <p>simple</p> <p>doc</p> */}, function(root) { // Fakes a toggleSelection command. root.addEventListener('textSelectionChanged', function() { if (root.focusOffset == 3) CommandHandler.onCommand('toggleSelection'); }, true); mockFeedback.call(doCmd('toggleSelection')) .expectSpeech('simple', 'selected') .call(doCmd('nextCharacter')) .expectSpeech('i', 'selected') .call(doCmd('previousCharacter')) .expectSpeech('i', 'unselected') .call(doCmd('nextCharacter')) .call(doCmd('nextCharacter')) .expectSpeech('End selection', 'sim') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'BasicTableCommands', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <table border=1> <tr><td>name</td><td>title</td><td>address</td><td>phone</td></tr> <tr><td>Dan</td><td>Mr</td><td>666 Elm Street</td><td>212 222 5555</td></tr> </table> */}, function(root) { mockFeedback.call(doCmd('nextRow')) .expectSpeech('Dan', 'row 2 column 1') .call(doCmd('previousRow')) .expectSpeech('name', 'row 1 column 1') .call(doCmd('previousRow')) .expectSpeech('No cell above.') .call(doCmd('nextCol')) .expectSpeech('title', 'row 1 column 2') .call(doCmd('nextRow')) .expectSpeech('Mr', 'row 2 column 2') .call(doCmd('previousRow')) .expectSpeech('title', 'row 1 column 2') .call(doCmd('nextCol')) .expectSpeech('address', 'row 1 column 3') .call(doCmd('nextCol')) .expectSpeech('phone', 'row 1 column 4') .call(doCmd('nextCol')) .expectSpeech('No cell right.') .call(doCmd('previousRow')) .expectSpeech('No cell above.') .call(doCmd('nextRow')) .expectSpeech('212 222 5555', 'row 2 column 4') .call(doCmd('nextRow')) .expectSpeech('No cell below.') .call(doCmd('nextCol')) .expectSpeech('No cell right.') .call(doCmd('previousCol')) .expectSpeech('666 Elm Street', 'row 2 column 3') .call(doCmd('previousCol')) .expectSpeech('Mr', 'row 2 column 2') .call(doCmd('goToRowLastCell')) .expectSpeech('212 222 5555', 'row 2 column 4') .call(doCmd('goToRowLastCell')) .expectSpeech('212 222 5555') .call(doCmd('goToRowFirstCell')) .expectSpeech('Dan', 'row 2 column 1') .call(doCmd('goToRowFirstCell')) .expectSpeech('Dan') .call(doCmd('goToColFirstCell')) .expectSpeech('name', 'row 1 column 1') .call(doCmd('goToColFirstCell')) .expectSpeech('name') .call(doCmd('goToColLastCell')) .expectSpeech('Dan', 'row 2 column 1') .call(doCmd('goToColLastCell')) .expectSpeech('Dan') .call(doCmd('goToLastCell')) .expectSpeech('212 222 5555', 'row 2 column 4') .call(doCmd('goToLastCell')) .expectSpeech('212 222 5555') .call(doCmd('goToFirstCell')) .expectSpeech('name', 'row 1 column 1') .call(doCmd('goToFirstCell')) .expectSpeech('name') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'MissingTableCells', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <table border=1> <tr><td>a</td><td>b</td><td>c</td></tr> <tr><td>d</td><td>e</td></tr> <tr><td>f</td></tr> </table> */}, function(root) { mockFeedback.call(doCmd('goToRowLastCell')) .expectSpeech('c', 'row 1 column 3') .call(doCmd('goToRowLastCell')) .expectSpeech('c') .call(doCmd('goToRowFirstCell')) .expectSpeech('a', 'row 1 column 1') .call(doCmd('goToRowFirstCell')) .expectSpeech('a') .call(doCmd('nextCol')) .expectSpeech('b', 'row 1 column 2') .call(doCmd('goToColLastCell')) .expectSpeech('e', 'row 2 column 2') .call(doCmd('goToColLastCell')) .expectSpeech('e') .call(doCmd('goToColFirstCell')) .expectSpeech('b', 'row 1 column 2') .call(doCmd('goToColFirstCell')) .expectSpeech('b') .call(doCmd('goToFirstCell')) .expectSpeech('a', 'row 1 column 1') .call(doCmd('goToFirstCell')) .expectSpeech('a') .call(doCmd('goToLastCell')) .expectSpeech('f', 'row 3 column 1') .call(doCmd('goToLastCell')) .expectSpeech('f') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'DisabledState', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <button aria-disabled="true">ok</button> */}, function(root) { mockFeedback.expectSpeech('ok', 'Disabled', 'Button').replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'HeadingLevels', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <h1>1</h1><h2>2</h2><h3>3</h3><h4>4</h4><h5>5</h5><h6>6</h6> */}, function(root) { var makeLevelAssertions = function(level) { mockFeedback.call(doCmd('nextHeading' + level)) .expectSpeech('Heading ' + level) .call(doCmd('nextHeading' + level)) .expectEarcon('wrap') .call(doCmd('previousHeading' + level)) .expectEarcon('wrap'); }; for (var i = 1; i <= 6; i++) makeLevelAssertions(i); mockFeedback.replay(); }); }); // Flaky, see https://crbug.com/622387. TEST_F('ChromeVoxBackgroundTest', 'DISABLED_EditableNavigation', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <div contenteditable>this is a test</div> */}, function(root) { mockFeedback.call(doCmd('nextObject')) .expectSpeech('this is a test') .call(doCmd('nextObject')) .expectSpeech(/data*/) .call(doCmd('nextObject')) .expectSpeech('this is a test') .call(doCmd('nextWord')) .expectSpeech('is', 'selected') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NavigationMovesFocus', function() { this.runWithLoadedTree(function(root) {/*! <p>start</p> <input type="text"></input> */}, function(root) { this.listenOnce( root.find({role: RoleType.TEXT_FIELD}), 'focus', function(e) { var focus = ChromeVoxState.instance.currentRange.start.node; assertEquals(RoleType.TEXT_FIELD, focus.role); assertTrue(focus.state.focused); }); doCmd('nextEditText')(); }); }); TEST_F('ChromeVoxBackgroundTest', 'BrailleCaretNavigation', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <p>This is a<em>test</em> of inline braille<br>with a second line</p> */}, function(root) { var text = 'This is a'; mockFeedback.call(doCmd('nextCharacter')) .expectBraille(text, {startIndex: 1, endIndex: 2}) // h .call(doCmd('nextCharacter')) .expectBraille(text, {startIndex: 2, endIndex: 3}) // i .call(doCmd('nextWord')) .expectBraille(text, {startIndex: 5, endIndex: 7}) // is .call(doCmd('previousWord')) .expectBraille(text, {startIndex: 0, endIndex: 4}) // This .call(doCmd('nextLine')) // Ensure nothing is selected when the range covers the entire line. .expectBraille('with a second line', {startIndex: -1, endIndex: -1}) .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'InPageLinks', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <a href="#there">hi</a> <button id="there">there</button> */}, function(root) { mockFeedback.expectSpeech('hi', 'Internal link') .call(doCmd('forceClickOnCurrentItem')) .expectSpeech('there', 'Button') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ListItem', function() { this.resetContextualOutput(); var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <p>start</p> <ul><li>apple<li>grape<li>banana</ul> <ol><li>pork<li>beef<li>chicken</ol> */}, function(root) { mockFeedback.call(doCmd('nextLine')) .expectSpeech('\u2022 ', 'apple', 'List item') .expectBraille('\u2022 apple lstitm lst +3') .call(doCmd('nextLine')) .expectSpeech('\u2022 ', 'grape', 'List item') .expectBraille('\u2022 grape lstitm') .call(doCmd('nextLine')) .expectSpeech('\u2022 ', 'banana', 'List item') .expectBraille('\u2022 banana lstitm') .call(doCmd('nextLine')) .expectSpeech('1. ', 'pork', 'List item') .expectBraille('1. pork lstitm lst +3') .call(doCmd('nextLine')) .expectSpeech('2. ', 'beef', 'List item') .expectBraille('2. beef lstitm') .call(doCmd('nextLine')) .expectSpeech('3. ', 'chicken', 'List item') .expectBraille('3. chicken lstitm') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'BusyHeading', function() { this.resetContextualOutput(); var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <p>start</p> <h2><a href="#">Lots</a><a href="#">going</a><a href="#">here</a></h2> */}, function(root) { // In the past, this would have inserted the 'heading 2' after the first // link's output. Make sure it goes to the end. mockFeedback.call(doCmd('nextLine')) .expectSpeech( 'Lots', 'Link', 'going', 'Link', 'here', 'Link', 'Heading 2') .expectBraille('Lots lnk going lnk here lnk h2') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NodeVsSubnode', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <a href="#">test</a> */}, function(root) { var link = root.find({role: RoleType.LINK}); function outputLinkRange(start, end) { return function() { new Output().withSpeech(new cursors.Range(new cursors.Cursor(link, start), new cursors.Cursor(link, end))).go(); }; } mockFeedback.call(outputLinkRange(0, 0)) .expectSpeech('test', 'Link') .call(outputLinkRange(0, 1)) .expectSpeech('t') .call(outputLinkRange(1, 1)) .expectSpeech('test', 'Link') .call(outputLinkRange(1, 2)) .expectSpeech('e') .call(outputLinkRange(1, 3)) .expectNextSpeechUtteranceIsNot('Link') .expectSpeech('es') .call(outputLinkRange(0, 4)) .expectSpeech('test', 'Link') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NativeFind', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <a href="#">grape</a> <a href="#">pineapple</a> */}, function(root) { mockFeedback.call(press(70, {ctrl: true})) .expectSpeech('Find', 'Edit text') .call(press(71)) .expectSpeech('grape', 'Link') .call(press(8)) .call(press(76)) .expectSpeech('pineapple', 'Link') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'EditableKeyCommand', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <input type="text"></input> <textarea>test</textarea> <div role="textbox" contenteditable>test</div> */}, function(root) { var assertCurNode = function(node) { return function() { assertEquals(node, ChromeVoxState.instance.currentRange.start.node); }; }; var textField = root.firstChild; var textArea = textField.nextSibling; var contentEditable = textArea.nextSibling; mockFeedback.call(assertCurNode(textField)) .call(doCmd('nextObject')) .call(assertCurNode(textArea)) .call(doCmd('nextObject')) .call(assertCurNode(contentEditable)) .call(doCmd('previousObject')) .expectSpeech('Text area') .call(assertCurNode(textArea)) .call(doCmd('previousObject')) .call(assertCurNode(textField)) .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'TextSelectionAndLiveRegion', function() { DesktopAutomationHandler.announceActions = true; var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <p>start</p> <div><input value="test" type="text"></input></div> <div id="live" aria-live="assertive"></div> <script> const input = document.querySelector('input'); const [div, live] = document.querySelectorAll('div'); let clicks = 0; div.addEventListener('click', function() { clicks++; if (clicks == 1) { live.textContent = 'go'; } else if (clicks == 2) { input.selectionStart = 1; live.textContent = 'queued'; } else { input.selectionStart = 2; live.textContent = 'interrupted'; } }); </script> */}, function(root) { var textField = root.find({role: RoleType.TEXT_FIELD}); var div = textField.parent; mockFeedback.call(textField.focus.bind(textField)) .expectSpeech('Edit text') .call(div.doDefault.bind(div)) .expectSpeechWithQueueMode('go', cvox.QueueMode.CATEGORY_FLUSH) .call(div.doDefault.bind(div)) .expectSpeechWithQueueMode('e', cvox.QueueMode.FLUSH) .expectSpeechWithQueueMode('queued', cvox.QueueMode.QUEUE) .call(div.doDefault.bind(div)) .expectSpeechWithQueueMode('s', cvox.QueueMode.FLUSH) .expectSpeechWithQueueMode('interrupted', cvox.QueueMode.QUEUE) .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'TableColumnHeaders', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <div role="grid"> <div role="rowgroup"> <div role="row"> <div role="columnheader">city</div> <div role="columnheader">state</div> <div role="columnheader">zip</div> </div> </div> <div role="rowgroup"> <div role="row"> <div role="gridcell">Mountain View</div> <div role="gridcell">CA</div> <div role="gridcell">94043</div> </div> <div role="row"> <div role="gridcell">San Jose</div> <div role="gridcell">CA</div> <div role="gridcell">95128</div> </div> </div> </div> */}, function(root) { mockFeedback.call(doCmd('nextRow')) .expectSpeech('Mountain View', 'row 2 column 1') .call(doCmd('nextRow')) .expectNextSpeechUtteranceIsNot('city') .expectSpeech('San Jose', 'row 3 column 1') .call(doCmd('nextCol')) .expectSpeech('CA', 'row 3 column 2', 'state') .call(doCmd('previousRow')) .expectSpeech('CA', 'row 2 column 2') .call(doCmd('previousRow')) .expectSpeech('state', 'row 1 column 2') .replay(); }); }); // Flaky, see https://crbug.com/622387. TEST_F('ChromeVoxBackgroundTest', 'DISABLED_ActiveDescendantUpdates', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/*! <div aria-label="container" tabindex=0 role="group" id="active" aria-activedescendant="1"> <div id="1" role="treeitem"></div> <div id="2" role="treeitem"></div> <script> var alt = false; var active = document.getElementById('active'); var one = document.getElementById('1'); var two = document.getElementById('2'); active.addEventListener('click', function() { var sel = alt ? one : two; var unsel = alt ? two : one; active.setAttribute('aria-activedescendant', sel.id); sel.setAttribute('aria-selected', true); unsel.setAttribute('aria-selected', false); alt = !alt; }); </script> */}, function(root) { var group = root.firstChild; mockFeedback.call(group.focus.bind(group)) .call(group.doDefault.bind(group)) .expectSpeech('Tree item', 'Selected', ' 2 of 2 ') .call(group.doDefault.bind(group)) .expectSpeech('Tree item', 'Selected', ' 1 of 2 ') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NavigationEscapesEdit', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <p>before content editable</p> <div role="textbox" contenteditable>this<br>is<br>a<br>test</div> <p>after content editable, before text area</p> <textarea style="word-spacing: 1000px">this is a test</textarea> <p>after text area</p> */}, function(root) { var assertBeginning = function(expected) { var textEditHandler = DesktopAutomationHandler.instance.textEditHandler; assertNotNullNorUndefined(textEditHandler); assertEquals(expected, textEditHandler.isSelectionOnFirstLine()); }; var assertEnd = function(expected) { var textEditHandler = DesktopAutomationHandler.instance.textEditHandler; assertNotNullNorUndefined(textEditHandler); assertEquals(expected, textEditHandler.isSelectionOnLastLine()); }; const [contentEditable, textArea] = root.findAll({role: RoleType.TEXT_FIELD}); this.listenOnce(contentEditable, EventType.FOCUS, function() { mockFeedback.call(assertBeginning.bind(this, true)) .call(assertEnd.bind(this, false)) .call(press(40 /* ArrowDown */)) .expectSpeech('is') .call(assertBeginning.bind(this, false)) .call(assertEnd.bind(this, false)) .call(press(40 /* ArrowDown */)) .expectSpeech('a') .call(assertBeginning.bind(this, false)) .call(assertEnd.bind(this, false)) .call(press(40 /* ArrowDown */)) .expectSpeech('test') .call(assertBeginning.bind(this, false)) .call(assertEnd.bind(this, true)) .call(textArea.focus.bind(textArea)) .expectSpeech('Text area') .call(assertBeginning.bind(this, true)) .call(assertEnd.bind(this, false)) .clearPendingOutput() .call(press(40 /* ArrowDown */)) .expectSpeech('is') .call(press(39 /* ArrowRight */)) .expectSpeech('s') .call(assertBeginning.bind(this, false)) .call(assertEnd.bind(this, false)) .call(press(40 /* ArrowDown */)) .call(press(37 /* ArrowLeft */)) .expectSpeech('a') .call(assertBeginning.bind(this, false)) .call(assertEnd.bind(this, false)) .call(press(40 /* ArrowDown */)) .expectSpeech('test') .call(press(39 /* ArrowRight */)) .expectSpeech('e') .call(assertBeginning.bind(this, false)) .call(assertEnd.bind(this, true)) .replay(); }.bind(this)); contentEditable.focus(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NavigationSyncsSelect', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <select> <option>apple</option> <option>grape</option> </select> */}, function(root) { var select = root.find({role: RoleType.POP_UP_BUTTON}); mockFeedback.call(select.doDefault.bind(select)) .expectSpeech('apple', 'Menu item', ' 1 of 2 ') .call(doCmd('nextObject')) .expectNextSpeechUtteranceIsNot('Selected') .expectNextSpeechUtteranceIsNot('Unselected') .expectSpeech('grape', 'Menu item') .expectNextSpeechUtteranceIsNot('Selected') .expectNextSpeechUtteranceIsNot('Unselected') .expectSpeech(' 2 of 2 ') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NavigationIgnoresLabels', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <p>before</p> <p id="label">label</p> <a href="#next" id="lebal">lebal</a> <p>after</p> <button aria-labelledby="label"></button> */}, function(root) { mockFeedback.expectSpeech('before') .call(doCmd('nextObject')) .expectSpeech('lebal', 'Link') .call(doCmd('nextObject')) .expectSpeech('after') .call(doCmd('previousObject')) .expectSpeech('lebal', 'Link') .call(doCmd('previousObject')) .expectSpeech('before') .call(doCmd('nextObject')) .expectSpeech('lebal', 'Link') .call(doCmd('nextObject')) .expectSpeech('after') .call(doCmd('nextObject')) .expectSpeech('label', 'lebal', 'Button') .call(doCmd('nextObject')) .expectEarcon(cvox.Earcon.WRAP) .call(doCmd('nextObject')) .expectSpeech('before') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'NavigationIgnoresDescriptions', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/*! <p>before</p> <p id="desc">label</p> <a href="#next" id="csed">lebal</a> <p>after</p> <button aria-describedby="desc"></button> */}, function(root) { mockFeedback.expectSpeech('before') .call(doCmd('nextObject')) .expectSpeech('lebal', 'Link') .call(doCmd('nextObject')) .expectSpeech('after') .call(doCmd('previousObject')) .expectSpeech('lebal', 'Link') .call(doCmd('previousObject')) .expectSpeech('before') .call(doCmd('nextObject')) .expectSpeech('lebal', 'Link') .call(doCmd('nextObject')) .expectSpeech('after') .call(doCmd('nextObject')) .expectSpeech('label', 'lebal', 'Button') .call(doCmd('nextObject')) .expectEarcon(cvox.Earcon.WRAP) .call(doCmd('nextObject')) .expectSpeech('before') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'MathContentViaInnerHtml', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/* <div role="math"> <semantics> <mrow class="MJX-TeXAtom-ORD"> <mstyle displaystyle="true" scriptlevel="0"> <mi>a</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo>+</mo> <mi>m</mi> <msup> <mo stretchy="false">)</mo> <mrow class="MJX-TeXAtom-ORD"> <mn>2</mn> </mrow> </msup> <mo>+</mo> <mi>b</mi> <mo stretchy="false">(</mo> <mi>y</mi> <mo>+</mo> <mi>m</mi> <mo stretchy="false">)</mo> <mo>+</mo> <mi>c</mi> <mo>=</mo> <mn>0.</mn> </mstyle> </mrow> <annotation encoding="application/x-tex">{\displaystyle a(y+m)^{2}+b(y+m)+c=0.}</annotation> </semantics> </div> */}, function(root) { mockFeedback .call(doCmd('nextObject')) .expectSpeech('a ( y + m ) squared + b ( y + m ) + c = 0 .') .expectSpeech('Press up, down, left, or right to explore math.') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'GestureGranularity', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/* <p>This is a test</p> */}, function(root) { var doGesture = (gesture) => { return () => { GestureCommandHandler.onAccessibilityGesture_(gesture) }; }; mockFeedback .call(doGesture('swipeLeft3')) .expectSpeech('Word') .call(doGesture('swipeDown1')) .expectSpeech('is') .call(doGesture('swipeDown1')) .expectSpeech('a') .call(doGesture('swipeUp1')) .expectSpeech('is') .call(doGesture('swipeLeft3')) .expectSpeech('Character') .call(doGesture('swipeDown1')) .expectSpeech('s') .call(doGesture('swipeUp1')) .expectSpeech('i') .call(doGesture('swipeLeft3')) .expectSpeech('Line') .call(doGesture('swipeUp1')) .expectSpeech('This is a test') .call(doGesture('swipeRight3')) .expectSpeech('Character') .call(doGesture('swipeRight3')) .expectSpeech('Word') .call(doGesture('swipeRight3')) .expectSpeech('Line') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'LinesFilterWhitespace', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/* <p>start</p> <div role="list"> <div role="listitem"> <span>Munich</span> <span>London</span> </div> </div> */}, function(root) { mockFeedback.expectSpeech('start') .clearPendingOutput() .call(doCmd('nextLine')) .expectSpeech('Munich') .expectNextSpeechUtteranceIsNot(' ') .expectSpeech('London') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'TabSwitchAndRefreshRecovery', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/* <p>tab1</p> */}, function(root1) { this.runWithLoadedTree(function() {/* <p>tab2</p> */}, function(root2) { mockFeedback.expectSpeech('tab2') .clearPendingOutput() .call(press(9 /* tab */, {shift: true, ctrl: true})) .expectSpeech('tab1') .clearPendingOutput() .call(press(9 /* tab */, {ctrl: true})) .expectSpeech('tab2') .clearPendingOutput() .call(press(82 /* R */, {ctrl: true})) // ChromeVox stays on the same node due to tree path recovery. .call(() => { assertEquals('tab2', ChromeVoxState.instance.currentRange.start.node.name); }) .replay(); }); }); }); TEST_F('ChromeVoxBackgroundTest', 'ListName', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/* <div id="_md-chips-wrapper-76" tabindex="-1" class="md-chips md-readonly" aria-setsize="4" aria-label="Favorite Sports" role="list" aria-describedby="chipsNote"> <div role="listitem">Baseball</div> <div role="listitem">Hockey</div> <div role="listitem">Lacrosse</div> <div role="listitem">Football</div> </div> */}, function(root) { mockFeedback.expectSpeech('Favorite Sports') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'LayoutTable', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/* <table><tr><td>start</td></tr></table> */}, function(root) { mockFeedback.expectSpeech( 'start', 'row 1 column 1', 'Table , 1 by 1') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'ReinsertedNodeRecovery', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/* <div> <button id="start">start</button> <button id="hot">hot</button> </div> <button id="end">end</button> <script> var div = document.body.firstElementChild; var start = document.getElementById('start'); document.getElementById('hot').addEventListener('focus', (evt) => { var hot = evt.target; hot.remove(); div.insertAfter(hot, start); }); </script> */}, function(root) { mockFeedback.expectSpeech('start') .clearPendingOutput() .call(doCmd('nextObject')) .call(doCmd('nextObject')) .call(doCmd('nextObject')) .expectSpeech('end', 'Button') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'HoverTargetsLeafNode', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/* <div role=button><p>Washington</p></div> <div role=button><p>Adams</p></div> <div role=button><p>Jefferson</p></div> */}, function(root) { let button = root.find({role: RoleType.BUTTON, attributes: { name: 'Jefferson' }}); let buttonP = button.firstChild; assertNotNullNorUndefined(buttonP); let buttonText = buttonP.firstChild; assertNotNullNorUndefined(buttonText); var doHover = () => { var event = new CustomAutomationEvent( EventType.HOVER, buttonText, 'action'); DesktopAutomationHandler.instance.onHover(event); }; mockFeedback .call(doHover) .expectSpeech('Jefferson') .expectSpeech('Button') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'AriaSliderWithValueNow', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/* <div id="slider" role="slider" tabindex="0" aria-valuemin="0" aria-valuenow="50" aria-valuemax="100"></div> <script> let slider = document.getElementById('slider'); slider.addEventListener('click', () => { slider.setAttribute('aria-valuenow', parseInt(slider.getAttribute('aria-valuenow'), 10) + 1); }); </script> */}, function(root) { let slider = root.find({role: RoleType.SLIDER}); assertNotNullNorUndefined(slider); mockFeedback .call(slider.doDefault.bind(slider)) .expectSpeech('51') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'AriaSliderWithValueText', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function(root) {/* <div id="slider" role="slider" tabindex="0" aria-valuemin="0" aria-valuenow="50" aria-valuemax="100" aria-valuetext="tiny"></div> <script> let slider = document.getElementById('slider'); slider.addEventListener('click', () => { slider.setAttribute('aria-valuenow', parseInt(slider.getAttribute('aria-valuenow'), 10) + 1); slider.setAttribute('aria-valuetext', 'large'); }); </script> */}, function(root) { let slider = root.find({role: RoleType.SLIDER}); assertNotNullNorUndefined(slider); mockFeedback .clearPendingOutput() .call(slider.doDefault.bind(slider)) .expectNextSpeechUtteranceIsNot('51') .expectSpeech('large') .replay(); }); }); // See https://crbug.com/924976 TEST_F('ChromeVoxBackgroundTest', 'DISABLED_ValidationTest', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/* <label for="in1">Name:</label> <input id="in1" required autofocus> <script> const in1 = document.querySelector('input'); in1.addEventListener('focus', () => { setTimeout(() => { in1.setCustomValidity('Please enter name'); in1.reportValidity(); }, 500); }); </script> */}, function(root) { mockFeedback .expectSpeech('Name:') .expectSpeech('Edit text') .expectSpeech('Required') .expectSpeech('Alert') .expectSpeech('Please enter name') .replay(); }); }); TEST_F('ChromeVoxBackgroundTest', 'AutoCompleteChanged', function() { var mockFeedback = this.createMockFeedback(); this.runWithLoadedTree(function() {/* <div><input type="text" aria-autocomplete="off"></input></div> <script> var div = document.querySelector('div'); var input = div.firstElementChild; var completion = input.getAttribute('aria-autocomplete'); div.addEventListener('click', () => { completion = completion == 'off' ? 'both' : 'off'; input.setAttribute('aria-autocomplete', completion); }); </script> */}, function(root) { var change = root.firstChild.doDefault.bind(root.firstChild); mockFeedback.expectSpeech('Edit text') .clearPendingOutput() .call(change) .expectSpeech('Edit text') .call(change) .expectSpeech('Edit text') .call(change) .expectNextSpeechUtteranceIsNot( 'Press up or down arrow for auto completions.') .expectSpeech('Edit text') .expectSpeech('Press up or down arrow for auto completions.') .replay(); }); }); ; //# sourceURL=file:///b/s/w/ir/out/Debug/test_data/chrome/browser/resources/chromeos/chromevox/cvox2/background/background_test.extjs runTest(true,"RUN_TEST_F",["ChromeVoxBackgroundTest","NativeFind"]); Stack trace: #0 0x7f9892530bd5 base::debug::StackTrace::StackTrace() #1 0x559e95ce48d0 StackTraceGetter::CurrentStackTrace() #2 0x559e95cef537 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop() #3 0x559e95cef0c3 testing::internal::AssertHelper::operator=() #4 0x559e97c5b33a extensions::browsertest_util::ExecuteScriptInBackgroundPage() #5 0x559e97ebb1aa ExtensionJSBrowserTest::RunJavascriptTestF() #6 0x559e97ca32c8 ChromeVoxBackgroundTest_NativeFind_Test::RunTestOnMainThread() #7 0x559e9887ce13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #8 0x559e93a6169d base::internal::FunctorTraits<>::Invoke<>() #9 0x559e93a615e1 base::internal::InvokeHelper<>::MakeItSo<>() #10 0x559e93a61587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #11 0x559e93c2d83c base::internal::Invoker<>::Run() #12 0x559e93a54f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #13 0x559e97fc9d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #14 0x559e97fc8b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #15 0x559e957ab4dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #16 0x7f988ad46807 content::BrowserMainLoop::PreMainMessageLoopRun() #17 0x7f988a12261d base::internal::FunctorTraits<>::Invoke<>() #18 0x7f988a122591 base::internal::InvokeHelper<>::MakeItSo<>() #19 0x7f988a122537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #20 0x7f988aaee11c base::internal::Invoker<>::Run() #21 0x7f988a096d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #22 0x7f988b559acc content::StartupTaskRunner::RunAllTasksNow() #23 0x7f988ad44fc1 content::BrowserMainLoop::CreateStartupTasks() #24 0x7f988ad4bece content::BrowserMainRunnerImpl::Initialize() #25 0x7f988ad42361 content::BrowserMain() #26 0x7f988c0a9d2b content::RunBrowserProcessMain() #27 0x7f988c0aafe6 content::ContentMainRunnerImpl::RunServiceManager() #28 0x7f988c0aaaa0 content::ContentMainRunnerImpl::Run() #29 0x7f988c0a8589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #30 0x7f986996b703 service_manager::Main() #31 0x7f988c0a9835 content::ContentMain() #32 0x559e9887ca19 content::BrowserTestBase::SetUp() #33 0x559e97f27f4e InProcessBrowserTest::SetUp() BrowserTestBase received signal: Segmentation fault. Backtrace: #0 0x7f98926c8901 base::debug::CollectStackTrace() #1 0x7f9892530c1d base::debug::StackTrace::StackTrace() #2 0x7f9892530bd5 base::debug::StackTrace::StackTrace() #3 0x559e9887d81d content::(anonymous namespace)::DumpStackTraceSignalHandler() #4 0x7f986ae45cb0 <unknown> #5 0x559e93a5912c gfx::Size::width() #6 0x559e97ebb20d ExtensionJSBrowserTest::RunJavascriptTestF() #7 0x559e97ca32c8 ChromeVoxBackgroundTest_NativeFind_Test::RunTestOnMainThread() #8 0x559e9887ce13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #9 0x559e93a6169d base::internal::FunctorTraits<>::Invoke<>() #10 0x559e93a615e1 base::internal::InvokeHelper<>::MakeItSo<>() #11 0x559e93a61587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #12 0x559e93c2d83c base::internal::Invoker<>::Run() #13 0x559e93a54f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #14 0x559e97fc9d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #15 0x559e97fc8b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #16 0x559e957ab4dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #17 0x7f988ad46807 content::BrowserMainLoop::PreMainMessageLoopRun() #18 0x7f988a12261d base::internal::FunctorTraits<>::Invoke<>() #19 0x7f988a122591 base::internal::InvokeHelper<>::MakeItSo<>() #20 0x7f988a122537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #21 0x7f988aaee11c base::internal::Invoker<>::Run() #22 0x7f988a096d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #23 0x7f988b559acc content::StartupTaskRunner::RunAllTasksNow() #24 0x7f988ad44fc1 content::BrowserMainLoop::CreateStartupTasks() #25 0x7f988ad4bece content::BrowserMainRunnerImpl::Initialize() #26 0x7f988ad42361 content::BrowserMain() #27 0x7f988c0a9d2b content::RunBrowserProcessMain() #28 0x7f988c0aafe6 content::ContentMainRunnerImpl::RunServiceManager() #29 0x7f988c0aaaa0 content::ContentMainRunnerImpl::Run() #30 0x7f988c0a8589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #31 0x7f986996b703 service_manager::Main() #32 0x7f988c0a9835 content::ContentMain() #33 0x559e9887ca19 content::BrowserTestBase::SetUp() #34 0x559e97f27f4e InProcessBrowserTest::SetUp() #35 0x559e95d0663e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #36 0x559e95d02302 testing::internal::HandleExceptionsInMethodIfSupported<>() #37 0x559e95cf5b94 testing::Test::Run() #38 0x559e95cf6282 testing::TestInfo::Run() #39 0x559e95cf6793 testing::TestSuite::Run() #40 0x559e95cfe274 testing::internal::UnitTestImpl::RunAllTests() #41 0x559e95d066ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #42 0x559e95d03152 testing::internal::HandleExceptionsInMethodIfSupported<>() #43 0x559e95cfdf97 testing::UnitTest::Run() #44 0x559e97f47d01 RUN_ALL_TESTS() #45 0x559e97f46562 base::TestSuite::Run() #46 0x559e97eaab57 ChromeTestSuiteRunner::RunTestSuite() #47 0x559e97eaac43 ChromeTestLauncherDelegate::RunTestSuite() #48 0x559e988c2005 content::LaunchTests() #49 0x559e97eaaf87 LaunchChromeTests() #50 0x559e97eaa9ab main #51 0x7f986ae30f45 __libc_start_main #52 0x559e93a0302a _start [463/694] ChromeVoxBackgroundTest.NativeFind (CRASHED) Still waiting for the following processes to finish: ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ChromeVoxCursorsTest.LineRange --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsBDhtfg/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dVJBkFt ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ChromeVoxEditingTest.RichTextMoveByLine --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultsO30SpP/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dBNmFP2 ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ChromeVoxOutputE2ETest.Input --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/resultss7QsAo/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dOG69ZB ./browser_tests --cfi-diag=0 --disable-features=SingleProcessMash --disable-gpu-process-for-dx12-vulkan-info-collection --gtest_also_run_disabled_tests --gtest_filter=ChromeVoxOutputE2ETest.BraileWhitespace --override-use-software-gl-for-tests --single_process --test-launcher-bot-mode --test-launcher-output=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/results2lpdLX/test_results.xml --test-launcher-summary-output=/b/s/w/ioYrRL7f/output.json --user-data-dir=/b/s/w/itVzDBJC/.org.chromium.Chromium.MCyYwe/dxilPab [464/694] ChromeVoxCursorsTest.LineRange (19427 ms) [0212/012316.719049:ERROR:kill_posix.cc(84)] Unable to terminate process group 15989: No such process (3) <truncated> * hasProperty(3, obj.arr); // false * * @param {Objuect} object * @param {String|Number} name * @returns {Boolean} whether it exists * @name getPathInfo * @api public */ var literals = { 'number': Number , 'string': String }; module.exports = function hasProperty(name, obj) { var ot = type(obj); // Bad Object, obviously no props at all if(ot === 'null' || ot === 'undefined') return false; // The `in` operator does not work with certain literals // box these before the check if(literals[ot] && typeof obj !== 'object') obj = new literals[ot](obj); return name in obj; }; },{"type-detect":35}],22:[function(require,module,exports){ /*! * chai * Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Main exports */ var exports = module.exports = {}; /*! * test utility */ exports.test = require('./test'); /*! * type utility */ exports.type = require('type-detect'); /*! * expectTypes utility */ exports.expectTypes = require('./expectTypes'); /*! * message utility */ exports.getMessage = require('./getMessage'); /*! * actual utility */ exports.getActual = require('./getActual'); /*! * Inspect util */ exports.inspect = require('./inspect'); /*! * Object Display util */ exports.objDisplay = require('./objDisplay'); /*! * Flag utility */ exports.flag = require('./flag'); /*! * Flag transferring utility */ exports.transferFlags = require('./transferFlags'); /*! * Deep equal utility */ exports.eql = require('deep-eql'); /*! * Deep path value */ exports.getPathValue = require('./getPathValue'); /*! * Deep path info */ exports.getPathInfo = require('./getPathInfo'); /*! * Check if a property exists */ exports.hasProperty = require('./hasProperty'); /*! * Function name */ exports.getName = require('./getName'); /*! * add Property */ exports.addProperty = require('./addProperty'); /*! * add Method */ exports.addMethod = require('./addMethod'); /*! * overwrite Property */ exports.overwriteProperty = require('./overwriteProperty'); /*! * overwrite Method */ exports.overwriteMethod = require('./overwriteMethod'); /*! * Add a chainable method */ exports.addChainableMethod = require('./addChainableMethod'); /*! * Overwrite chainable method */ exports.overwriteChainableMethod = require('./overwriteChainableMethod'); },{"./addChainableMethod":9,"./addMethod":10,"./addProperty":11,"./expectTypes":12,"./flag":13,"./getActual":14,"./getMessage":16,"./getName":17,"./getPathInfo":18,"./getPathValue":19,"./hasProperty":21,"./inspect":23,"./objDisplay":24,"./overwriteChainableMethod":25,"./overwriteMethod":26,"./overwriteProperty":27,"./test":28,"./transferFlags":29,"deep-eql":31,"type-detect":35}],23:[function(require,module,exports){ // This is (almost) directly from Node.js utils // https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js var getName = require('./getName'); var getProperties = require('./getProperties'); var getEnumerableProperties = require('./getEnumerableProperties'); module.exports = inspect; /** * Echos the value of a value. Trys to print the value out * in the best way possible given the different types. * * @param {Object} obj The object to print out. * @param {Boolean} showHidden Flag that shows hidden (not enumerable) * properties of objects. * @param {Number} depth Depth in which to descend in object. Default is 2. * @param {Boolean} colors Flag to turn on ANSI escape codes to color the * output. Default is false (no coloring). */ function inspect(obj, showHidden, depth, colors) { var ctx = { showHidden: showHidden, seen: [], stylize: function (str) { return str; } }; return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth)); } // Returns true if object is a DOM element. var isDOMElement = function (object) { if (typeof HTMLElement === 'object') { return object instanceof HTMLElement; } else { return object && typeof object === 'object' && object.nodeType === 1 && typeof object.nodeName === 'string'; } }; function formatValue(ctx, value, recurseTimes) { // Provide a hook for user-specified inspect functions. // Check that value is an object with an inspect function on it if (value && typeof value.inspect === 'function' && // Filter out the util module, it's inspect function is special value.inspect !== exports.inspect && // Also filter out any prototype objects using the circular check. !(value.constructor && value.constructor.prototype === value)) { var ret = value.inspect(recurseTimes); if (typeof ret !== 'string') { ret = formatValue(ctx, ret, recurseTimes); } return ret; } // Primitive types cannot have properties var primitive = formatPrimitive(ctx, value); if (primitive) { return primitive; } // If this is a DOM element, try to get the outer HTML. if (isDOMElement(value)) { if ('outerHTML' in value) { return value.outerHTML; // This value does not have an outerHTML attribute, // it could still be an XML element } else { // Attempt to serialize it try { if (document.xmlVersion) { var xmlSerializer = new XMLSerializer(); return xmlSerializer.serializeToString(value); } else { // Firefox 11- do not support outerHTML // It does, however, support innerHTML // Use the following to render the element var ns = "http://www.w3.org/1999/xhtml"; var container = document.createElementNS(ns, '_'); container.appendChild(value.cloneNode(false)); html = container.innerHTML .replace('><', '>' + value.innerHTML + '<'); container.innerHTML = ''; return html; } } catch (err) { // This could be a non-native DOM implementation, // continue with the normal flow: // printing the element as if it is an object. } } } // Look up the keys of the object. var visibleKeys = getEnumerableProperties(value); var keys = ctx.showHidden ? getProperties(value) : visibleKeys; // Some type of object without properties can be shortcutted. // In IE, errors have a single `stack` property, or if they are vanilla `Error`, // a `stack` plus `description` property; ignore those for consistency. if (keys.length === 0 || (isError(value) && ( (keys.length === 1 && keys[0] === 'stack') || (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack') ))) { if (typeof value === 'function') { var name = getName(value); var nameSuffix = name ? ': ' + name : ''; return ctx.stylize('[Function' + nameSuffix + ']', 'special'); } if (isRegExp(value)) { return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); } if (isDate(value)) { return ctx.stylize(Date.prototype.toUTCString.call(value), 'date'); } if (isError(value)) { return formatError(value); } } var base = '', array = false, braces = ['{', '}']; // Make Array say that they are Array if (isArray(value)) { array = true; braces = ['[', ']']; } // Make functions say that they are functions if (typeof value === 'function') { var name = getName(value); var nameSuffix = name ? ': ' + name : ''; base = ' [Function' + nameSuffix + ']'; } // Make RegExps say that they are RegExps if (isRegExp(value)) { base = ' ' + RegExp.prototype.toString.call(value); } // Make dates with properties first say the date if (isDate(value)) { base = ' ' + Date.prototype.toUTCString.call(value); } // Make error with message first say the error if (isError(value)) { return formatError(value); } if (keys.length === 0 && (!array || value.length == 0)) { return braces[0] + base + braces[1]; } if (recurseTimes < 0) { if (isRegExp(value)) { return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); } else { return ctx.stylize('[Object]', 'special'); } } ctx.seen.push(value); var output; if (array) { output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); } else { output = keys.map(function(key) { return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); }); } ctx.seen.pop(); return reduceToSingleString(output, base, braces); } function formatPrimitive(ctx, value) { switch (typeof value) { case 'undefined': return ctx.stylize('undefined', 'undefined'); case 'string': var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') .replace(/'/g, "\\'") .replace(/\\"/g, '"') + '\''; return ctx.stylize(simple, 'string'); case 'number': if (value === 0 && (1/value) === -Infinity) { return ctx.stylize('-0', 'number'); } return ctx.stylize('' + value, 'number'); case 'boolean': return ctx.stylize('' + value, 'boolean'); } // For some reason typeof null is "object", so special case here. if (value === null) { return ctx.stylize('null', 'null'); } } function formatError(value) { return '[' + Error.prototype.toString.call(value) + ']'; } function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { var output = []; for (var i = 0, l = value.length; i < l; ++i) { if (Object.prototype.hasOwnProperty.call(value, String(i))) { output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true)); } else { output.push(''); } } keys.forEach(function(key) { if (!key.match(/^\d+$/)) { output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true)); } }); return output; } function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { var name, str; if (value.__lookupGetter__) { if (value.__lookupGetter__(key)) { if (value.__lookupSetter__(key)) { str = ctx.stylize('[Getter/Setter]', 'special'); } else { str = ctx.stylize('[Getter]', 'special'); } } else { if (value.__lookupSetter__(key)) { str = ctx.stylize('[Setter]', 'special'); } } } if (visibleKeys.indexOf(key) < 0) { name = '[' + key + ']'; } if (!str) { if (ctx.seen.indexOf(value[key]) < 0) { if (recurseTimes === null) { str = formatValue(ctx, value[key], null); } else { str = formatValue(ctx, value[key], recurseTimes - 1); } if (str.indexOf('\n') > -1) { if (array) { str = str.split('\n').map(function(line) { return ' ' + line; }).join('\n').substr(2); } else { str = '\n' + str.split('\n').map(function(line) { return ' ' + line; }).join('\n'); } } } else { str = ctx.stylize('[Circular]', 'special'); } } if (typeof name === 'undefined') { if (array && key.match(/^\d+$/)) { return str; } name = JSON.stringify('' + key); if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { name = name.substr(1, name.length - 2); name = ctx.stylize(name, 'name'); } else { name = name.replace(/'/g, "\\'") .replace(/\\"/g, '"') .replace(/(^"|"$)/g, "'"); name = ctx.stylize(name, 'string'); } } return name + ': ' + str; } function reduceToSingleString(output, base, braces) { var numLinesEst = 0; var length = output.reduce(function(prev, cur) { numLinesEst++; if (cur.indexOf('\n') >= 0) numLinesEst++; return prev + cur.length + 1; }, 0); if (length > 60) { return braces[0] + (base === '' ? '' : base + '\n ') + ' ' + output.join(',\n ') + ' ' + braces[1]; } return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; } function isArray(ar) { return Array.isArray(ar) || (typeof ar === 'object' && objectToString(ar) === '[object Array]'); } function isRegExp(re) { return typeof re === 'object' && objectToString(re) === '[object RegExp]'; } function isDate(d) { return typeof d === 'object' && objectToString(d) === '[object Date]'; } function isError(e) { return typeof e === 'object' && objectToString(e) === '[object Error]'; } function objectToString(o) { return Object.prototype.toString.call(o); } },{"./getEnumerableProperties":15,"./getName":17,"./getProperties":20}],24:[function(require,module,exports){ /*! * Chai - flag utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Module dependancies */ var inspect = require('./inspect'); var config = require('../config'); /** * ### .objDisplay (object) * * Determines if an object or an array matches * criteria to be inspected in-line for error * messages or should be truncated. * * @param {Mixed} javascript object to inspect * @name objDisplay * @api public */ module.exports = function (obj) { var str = inspect(obj) , type = Object.prototype.toString.call(obj); if (config.truncateThreshold && str.length >= config.truncateThreshold) { if (type === '[object Function]') { return !obj.name || obj.name === '' ? '[Function]' : '[Function: ' + obj.name + ']'; } else if (type === '[object Array]') { return '[ Array(' + obj.length + ') ]'; } else if (type === '[object Object]') { var keys = Object.keys(obj) , kstr = keys.length > 2 ? keys.splice(0, 2).join(', ') + ', ...' : keys.join(', '); return '{ Object (' + kstr + ') }'; } else { return str; } } else { return str; } }; },{"../config":4,"./inspect":23}],25:[function(require,module,exports){ /*! * Chai - overwriteChainableMethod utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### overwriteChainableMethod (ctx, name, method, chainingBehavior) * * Overwites an already existing chainable method * and provides access to the previous function or * property. Must return functions to be used for * name. * * utils.overwriteChainableMethod(chai.Assertion.prototype, 'length', * function (_super) { * } * , function (_super) { * } * ); * * Can also be accessed directly from `chai.Assertion`. * * chai.Assertion.overwriteChainableMethod('foo', fn, fn); * * Then can be used as any other assertion. * * expect(myFoo).to.have.length(3); * expect(myFoo).to.have.length.above(3); * * @param {Object} ctx object whose method / property is to be overwritten * @param {String} name of method / property to overwrite * @param {Function} method function that returns a function to be used for name * @param {Function} chainingBehavior function that returns a function to be used for property * @name overwriteChainableMethod * @api public */ module.exports = function (ctx, name, method, chainingBehavior) { var chainableBehavior = ctx.__methods[name]; var _chainingBehavior = chainableBehavior.chainingBehavior; chainableBehavior.chainingBehavior = function () { var result = chainingBehavior(_chainingBehavior).call(this); return result === undefined ? this : result; }; var _method = chainableBehavior.method; chainableBehavior.method = function () { var result = method(_method).apply(this, arguments); return result === undefined ? this : result; }; }; },{}],26:[function(require,module,exports){ /*! * Chai - overwriteMethod utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### overwriteMethod (ctx, name, fn) * * Overwites an already existing method and provides * access to previous function. Must return function * to be used for name. * * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) { * return function (str) { * var obj = utils.flag(this, 'object'); * if (obj instanceof Foo) { * new chai.Assertion(obj.value).to.equal(str); * } else { * _super.apply(this, arguments); * } * } * }); * * Can also be accessed directly from `chai.Assertion`. * * chai.Assertion.overwriteMethod('foo', fn); * * Then can be used as any other assertion. * * expect(myFoo).to.equal('bar'); * * @param {Object} ctx object whose method is to be overwritten * @param {String} name of method to overwrite * @param {Function} method function that returns a function to be used for name * @name overwriteMethod * @api public */ module.exports = function (ctx, name, method) { var _method = ctx[name] , _super = function () { return this; }; if (_method && 'function' === typeof _method) _super = _method; ctx[name] = function () { var result = method(_super).apply(this, arguments); return result === undefined ? this : result; } }; },{}],27:[function(require,module,exports){ /*! * Chai - overwriteProperty utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### overwriteProperty (ctx, name, fn) * * Overwites an already existing property getter and provides * access to previous value. Must return function to use as getter. * * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) { * return function () { * var obj = utils.flag(this, 'object'); * if (obj instanceof Foo) { * new chai.Assertion(obj.name).to.equal('bar'); * } else { * _super.call(this); * } * } * }); * * * Can also be accessed directly from `chai.Assertion`. * * chai.Assertion.overwriteProperty('foo', fn); * * Then can be used as any other assertion. * * expect(myFoo).to.be.ok; * * @param {Object} ctx object whose property is to be overwritten * @param {String} name of property to overwrite * @param {Function} getter function that returns a getter function to be used for name * @name overwriteProperty * @api public */ module.exports = function (ctx, name, getter) { var _get = Object.getOwnPropertyDescriptor(ctx, name) , _super = function () {}; if (_get && 'function' === typeof _get.get) _super = _get.get Object.defineProperty(ctx, name, { get: function () { var result = getter(_super).call(this); return result === undefined ? this : result; } , configurable: true }); }; },{}],28:[function(require,module,exports){ /*! * Chai - test utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Module dependancies */ var flag = require('./flag'); /** * # test(object, expression) * * Test and object for expression. * * @param {Object} object (constructed Assertion) * @param {Arguments} chai.Assertion.prototype.assert arguments */ module.exports = function (obj, args) { var negate = flag(obj, 'negate') , expr = args[0]; return negate ? !expr : expr; }; },{"./flag":13}],29:[function(require,module,exports){ /*! * Chai - transferFlags utility * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /** * ### transferFlags(assertion, object, includeAll = true) * * Transfer all the flags for `assertion` to `object`. If * `includeAll` is set to `false`, then the base Chai * assertion flags (namely `object`, `ssfi`, and `message`) * will not be transferred. * * * var newAssertion = new Assertion(); * utils.transferFlags(assertion, newAssertion); * * var anotherAsseriton = new Assertion(myObj); * utils.transferFlags(assertion, anotherAssertion, false); * * @param {Assertion} assertion the assertion to transfer the flags from * @param {Object} object the object to transfer the flags to; usually a new assertion * @param {Boolean} includeAll * @name transferFlags * @api private */ module.exports = function (assertion, object, includeAll) { var flags = assertion.__flags || (assertion.__flags = Object.create(null)); if (!object.__flags) { object.__flags = Object.create(null); } includeAll = arguments.length === 3 ? includeAll : true; for (var flag in flags) { if (includeAll || (flag !== 'object' && flag !== 'ssfi' && flag != 'message')) { object.__flags[flag] = flags[flag]; } } }; },{}],30:[function(require,module,exports){ /*! * assertion-error * Copyright(c) 2013 Jake Luer <jake@qualiancy.com> * MIT Licensed */ /*! * Return a function that will copy properties from * one object to another excluding any originally * listed. Returned function will create a new `{}`. * * @param {String} excluded properties ... * @return {Function} */ function exclude () { var excludes = [].slice.call(arguments); function excludeProps (res, obj) { Object.keys(obj).forEach(function (key) { if (!~excludes.indexOf(key)) res[key] = obj[key]; }); } return function extendExclude () { var args = [].slice.call(arguments) , i = 0 , res = {}; for (; i < args.length; i++) { excludeProps(res, args[i]); } return res; }; }; /*! * Primary Exports */ module.exports = AssertionError; /** * ### AssertionError * * An extension of the JavaScript `Error` constructor for * assertion and validation scenarios. * * @param {String} message * @param {Object} properties to include (optional) * @param {callee} start stack function (optional) */ function AssertionError (message, _props, ssf) { var extend = exclude('name', 'message', 'stack', 'constructor', 'toJSON') , props = extend(_props || {}); // default values this.message = message || 'Unspecified AssertionError'; this.showDiff = false; // copy from properties for (var key in props) { this[key] = props[key]; } // capture stack trace ssf = ssf || arguments.callee; if (ssf && Error.captureStackTrace) { Error.captureStackTrace(this, ssf); } else { this.stack = new Error().stack; } } /*! * Inherit from Error.prototype */ AssertionError.prototype = Object.create(Error.prototype); /*! * Statically set name */ AssertionError.prototype.name = 'AssertionError'; /*! * Ensure correct constructor */ AssertionError.prototype.constructor = AssertionError; /** * Allow errors to be converted to JSON for static transfer. * * @param {Boolean} include stack (default: `true`) * @return {Object} object that can be `JSON.stringify` */ AssertionError.prototype.toJSON = function (stack) { var extend = exclude('constructor', 'toJSON', 'stack') , props = extend({ name: this.name }, this); // include stack if exists and not turned off if (false !== stack && this.stack) { props.stack = this.stack; } return props; }; },{}],31:[function(require,module,exports){ module.exports = require('./lib/eql'); },{"./lib/eql":32}],32:[function(require,module,exports){ /*! * deep-eql * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Module dependencies */ var type = require('type-detect'); /*! * Buffer.isBuffer browser shim */ var Buffer; try { Buffer = require('buffer').Buffer; } catch(ex) { Buffer = {}; Buffer.isBuffer = function() { return false; } } /*! * Primary Export */ module.exports = deepEqual; /** * Assert super-strict (egal) equality between * two objects of any type. * * @param {Mixed} a * @param {Mixed} b * @param {Array} memoised (optional) * @return {Boolean} equal match */ function deepEqual(a, b, m) { if (sameValue(a, b)) { return true; } else if ('date' === type(a)) { return dateEqual(a, b); } else if ('regexp' === type(a)) { return regexpEqual(a, b); } else if (Buffer.isBuffer(a)) { return bufferEqual(a, b); } else if ('arguments' === type(a)) { return argumentsEqual(a, b, m); } else if (!typeEqual(a, b)) { return false; } else if (('object' !== type(a) && 'object' !== type(b)) && ('array' !== type(a) && 'array' !== type(b))) { return sameValue(a, b); } else { return objectEqual(a, b, m); } } /*! * Strict (egal) equality test. Ensures that NaN always * equals NaN and `-0` does not equal `+0`. * * @param {Mixed} a * @param {Mixed} b * @return {Boolean} equal match */ function sameValue(a, b) { if (a === b) return a !== 0 || 1 / a === 1 / b; return a !== a && b !== b; } /*! * Compare the types of two given objects and * return if they are equal. Note that an Array * has a type of `array` (not `object`) and arguments * have a type of `arguments` (not `array`/`object`). * * @param {Mixed} a * @param {Mixed} b * @return {Boolean} result */ function typeEqual(a, b) { return type(a) === type(b); } /*! * Compare two Date objects by asserting that * the time values are equal using `saveValue`. * * @param {Date} a * @param {Date} b * @return {Boolean} result */ function dateEqual(a, b) { if ('date' !== type(b)) return false; return sameValue(a.getTime(), b.getTime()); } /*! * Compare two regular expressions by converting them * to string and checking for `sameValue`. * * @param {RegExp} a * @param {RegExp} b * @return {Boolean} result */ function regexpEqual(a, b) { if ('regexp' !== type(b)) return false; return sameValue(a.toString(), b.toString()); } /*! * Assert deep equality of two `arguments` objects. * Unfortunately, these must be sliced to arrays * prior to test to ensure no bad behavior. * * @param {Arguments} a * @param {Arguments} b * @param {Array} memoize (optional) * @return {Boolean} result */ function argumentsEqual(a, b, m) { if ('arguments' !== type(b)) return false; a = [].slice.call(a); b = [].slice.call(b); return deepEqual(a, b, m); } /*! * Get enumerable properties of a given object. * * @param {Object} a * @return {Array} property names */ function enumerable(a) { var res = []; for (var key in a) res.push(key); return res; } /*! * Simple equality for flat iterable objects * such as Arrays or Node.js buffers. * * @param {Iterable} a * @param {Iterable} b * @return {Boolean} result */ function iterableEqual(a, b) { if (a.length !== b.length) return false; var i = 0; var match = true; for (; i < a.length; i++) { if (a[i] !== b[i]) { match = false; break; } } return match; } /*! * Extension to `iterableEqual` specifically * for Node.js Buffers. * * @param {Buffer} a * @param {Mixed} b * @return {Boolean} result */ function bufferEqual(a, b) { if (!Buffer.isBuffer(b)) return false; return iterableEqual(a, b); } /*! * Block for `objectEqual` ensuring non-existing * values don't get in. * * @param {Mixed} object * @return {Boolean} result */ function isValue(a) { return a !== null && a !== undefined; } /*! * Recursively check the equality of two objects. * Once basic sameness has been established it will * defer to `deepEqual` for each enumerable key * in the object. * * @param {Mixed} a * @param {Mixed} b * @return {Boolean} result */ function objectEqual(a, b, m) { if (!isValue(a) || !isValue(b)) { return false; } if (a.prototype !== b.prototype) { return false; } var i; if (m) { for (i = 0; i < m.length; i++) { if ((m[i][0] === a && m[i][1] === b) || (m[i][0] === b && m[i][1] === a)) { return true; } } } else { m = []; } try { var ka = enumerable(a); var kb = enumerable(b); } catch (ex) { return false; } ka.sort(); kb.sort(); if (!iterableEqual(ka, kb)) { return false; } m.push([ a, b ]); var key; for (i = ka.length - 1; i >= 0; i--) { key = ka[i]; if (!deepEqual(a[key], b[key], m)) { return false; } } return true; } },{"buffer":undefined,"type-detect":33}],33:[function(require,module,exports){ module.exports = require('./lib/type'); },{"./lib/type":34}],34:[function(require,module,exports){ /*! * type-detect * Copyright(c) 2013 jake luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Primary Exports */ var exports = module.exports = getType; /*! * Detectable javascript natives */ var natives = { '[object Array]': 'array' , '[object RegExp]': 'regexp' , '[object Function]': 'function' , '[object Arguments]': 'arguments' , '[object Date]': 'date' }; /** * ### typeOf (obj) * * Use several different techniques to determine * the type of object being tested. * * * @param {Mixed} object * @return {String} object type * @api public */ function getType (obj) { var str = Object.prototype.toString.call(obj); if (natives[str]) return natives[str]; if (obj === null) return 'null'; if (obj === undefined) return 'undefined'; if (obj === Object(obj)) return 'object'; return typeof obj; } exports.Library = Library; /** * ### Library * * Create a repository for custom type detection. * * ```js * var lib = new type.Library; * ``` * */ function Library () { this.tests = {}; } /** * #### .of (obj) * * Expose replacement `typeof` detection to the library. * * ```js * if ('string' === lib.of('hello world')) { * // ... * } * ``` * * @param {Mixed} object to test * @return {String} type */ Library.prototype.of = getType; /** * #### .define (type, test) * * Add a test to for the `.test()` assertion. * * Can be defined as a regular expression: * * ```js * lib.define('int', /^[0-9]+$/); * ``` * * ... or as a function: * * ```js * lib.define('bln', function (obj) { * if ('boolean' === lib.of(obj)) return true; * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ]; * if ('string' === lib.of(obj)) obj = obj.toLowerCase(); * return !! ~blns.indexOf(obj); * }); * ``` * * @param {String} type * @param {RegExp|Function} test * @api public */ Library.prototype.define = function (type, test) { if (arguments.length === 1) return this.tests[type]; this.tests[type] = test; return this; }; /** * #### .test (obj, test) * * Assert that an object is of type. Will first * check natives, and if that does not pass it will * use the user defined custom tests. * * ```js * assert(lib.test('1', 'int')); * assert(lib.test('yes', 'bln')); * ``` * * @param {Mixed} object * @param {String} type * @return {Boolean} result * @api public */ Library.prototype.test = function (obj, type) { if (type === getType(obj)) return true; var test = this.tests[type]; if (test && 'regexp' === getType(test)) { return test.test(obj); } else if (test && 'function' === getType(test)) { return test(obj); } else { throw new ReferenceError('Type test "' + type + '" not defined or invalid.'); } }; },{}],35:[function(require,module,exports){ arguments[4][33][0].apply(exports,arguments) },{"./lib/type":36,"dup":33}],36:[function(require,module,exports){ /*! * type-detect * Copyright(c) 2013 jake luer <jake@alogicalparadox.com> * MIT Licensed */ /*! * Primary Exports */ var exports = module.exports = getType; /** * ### typeOf (obj) * * Use several different techniques to determine * the type of object being tested. * * * @param {Mixed} object * @return {String} object type * @api public */ var objectTypeRegexp = /^\[object (.*)\]$/; function getType(obj) { var type = Object.prototype.toString.call(obj).match(objectTypeRegexp)[1].toLowerCase(); // Let "new String('')" return 'object' if (typeof Promise === 'function' && obj instanceof Promise) return 'promise'; // PhantomJS has type "DOMWindow" for null if (obj === null) return 'null'; // PhantomJS has type "DOMWindow" for undefined if (obj === undefined) return 'undefined'; return type; } exports.Library = Library; /** * ### Library * * Create a repository for custom type detection. * * ```js * var lib = new type.Library; * ``` * */ function Library() { if (!(this instanceof Library)) return new Library(); this.tests = {}; } /** * #### .of (obj) * * Expose replacement `typeof` detection to the library. * * ```js * if ('string' === lib.of('hello world')) { * // ... * } * ``` * * @param {Mixed} object to test * @return {String} type */ Library.prototype.of = getType; /** * #### .define (type, test) * * Add a test to for the `.test()` assertion. * * Can be defined as a regular expression: * * ```js * lib.define('int', /^[0-9]+$/); * ``` * * ... or as a function: * * ```js * lib.define('bln', function (obj) { * if ('boolean' === lib.of(obj)) return true; * var blns = [ 'yes', 'no', 'true', 'false', 1, 0 ]; * if ('string' === lib.of(obj)) obj = obj.toLowerCase(); * return !! ~blns.indexOf(obj); * }); * ``` * * @param {String} type * @param {RegExp|Function} test * @api public */ Library.prototype.define = function(type, test) { if (arguments.length === 1) return this.tests[type]; this.tests[type] = test; return this; }; /** * #### .test (obj, test) * * Assert that an object is of type. Will first * check natives, and if that does not pass it will * use the user defined custom tests. * * ```js * assert(lib.test('1', 'int')); * assert(lib.test('yes', 'bln')); * ``` * * @param {Mixed} object * @param {String} type * @return {Boolean} result * @api public */ Library.prototype.test = function(obj, type) { if (type === getType(obj)) return true; var test = this.tests[type]; if (test && 'regexp' === getType(test)) { return test.test(obj); } else if (test && 'function' === getType(test)) { return test(obj); } else { throw new ReferenceError('Type test "' + type + '" not defined or invalid.'); } }; },{}]},{},[1])(1) });; //# sourceURL=file:///b/s/w/ir/third_party/chaijs/chai.js // Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview Library providing basic test framework functionality. */ // See assert.js for where this is used. this.traceAssertionsForTesting = true; var hasWindow = !!this.window; /** * Namespace for |Test|. * @type {Object} */ var testing = {}; (function(exports) { /** * Holds the original version of the |chrome| object. */ var originalChrome = null; /** * Hold the currentTestCase across between preLoad and run. * @type {TestCase} */ var currentTestCase = null; /** * Value set to true by WebUIBrowserTest if test harness should wait for user to * attach a debugger. * * @type {boolean} */ var waitUser = false; /** * The string representation of the currently running test function. * @type {?string} */ var currentTestFunction = null; /** * The arguments of the currently running test. * @type {Array} */ var currentTestArguments = []; /** * This class will be exported as testing.Test, and is provided to hold the * fixture's configuration and callback methods for the various phases of * invoking a test. It is called "Test" rather than TestFixture to roughly * mimic the gtest's class names. * @constructor */ function Test() {} /** * Make all transitions and animations take 0ms. NOTE: this will completely * disable webkitTransitionEnd events. If your code relies on them firing, it * will break. animationend events should still work. */ Test.disableAnimationsAndTransitions = function() { let all = document.body.querySelectorAll('*, * /deep/ *'); const ZERO_MS_IMPORTANT = '0ms !important'; for (let i = 0, l = all.length; i < l; ++i) { let style = all[i].style; style.animationDelay = ZERO_MS_IMPORTANT; style.animationDuration = ZERO_MS_IMPORTANT; style.transitionDelay = ZERO_MS_IMPORTANT; style.transitionDuration = ZERO_MS_IMPORTANT; } var realElementAnimate = Element.prototype.animate; Element.prototype.animate = function(keyframes, opt_options) { if (typeof opt_options == 'object') { opt_options.duration = 0; } else { opt_options = 0; } return realElementAnimate.call(this, keyframes, opt_options); }; if (document.timeline && document.timeline.play) { var realTimelinePlay = document.timeline.play; document.timeline.play = function(a) { a.timing.duration = 0; return realTimelinePlay.call(document.timeline, a); }; } }; Test.prototype = { /** * The name of the test. */ name: null, /** * When set to a string value representing a url, generate BrowsePreload * call, which will browse to the url and call fixture.preLoad of the * currentTestCase. * @type {string} */ browsePreload: null, /** * When set to a string value representing an html page in the test * directory, generate BrowsePrintPreload call, which will browse to a url * representing the file, cause print, and call fixture.preLoad of the * currentTestCase. * @type {string} */ browsePrintPreload: null, /** * When set to a function, will be called in the context of the test * generation inside the function, after AddLibrary calls and before * generated C++. * @type {function(string,string)} */ testGenPreamble: null, /** * When set to a function, will be called in the context of the test * generation inside the function, and after any generated C++. * @type {function(string,string)} */ testGenPostamble: null, /** * When set to a non-null string, auto-generate typedef before generating * TEST*: {@code typedef typedefCppFixture testFixture}. * @type {string} */ typedefCppFixture: 'WebUIBrowserTest', /** * This should be initialized by the test fixture and can be referenced * during the test run. It holds any mocked handler methods. * @type {?Mock4JS.Mock} */ mockHandler: null, /** * This should be initialized by the test fixture and can be referenced * during the test run. It holds any mocked global functions. * @type {?Mock4JS.Mock} */ mockGlobals: null, /** * Value is passed through call to C++ RunJavascriptF to invoke this test. * @type {boolean} */ isAsync: false, /** * True when the test is expected to fail for testing the test framework. * @type {boolean} */ testShouldFail: false, /** * Extra libraries to add before loading this test file. * @type {Array<string>} */ extraLibraries: [], /** * Extra libraries to add before loading this test file. * This list is in the form of Closure library style object * names. To support this, a closure deps.js file must * be specified when generating the test C++ source. * The specified libraries will be included with their transitive * dependencies according to the deps file. * @type {Array<string>} */ closureModuleDeps: [], /** * Whether to run the accessibility checks. * @type {boolean} */ runAccessibilityChecks: true, /** * Configuration for the accessibility audit. * @type {axs.AuditConfiguration} */ accessibilityAuditConfig_: null, /** * Returns the configuration for the accessibility audit, creating it * on-demand. * @return {!axs.AuditConfiguration} */ get accessibilityAuditConfig() { if (!this.accessibilityAuditConfig_) { this.accessibilityAuditConfig_ = new axs.AuditConfiguration(); this.accessibilityAuditConfig_.showUnsupportedRulesWarning = false; this.accessibilityAuditConfig_.auditRulesToIgnore = [ // The "elements with meaningful background image" accessibility // audit (AX_IMAGE_01) does not apply, since Chrome doesn't // disable background images in high-contrast mode like some // browsers do. 'elementsWithMeaningfulBackgroundImage', // Most WebUI pages are inside an IFrame, so the "web page should // have a title that describes topic or purpose" test (AX_TITLE_01) // generally does not apply. 'pageWithoutTitle', // TODO(aboxhall): re-enable when crbug.com/267035 is fixed. // Until then it's just noise. 'lowContrastElements', // TODO(apacible): re-enable when following issue is fixed. // github.com/GoogleChrome/accessibility-developer-tools/issues/251 'tableHasAppropriateHeaders', // TODO(crbug.com/657514): This rule is flaky on Linux/ChromeOS. 'requiredOwnedAriaRoleMissing', ]; } return this.accessibilityAuditConfig_; }, /** * Whether to treat accessibility issues (errors or warnings) as test * failures. If true, any accessibility issues will cause the test to fail. * If false, accessibility issues will cause a console.warn. * Off by default to begin with; as we add the ability to suppress false * positives, we will transition this to true. * @type {boolean} */ accessibilityIssuesAreErrors: false, /** * Holds any accessibility results found during the accessibility audit. * @type {Array<Object>} */ a11yResults_: [], /** * Gets the list of accessibility errors found during the accessibility * audit. Only for use in testing. * @return {Array<Object>} */ getAccessibilityResults: function() { return this.a11yResults_; }, /** * Run accessibility checks after this test completes. */ enableAccessibilityChecks: function() { this.runAccessibilityChecks = true; }, /** * Don't run accessibility checks after this test completes. */ disableAccessibilityChecks: function() { this.runAccessibilityChecks = false; }, /** * Create a new class to handle |messageNames|, assign it to * |this.mockHandler|, register its messages and return it. * @return {Mock} Mock handler class assigned to |this.mockHandler|. */ makeAndRegisterMockHandler: function(messageNames) { var MockClass = makeMockClass(messageNames); this.mockHandler = mock(MockClass); registerMockMessageCallbacks(this.mockHandler, MockClass); return this.mockHandler; }, /** * Create a new class to handle |functionNames|, assign it to * |this.mockGlobals|, register its global overrides, and return it. * @return {Mock} Mock handler class assigned to |this.mockGlobals|. * @see registerMockGlobals */ makeAndRegisterMockGlobals: function(functionNames) { var MockClass = makeMockClass(functionNames); this.mockGlobals = mock(MockClass); registerMockGlobals(this.mockGlobals, MockClass); return this.mockGlobals; }, /** * Create a container of mocked standalone functions to handle * '.'-separated |apiNames|, assign it to |this.mockApis|, register its API * overrides and return it. * @return {Mock} Mock handler class. * @see makeMockFunctions * @see registerMockApis */ makeAndRegisterMockApis: function(apiNames) { var apiMockNames = apiNames.map(function(name) { return name.replace(/\./g, '_'); }); this.mockApis = makeMockFunctions(apiMockNames); registerMockApis(this.mockApis); return this.mockApis; }, /** * Create a container of mocked standalone functions to handle * |functionNames|, assign it to |this.mockLocalFunctions| and return it. * @param {!Array<string>} functionNames * @return {Mock} Mock handler class. * @see makeMockFunctions */ makeMockLocalFunctions: function(functionNames) { this.mockLocalFunctions = makeMockFunctions(functionNames); return this.mockLocalFunctions; }, /** * Override this method to perform initialization during preload (such as * creating mocks and registering handlers). * @type {Function} */ preLoad: function() {}, /** * Override this method to perform tasks before running your test. * @type {Function} */ setUp: function() { // These should be ignored in many of the web UI tests. // user-image-stream and supervised-user-creation-image-stream are // streaming video elements used for capturing a user image so they // won't have captions and should be ignored everywhere. this.accessibilityAuditConfig.ignoreSelectors( 'videoWithoutCaptions', '.user-image-stream'); this.accessibilityAuditConfig.ignoreSelectors( 'videoWithoutCaptions', '.supervised-user-creation-image-stream'); }, /** * Override this method to perform tasks after running your test. If you * create a mock class, you must call Mock4JS.verifyAllMocks() in this * phase. * @type {Function} */ tearDown: function() { if (typeof document != 'undefined') { var noAnimationStyle = document.getElementById('no-animation'); if (noAnimationStyle) { noAnimationStyle.parentNode.removeChild(noAnimationStyle); } } Mock4JS.verifyAllMocks(); }, /** * Called to run the body from the perspective of this fixture. * @type {Function} */ runTest: function(testBody) { testBody.call(this); }, /** * Called to run the accessibility audit from the perspective of this * fixture. */ runAccessibilityAudit: function() { if (!this.runAccessibilityChecks || typeof document === 'undefined') { return; } var auditConfig = this.accessibilityAuditConfig; if (!runAccessibilityAudit(this.a11yResults_, auditConfig)) { var report = accessibilityAuditReport(this.a11yResults_); if (this.accessibilityIssuesAreErrors) { throw new Error(report); } else { console.warn(report); } } }, /** * Create a closure function for continuing the test at a later time. May be * used as a listener function. * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {Function} completion The function to call to complete the test. * @param {...*} var_args Arguments to pass when calling completionAction. * @return {function(): void} Return a function, bound to this test fixture, * which continues the test. */ continueTest: function(whenTestDone, completion) { var savedArgs = new SaveMockArguments(); var completionAction = new CallFunctionAction( this, savedArgs, completion, Array.prototype.slice.call(arguments, 2)); if (whenTestDone === WhenTestDone.DEFAULT) { whenTestDone = WhenTestDone.ASSERT; } var runAll = new RunAllAction(true, whenTestDone, [completionAction]); return function() { savedArgs.arguments = Array.prototype.slice.call(arguments); runAll.invoke(); }; }, /** * Call this during setUp to defer the call to runTest() until later. The * caller must call the returned function at some point to run the test. * @type {Function} * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {...*} var_args Arguments to pass when running the * |currentTestCase|. * @return {function(): void} A function which will run the current body of * the currentTestCase. */ deferRunTest: function(whenTestDone) { if (whenTestDone === WhenTestDone.DEFAULT) { whenTestDone = WhenTestDone.ALWAYS; } return currentTestCase.deferRunTest.apply( currentTestCase, [whenTestDone].concat(Array.prototype.slice.call(arguments, 1))); }, }; /** * This class is not exported and is available to hold the state of the * |currentTestCase| throughout preload and test run. * @param {string} name The name of the test case. * @param {Test} fixture The fixture object for this test case. * @param {Function} body The code to run for the test. * @constructor */ function TestCase(name, fixture, body) { this.name = name; this.fixture = fixture; this.body = body; } TestCase.prototype = { /** * The name of this test. * @type {string} */ name: null, /** * The test fixture to set |this| to when running the test |body|. * @type {testing.Test} */ fixture: null, /** * The test body to execute in runTest(). * @type {Function} */ body: null, /** * True when the test fixture will run the test later. * @type {boolean} * @private */ deferred_: false, /** * Called at preload time, proxies to the fixture. * @type {Function} */ preLoad: function(name) { if (this.fixture) { this.fixture.preLoad(); } }, /** * Called before a test runs. */ setUp: function() { if (this.fixture) { this.fixture.setUp(); } }, /** * Called before a test is torn down (by testDone()). */ tearDown: function() { if (this.fixture) { this.fixture.tearDown(); } }, /** * Called to run this test's body. */ runTest: function() { if (this.body && this.fixture) { this.fixture.runTest(this.body); } }, /** * Called after a test is run (in testDone) to test accessibility. */ runAccessibilityAudit: function() { if (this.fixture) { this.fixture.runAccessibilityAudit(); } }, /** * Runs this test case with |this| set to the |fixture|. * * Note: Tests created with TEST_F may depend upon |this| being set to an * instance of this.fixture. The current implementation of TEST creates a * dummy constructor, but tests created with TEST should not rely on |this| * being set. * @type {Function} */ run: function() { try { this.setUp(); } catch (e) { // Mock4JSException doesn't inherit from Error, so fall back on // toString(). console.error(e.stack || e.toString()); } if (!this.deferred_) { this.runTest(); } // tearDown called by testDone(). }, /** * Cause this TestCase to be deferred (don't call runTest()) until the * returned function is called. * @type {Function} * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {...*} var_args Arguments to pass when running the * |currentTestCase|. * @return {function(): void} A function that will run this TestCase when * called. */ deferRunTest: function(whenTestDone) { this.deferred_ = true; var savedArgs = new SaveMockArguments(); var completionAction = new CallFunctionAction( this, savedArgs, this.runTest, Array.prototype.slice.call(arguments, 1)); var runAll = new RunAllAction(true, whenTestDone, [completionAction]); return function() { savedArgs.arguments = Array.prototype.slice.call(arguments); runAll.invoke(); }; }, }; /** * Registry of javascript-defined callbacks for {@code chrome.send}. * @type {Object} */ var sendCallbacks = {}; /** * Registers the message, object and callback for {@code chrome.send} * @param {string} name The name of the message to route to this |callback|. * @param {Object} messageHandler Pass as |this| when calling the |callback|. * @param {function(...)} callback Called by {@code chrome.send}. * @see sendCallbacks */ function registerMessageCallback(name, messageHandler, callback) { sendCallbacks[name] = [messageHandler, callback]; } /** * Register all methods of {@code mockClass.prototype} with messages of the * same name as the method, using the proxy of the |mockObject| as the * |messageHandler| when registering. * @param {Mock4JS.Mock} mockObject The mock to register callbacks against. * @param {function(new:Object)} mockClAss Constructor for the mocked class. * @see registerMessageCallback * @see overrideChrome */ function registerMockMessageCallbacks(mockObject, mockClass) { if (!deferGlobalOverrides && !originalChrome) { overrideChrome(); } var mockProxy = mockObject.proxy(); for (var func in mockClass.prototype) { if (typeof mockClass.prototype[func] === 'function') { registerMessageCallback(func, mockProxy, mockProxy[func]); } } } /** * Holds the mapping of name -> global override information. * @type {Object} */ var globalOverrides = {}; /** * When preloading JavaScript libraries, this is true until the * DOMContentLoaded event has been received as globals cannot be overridden * until the page has loaded its JavaScript. * @type {boolean} */ var deferGlobalOverrides = false; /** * Override the global function |funcName| with its registered mock. This * should not be called twice for the same |funcName|. * @param {string} funcName The name of the global function to override. */ function overrideGlobal(funcName) { assertNotEquals(undefined, this[funcName]); var globalOverride = globalOverrides[funcName]; assertNotEquals(undefined, globalOverride); assertEquals(undefined, globalOverride.original); globalOverride.original = this[funcName]; this[funcName] = globalOverride.callback.bind(globalOverride.object); } /** * Registers the global function name, object and callback. * @param {string} name The name of the message to route to this |callback|. * @param {Object} object Pass as |this| when calling the |callback|. * @param {function(...)} callback Called by {@code chrome.send}. * @see overrideGlobal */ function registerMockGlobal(name, object, callback) { assertEquals(undefined, globalOverrides[name]); globalOverrides[name] = { object: object, callback: callback, }; if (!deferGlobalOverrides) { overrideGlobal(name); } } /** * Registers the mock API call and its function. * @param {string} name The '_'-separated name of the API call. * @param {function(...)} theFunction Mock function for this API call. */ function registerMockApi(name, theFunction) { var path = name.split('_'); var namespace = this; for (var i = 0; i < path.length - 1; i++) { var fieldName = path[i]; if (!namespace[fieldName]) { namespace[fieldName] = {}; } namespace = namespace[fieldName]; } var fieldName = path[path.length - 1]; namespace[fieldName] = theFunction; } /** * Empty function for use in making mocks. * @const */ function emptyFunction() {} /** * Make a mock from the supplied |methodNames| array. * @param {Array<string>} methodNames Array of names of methods to mock. * @return {Function} Constructor with prototype filled in with methods * matching |methodNames|. */ function makeMockClass(methodNames) { function MockConstructor() {} for (var i = 0; i < methodNames.length; i++) { MockConstructor.prototype[methodNames[i]] = emptyFunction; } return MockConstructor; } /** * Create a new class to handle |functionNames|, add method 'functions()' * that returns a container of standalone functions based on the mock class * members, and return it. * @return {Mock} Mock handler class. */ function makeMockFunctions(functionNames) { var MockClass = makeMockClass(functionNames); var mockFunctions = mock(MockClass); var mockProxy = mockFunctions.proxy(); mockFunctions.functions_ = {}; for (var func in MockClass.prototype) { if (typeof MockClass.prototype[func] === 'function') { mockFunctions.functions_[func] = mockProxy[func].bind(mockProxy); } } mockFunctions.functions = function() { return this.functions_; }; return mockFunctions; } /** * Register all methods of {@code mockClass.prototype} as overrides to global * functions of the same name as the method, using the proxy of the * |mockObject| to handle the functions. * @param {Mock4JS.Mock} mockObject The mock to register callbacks against. * @param {function(new:Object)} mockClass Constructor for the mocked class. * @see registerMockGlobal */ function registerMockGlobals(mockObject, mockClass) { var mockProxy = mockObject.proxy(); for (var func in mockClass.prototype) { if (typeof mockClass.prototype[func] === 'function') { registerMockGlobal(func, mockProxy, mockProxy[func]); } } } /** * Register all functions in |mockObject.functions()| as global API calls. * @param {Mock4JS.Mock} mockObject The mock to register callbacks against. * @see registerMockApi */ function registerMockApis(mockObject) { var functions = mockObject.functions(); for (var func in functions) { if (typeof functions[func] === 'function') { registerMockApi(func, functions[func]); } } } /** * Overrides {@code chrome.send} for routing messages to javascript * functions. Also falls back to sending with the original chrome object. * @param {string} messageName The message to route. */ function send(messageName) { var callback = sendCallbacks[messageName]; if (callback != undefined) { callback[1].apply(callback[0], Array.prototype.slice.call(arguments, 1)); } else { this.__proto__.send.apply(this.__proto__, arguments); } } /** * true when testDone has been called. * @type {boolean} */ var testIsDone = false; /** * Holds the errors, if any, caught by expects so that the test case can * fail. Cleared when results are reported from runTest() or testDone(). * @type {Array<Error>} */ var errors = []; /** * URL to dummy WebUI page for testing framework. * @type {string} */ var DUMMY_URL = 'chrome://DummyURL'; /** * Resets test state by clearing |errors| and |testIsDone| flags. */ function resetTestState() { errors.splice(0, errors.length); testIsDone = false; } /** * Notifies the running browser test of the test results. Clears |errors|. * @param {Array<boolean, string>=} result When passed, this is used for the * testResult message. */ function testDone(result) { if (!testIsDone) { testIsDone = true; if (currentTestCase) { var ok = true; ok = createExpect( currentTestCase.runAccessibilityAudit.bind(currentTestCase)) .call(null) && ok; ok = createExpect(currentTestCase.tearDown.bind(currentTestCase)) .call(null) && ok; if (!ok && result) { result = [false, errorsToMessage(errors, result[1])]; } currentTestCase = null; } if (!result) { result = testResult(); } if (hasWindow && window.webUiTest) { let testRunner; if (webUiTest.mojom.TestRunnerPtr) { // For mojo WebUI tests. testRunner = new webUiTest.mojom.TestRunnerPtr(); Mojo.bindInterface( webUiTest.mojom.TestRunner.name, mojo.makeRequest(testRunner).handle); } else if (webUiTest.mojom.TestRunnerProxy) { // For mojo-lite WebUI tests. testRunner = webUiTest.mojom.TestRunner.getProxy(); } else { assertNotReached( 'Mojo bindings found, but no valid test interface loaded'); } if (result[0]) { testRunner.testComplete(); } else { testRunner.testComplete(result[1]); } } else if (chrome.send) { // For WebUI and v8 unit tests. chrome.send('testResult', result); } else if (window.domAutomationController.send) { // For extension tests. valueResult = {'result': result[0], message: result[1]}; window.domAutomationController.send(JSON.stringify(valueResult)); } else { assertNotReached('No test framework available'); } errors.splice(0, errors.length); } else { console.warn('testIsDone already'); } } /** * Converts each Error in |errors| to a suitable message, adding them to * |message|, and returns the message string. * @param {Array<Error>} errors Array of errors to add to |message|. * @param {string=} opt_message Message to append error messages to. * @return {string} |opt_message| + messages of all |errors|. */ function errorsToMessage(errors, opt_message) { var message = ''; if (opt_message) { message += opt_message + '\n'; } for (var i = 0; i < errors.length; ++i) { var errorMessage = errors[i].stack || errors[i].message; message += 'Failed: ' + currentTestFunction + '(' + currentTestArguments.map(JSON.stringify) + ')\n' + errorMessage; } return message; } /** * Returns [success, message] & clears |errors|. * @param {boolean} errorsOk When true, errors are ok. * @return {Array<boolean, string>} */ function testResult(errorsOk) { var result = [true, '']; if (errors.length) { result = [!!errorsOk, errorsToMessage(errors)]; } return result; } // Asserts. // Use the following assertions to verify a condition within a test. /** * @param {boolean} value The value to check. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertTrue(value, opt_message) { chai.assert.isTrue(value, opt_message); } /** * @param {boolean} value The value to check. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertFalse(value, opt_message) { chai.assert.isFalse(value, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertGE(value1, value2, opt_message) { chai.expect(value1).to.be.at.least(value2, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertGT(value1, value2, opt_message) { chai.assert.isAbove(value1, value2, opt_message); } /** * @param {*} expected The expected value. * @param {*} actual The actual value. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertEquals(expected, actual, opt_message) { chai.assert.strictEqual(actual, expected, opt_message); } /** * @param {*} expected * @param {*} actual * {string=} opt_message * @throws {Error} */ function assertDeepEquals(expected, actual, opt_message) { chai.assert.deepEqual(actual, expected, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertLE(value1, value2, opt_message) { chai.expect(value1).to.be.at.most(value2, opt_message); } /** * @param {number} value1 The first operand. * @param {number} value2 The second operand. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertLT(value1, value2, opt_message) { chai.assert.isBelow(value1, value2, opt_message); } /** * @param {*} expected The expected value. * @param {*} actual The actual value. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertNotEquals(expected, actual, opt_message) { chai.assert.notStrictEqual(actual, expected, opt_message); } /** * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertNotReached(opt_message) { chai.assert.fail(null, null, opt_message); } /** * @param {Function} testFunction * @param {Function=|string=|RegExp=} opt_expected The expected Error * constructor, partial or complete error message string, or RegExp to * test the error message. * @param {string=} opt_message Additional error message. * @throws {Error} */ function assertThrows(testFunction, opt_expected, opt_message) { chai.assert.throws(testFunction, opt_expected, opt_message); } /** * Run an accessibility audit on the current page state. * @type {Function} * @param {Array} a11yResults * @param {axs.AuditConfiguration=} opt_config * @return {boolean} Whether there were any errors or warnings * @private */ function runAccessibilityAudit(a11yResults, opt_config) { var auditResults = axs.Audit.run(opt_config); for (var i = 0; i < auditResults.length; i++) { var auditResult = auditResults[i]; if (auditResult.result == axs.constants.AuditResult.FAIL) { var auditRule = auditResult.rule; // TODO(aboxhall): more useful error messages (sadly non-trivial) a11yResults.push(auditResult); } } // TODO(aboxhall): have strict (no errors or warnings) vs non-strict // (warnings ok) // TODO(aboxhall): some kind of info logging for warnings only?? return (a11yResults.length == 0); } /** * Concatenates the accessibility error messages for each result in * |a11yResults| and * |a11yWarnings| in to an accessibility report, appends it to the given * |message| and returns the resulting message string. * @param {Array<string>} a11yResults The list of accessibility results * @return {string} |message| + accessibility report. */ function accessibilityAuditReport(a11yResults, message) { message = message ? message + '\n\n' : '\n'; message += 'Accessibility issues found on ' + window.location.href + '\n'; message += axs.Audit.createReport(a11yResults); return message; } /** * Asserts that the current page state passes the accessibility audit. * @param {Array=} opt_results Array to fill with results, if desired. */ function assertAccessibilityOk(opt_results) { var a11yResults = opt_results || []; var auditConfig = currentTestCase.fixture.accessibilityAuditConfig; if (!runAccessibilityAudit(a11yResults, auditConfig)) { throw new Error(accessibilityAuditReport(a11yResults)); } } /** * Creates a function based upon a function that throws an exception on * failure. The new function stuffs any errors into the |errors| array for * checking by runTest. This allows tests to continue running other checks, * while failing the overall test if any errors occurred. * @param {Function} assertFunc The function which may throw an Error. * @return {function(...*):bool} A function that applies its arguments to * |assertFunc| and returns true if |assertFunc| passes. * @see errors * @see runTestFunction */ function createExpect(assertFunc) { return function() { try { assertFunc.apply(null, arguments); } catch (e) { errors.push(e); return false; } return true; }; } /** * This is the starting point for tests run by WebUIBrowserTest. If an error * occurs, it reports a failure and a message created by joining individual * error messages. This supports sync tests and async tests by calling * testDone() when |isAsync| is not true, relying on async tests to call * testDone() when they complete. * @param {boolean} isAsync When false, call testDone() with the test result * otherwise only when assertions are caught. * @param {string} testFunction The function name to call. * @param {Array} testArguments The arguments to call |testFunction| with. * @return {boolean} true always to signal successful execution (but not * necessarily successful results) of this test. * @see errors * @see runTestFunction */ function runTest(isAsync, testFunction, testArguments) { // If waiting for user to attach a debugger, retry in 1 second. if (waitUser) { setTimeout(runTest, 1000, isAsync, testFunction, testArguments); return true; } // Avoid eval() if at all possible, since it will not work on pages // that have enabled content-security-policy. var testBody = this[testFunction]; // global object -- not a method. var testName = testFunction; // Depending on how we were called, |this| might not resolve to the global // context. if (testName == 'RUN_TEST_F' && testBody === undefined) { testBody = RUN_TEST_F; } if (typeof testBody === 'undefined') { testBody = eval(testFunction); testName = testBody.toString(); } if (testBody != RUN_TEST_F) { console.log('Running test ' + testName); } // Async allow expect errors, but not assert errors. var result = runTestFunction(testFunction, testBody, testArguments, isAsync); if (!isAsync || !result[0]) { testDone(result); } return true; } /** * This is the guts of WebUIBrowserTest. It runs the test surrounded by an * expect to catch Errors. If |errors| is non-empty, it reports a failure and * a message by joining |errors|. Consumers can use this to use assert/expect * functions asynchronously, but are then responsible for reporting errors to * the browser themselves through testDone(). * @param {string} testFunction The function name to report on failure. * @param {Function} testBody The function to call. * @param {Array} testArguments The arguments to call |testBody| with. * @param {boolean} onlyAssertFails When true, only assertions cause failing * testResult. * @return {Array<boolean, string>} [test-succeeded, message-if-failed] * @see createExpect * @see testResult */ function runTestFunction( testFunction, testBody, testArguments, onlyAssertFails) { currentTestFunction = testFunction; currentTestArguments = testArguments; var ok = createExpect(testBody).apply(null, testArguments); return testResult(onlyAssertFails && ok); } /** * Creates a new test case for the given |testFixture| and |testName|. Assumes * |testFixture| describes a globally available subclass of type Test. * @param {string} testFixture The fixture for this test case. * @param {string} testName The name for this test case. * @return {TestCase} A newly created TestCase. */ function createTestCase(testFixture, testName) { var fixtureConstructor = this[testFixture]; assertTrue( !!fixtureConstructor, `The testFixture \'${testFixture}\' was not found.`); var testBody = fixtureConstructor.testCaseBodies[testName]; assertTrue( !!testBody, `Test \'${testName} was not found in \'${testFixture}\'.`); var fixture = new fixtureConstructor(); fixture.name = testFixture; return new TestCase(testName, fixture, testBody); } /** * Overrides the |chrome| object to enable mocking calls to chrome.send(). */ function overrideChrome() { if (originalChrome) { console.error('chrome object already overridden'); return; } originalChrome = chrome; chrome = { __proto__: originalChrome, send: send, originalSend: originalChrome.send.bind(originalChrome), }; } /** * Used by WebUIBrowserTest to preload the javascript libraries at the * appropriate time for javascript injection into the current page. This * creates a test case and calls its preLoad for any early initialization such * as registering handlers before the page's javascript runs it's OnLoad * method. This is called before the page is loaded, so the |chrome| object is * not yet bound and this DOMContentLoaded listener will be called first to * override |chrome| in order to route messages registered in |sendCallbacks|. * @param {string} testFixture The test fixture name. * @param {string} testName The test name. * @see sendCallbacks */ function preloadJavascriptLibraries(testFixture, testName) { deferGlobalOverrides = true; // The document seems to change from the point of preloading to the point of // events (and doesn't fire), whereas the window does not. Listening to the // capture phase allows this event to fire first. window.addEventListener('DOMContentLoaded', function() { if (chrome.send) { overrideChrome(); } // Override globals at load time so they will be defined. assertTrue(deferGlobalOverrides); deferGlobalOverrides = false; for (var funcName in globalOverrides) { overrideGlobal(funcName); } }, true); currentTestCase = createTestCase(testFixture, testName); currentTestCase.preLoad(); } /** * Sets |waitUser| to true so |runTest| function waits for user to attach a * debugger. */ function setWaitUser() { waitUser = true; console.log('Waiting for debugger...'); console.log('Run: go() in the JS console when you are ready.'); } /** * Sets |waitUser| to false, so |runTest| function stops waiting for user and * start running the tests. */ function go() { waitUser = false; } /** * During generation phase, this outputs; do nothing at runtime. */ function GEN() {} /** * During generation phase, this outputs; do nothing at runtime. */ function GEN_INCLUDE() {} /** * At runtime, register the testName with a test fixture. Since this method * doesn't have a test fixture, create a dummy fixture to hold its |name| * and |testCaseBodies|. * @param {string} testCaseName The name of the test case. * @param {string} testName The name of the test function. * @param {Function} testBody The body to execute when running this test. */ function TEST(testCaseName, testName, testBody) { var fixtureConstructor = this[testCaseName]; if (fixtureConstructor === undefined) { fixtureConstructor = function() {}; this[testCaseName] = fixtureConstructor; fixtureConstructor.prototype = { __proto__: Test.prototype, name: testCaseName, }; fixtureConstructor.testCaseBodies = {}; } fixtureConstructor.testCaseBodies[testName] = testBody; } /** * At runtime, register the testName with its fixture. Stuff the |name| into * the |testFixture|'s prototype, if needed, and the |testCaseBodies| into its * constructor. * @param {string} testFixture The name of the test fixture class. * @param {string} testName The name of the test function. * @param {Function} testBody The body to execute when running this test. * @param {string=} opt_preamble C++ code to be generated before the test. Does * nothing here in the runtime phase. */ function TEST_F(testFixture, testName, testBody, opt_preamble) { var fixtureConstructor = this[testFixture]; if (!fixtureConstructor.prototype.name) { fixtureConstructor.prototype.name = testFixture; } if (fixtureConstructor['testCaseBodies'] === undefined) { fixtureConstructor.testCaseBodies = {}; } fixtureConstructor.testCaseBodies[testName] = testBody; } /** * Similar to TEST_F above but with a mandatory |preamble|. * @param {string} preamble C++ code to be generated before the test. Does * nothing here in the runtime phase. * @param {string} testFixture The name of the test fixture class. * @param {string} testName The name of the test function. * @param {Function} testBody The body to execute when running this test. */ function TEST_F_WITH_PREAMBLE(preamble, testFixture, testName, testBody) { TEST_F(testFixture, testName, testBody); } /** * RunJavascriptTestF uses this as the |testFunction| when invoking * runTest. If |currentTestCase| is non-null at this point, verify that * |testFixture| and |testName| agree with the preloaded values. Create * |currentTestCase|, if needed, run it, and clear the |currentTestCase|. * @param {string} testFixture The name of the test fixture class. * @param {string} testName The name of the test function. * @see preloadJavascriptLibraries * @see runTest */ function RUN_TEST_F(testFixture, testName) { if (!currentTestCase) { currentTestCase = createTestCase(testFixture, testName); } assertEquals(currentTestCase.name, testName); assertEquals(currentTestCase.fixture.name, testFixture); console.log('Running TestCase ' + testFixture + '.' + testName); currentTestCase.run(); } /** * This Mock4JS matcher object pushes each |actualArgument| parameter to * match() calls onto |args|. * @param {Array} args The array to push |actualArgument| onto. * @param {Object} realMatcher The real matcher check arguments with. * @constructor * @extends {realMatcher} */ function SaveMockArgumentMatcher(args, realMatcher) { this.arguments_ = args; this.realMatcher_ = realMatcher; } SaveMockArgumentMatcher.prototype = { /** * Holds the arguments to push each |actualArgument| onto. * @type {Array} * @private */ arguments_: null, /** * The real Mock4JS matcher object to check arguments with. * @type {Object} */ realMatcher_: null, /** * Pushes |actualArgument| onto |arguments_| and call |realMatcher_|. Clears * |arguments_| on non-match. * @param {*} actualArgument The argument to match and save. * @return {boolean} Result of calling the |realMatcher|. */ argumentMatches: function(actualArgument) { this.arguments_.push(actualArgument); var match = this.realMatcher_.argumentMatches(actualArgument); if (!match) { this.arguments_.splice(0, this.arguments_.length); } return match; }, /** * Proxy to |realMatcher_| for description. * @return {string} Description of this Mock4JS matcher. */ describe: function() { return this.realMatcher_.describe(); }, }; /** * Actions invoked by Mock4JS's "will()" syntax do not receive arguments from * the mocked method. This class works with SaveMockArgumentMatcher to save * arguments so that the invoked Action can pass arguments through to the * invoked function. * @param {!Object} realMatcher The real matcher to perform matching with. * @constructor */ function SaveMockArguments() { this.arguments = []; } SaveMockArguments.prototype = { /** * Wraps the |realMatcher| with an object which will push its argument onto * |arguments| and call realMatcher. * @param {Object} realMatcher A Mock4JS matcher object for this argument. * @return {SaveMockArgumentMatcher} A new matcher which will push its * argument onto |arguments|. */ match: function(realMatcher) { return new SaveMockArgumentMatcher(this.arguments, realMatcher); }, /** * Remember the argument passed to this stub invocation. * @type {Array} */ arguments: null, }; /** * CallFunctionAction is provided to allow mocks to have side effects. * @param {Object} obj The object to set |this| to when calling |func_|. * @param {?SaveMockArguments} savedArgs when non-null, saved arguments are * passed to |func|. * @param {Function} func The function to call. * @param {Array=} args Any arguments to pass to func. * @constructor */ function CallFunctionAction(obj, savedArgs, func, args) { this.obj_ = obj; this.savedArgs_ = savedArgs; this.func_ = func; this.args_ = args ? args : []; } CallFunctionAction.prototype = { /** * Set |this| to |obj_| when calling |func_|. * @type {?Object} */ obj_: null, /** * The SaveMockArguments to hold arguments when invoking |func_|. * @type {?SaveMockArguments} * @private */ savedArgs_: null, /** * The function to call when invoked. * @type {!Function} * @private */ func_: null, /** * Arguments to pass to |func_| when invoked. * @type {!Array} */ args_: null, /** * Accessor for |func_|. * @return {Function} The function to invoke. */ get func() { return this.func_; }, /** * Called by Mock4JS when using .will() to specify actions for stubs() or * expects(). Clears |savedArgs_| so it can be reused. * @return The results of calling |func_| with the concatenation of * |savedArgs_| and |args_|. */ invoke: function() { var prependArgs = []; if (this.savedArgs_) { prependArgs = this.savedArgs_.arguments.splice(0, this.savedArgs_.arguments.length); } return this.func.apply(this.obj_, prependArgs.concat(this.args_)); }, /** * Describe this action to Mock4JS. * @return {string} A description of this action. */ describe: function() { return 'calls the given function with saved arguments and ' + this.args_; } }; /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {Function} func The function to call when the method is invoked. * @param {...*} var_args Arguments to pass when calling func. * @return {CallFunctionAction} Action for use in will. */ function callFunction(func) { return new CallFunctionAction( null, null, func, Array.prototype.slice.call(arguments, 1)); } /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {SaveMockArguments} savedArgs Arguments saved with this object * are passed to |func|. * @param {Function} func The function to call when the method is invoked. * @param {...*} var_args Arguments to pass when calling func. * @return {CallFunctionAction} Action for use in will. */ function callFunctionWithSavedArgs(savedArgs, func) { return new CallFunctionAction( null, savedArgs, func, Array.prototype.slice.call(arguments, 2)); } /** * CallGlobalAction as a subclass of CallFunctionAction looks up the original * global object in |globalOverrides| using |funcName| as the key. This allows * tests, which need to wait until a global function to be called in order to * start the test to run the original function. When used with runAllActions * or runAllActionsAsync, Mock4JS expectations may call start or continue the * test after calling the original function. * @param {?SaveMockArguments} savedArgs when non-null, saved arguments are * passed to the global function |funcName|. * @param {string} funcName The name of the global function to call. * @param {Array} args Any arguments to pass to func. * @constructor * @extends {CallFunctionAction} * @see globalOverrides */ function CallGlobalAction(savedArgs, funcName, args) { CallFunctionAction.call(this, null, savedArgs, funcName, args); } CallGlobalAction.prototype = { __proto__: CallFunctionAction.prototype, /** * Fetch and return the original global function to call. * @return {Function} The global function to invoke. * @override */ get func() { var func = globalOverrides[this.func_].original; assertNotEquals(undefined, func); return func; }, }; /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {SaveMockArguments} savedArgs Arguments saved with this object * are passed to the global function |funcName|. * @param {string} funcName The name of a registered mock global function to * call when the method is invoked. * @param {...*} var_args Arguments to pass when calling func. * @return {CallGlobalAction} Action for use in Mock4JS will(). */ function callGlobalWithSavedArgs(savedArgs, funcName) { return new CallGlobalAction( savedArgs, funcName, Array.prototype.slice.call(arguments, 2)); } /** * When to call testDone(). * @enum {number} */ var WhenTestDone = { /** * Default for the method called. */ DEFAULT: -1, /** * Never call testDone(). */ NEVER: 0, /** * Call testDone() on assert failure. */ ASSERT: 1, /** * Call testDone() if there are any assert or expect failures. */ EXPECT: 2, /** * Always call testDone(). */ ALWAYS: 3, }; /** * Runs all |actions|. * @param {boolean} isAsync When true, call testDone() on Errors. * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {Array<Object>} actions Actions to run. * @constructor */ function RunAllAction(isAsync, whenTestDone, actions) { this.isAsync_ = isAsync; this.whenTestDone_ = whenTestDone; this.actions_ = actions; } RunAllAction.prototype = { /** * When true, call testDone() on Errors. * @type {boolean} * @private */ isAsync_: false, /** * Call testDone() at appropriate time. * @type {WhenTestDone} * @private * @see WhenTestDone */ whenTestDone_: WhenTestDone.ASSERT, /** * Holds the actions to execute when invoked. * @type {Array} * @private */ actions_: null, /** * Runs all |actions_|, returning the last one. When running in sync mode, * throws any exceptions to be caught by runTest() or * runTestFunction(). Call testDone() according to |whenTestDone_| setting. */ invoke: function() { try { var result; for (var i = 0; i < this.actions_.length; ++i) { result = this.actions_[i].invoke(); } if ((this.whenTestDone_ == WhenTestDone.EXPECT && errors.length) || this.whenTestDone_ == WhenTestDone.ALWAYS) { testDone(); } return result; } catch (e) { if (!(e instanceof Error)) { e = new Error(e.toString()); } if (!this.isAsync_) { throw e; } errors.push(e); if (this.whenTestDone_ != WhenTestDone.NEVER) { testDone(); } } }, /** * Describe this action to Mock4JS. * @return {string} A description of this action. */ describe: function() { return 'Calls all actions: ' + this.actions_; }, }; /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {...Object} var_actions Actions to run. * @return {RunAllAction} Action for use in will. */ function runAllActions() { return new RunAllAction( false, WhenTestDone.NEVER, Array.prototype.slice.call(arguments)); } /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * @param {WhenTestDone} whenTestDone Call testDone() at the appropriate * time. * @param {...Object} var_actions Actions to run. * @return {RunAllAction} Action for use in will. */ function runAllActionsAsync(whenTestDone) { return new RunAllAction( true, whenTestDone, Array.prototype.slice.call(arguments, 1)); } /** * Syntactic sugar for use with will() on a Mock4JS.Mock. * Creates an action for will() that invokes a callback that the tested code * passes to a mocked function. * @param {SaveMockArguments} savedArgs Arguments that will contain the * callback once the mocked function is called. * @param {number} callbackParameter Index of the callback parameter in * |savedArgs|. * @param {...Object} var_args Arguments to pass to the callback. * @return {CallFunctionAction} Action for use in will(). */ function invokeCallback(savedArgs, callbackParameter, var_args) { var callbackArguments = Array.prototype.slice.call(arguments, 2); return callFunction(function() { savedArgs.arguments[callbackParameter].apply(null, callbackArguments); // Mock4JS does not clear the saved args after invocation. // To allow reuse of the same SaveMockArguments for multiple // invocations with similar arguments, clear them here. savedArgs.arguments.splice(0, savedArgs.arguments.length); }); } /** * Mock4JS matcher object that matches the actual argument and the expected * value iff their JSON representations are same. * @param {Object} expectedValue * @constructor */ function MatchJSON(expectedValue) { this.expectedValue_ = expectedValue; } MatchJSON.prototype = { /** * Checks that JSON representation of the actual and expected arguments are * same. * @param {Object} actualArgument The argument to match. * @return {boolean} Result of the comparison. */ argumentMatches: function(actualArgument) { return JSON.stringify(this.expectedValue_) === JSON.stringify(actualArgument); }, /** * Describes the matcher. * @return {string} Description of this Mock4JS matcher. */ describe: function() { return 'eqJSON(' + JSON.stringify(this.expectedValue_) + ')'; }, }; /** * Builds a MatchJSON argument matcher for a given expected value. * @param {Object} expectedValue * @return {MatchJSON} Resulting Mock4JS matcher. */ function eqJSON(expectedValue) { return new MatchJSON(expectedValue); } /** * Mock4JS matcher object that matches the actual argument and the expected * value iff the the string representation of the actual argument is equal to * the expected value. * @param {string} expectedValue * @constructor */ function MatchToString(expectedValue) { this.expectedValue_ = expectedValue; } MatchToString.prototype = { /** * Checks that the the string representation of the actual argument matches * the expected value. * @param {*} actualArgument The argument to match. * @return {boolean} Result of the comparison. */ argumentMatches: function(actualArgument) { return this.expectedValue_ === String(actualArgument); }, /** * Describes the matcher. * @return {string} Description of this Mock4JS matcher. */ describe: function() { return 'eqToString("' + this.expectedValue_ + '")'; }, }; /** * Builds a MatchToString argument matcher for a given expected value. * @param {Object} expectedValue * @return {MatchToString} Resulting Mock4JS matcher. */ function eqToString(expectedValue) { return new MatchToString(expectedValue); } /** * Exports assertion methods. All assertion methods delegate to the chai.js * assertion library. */ function exportChaiAsserts() { exports.assertTrue = assertTrue; exports.assertFalse = assertFalse; exports.assertGE = assertGE; exports.assertGT = assertGT; exports.assertEquals = assertEquals; exports.assertDeepEquals = assertDeepEquals; exports.assertLE = assertLE; exports.assertLT = assertLT; exports.assertNotEquals = assertNotEquals; exports.assertNotReached = assertNotReached; exports.assertThrows = assertThrows; } /** * Exports expect methods. 'expect*' methods allow tests to run until the end * even in the presence of failures. */ function exportExpects() { exports.expectTrue = createExpect(assertTrue); exports.expectFalse = createExpect(assertFalse); exports.expectGE = createExpect(assertGE); exports.expectGT = createExpect(assertGT); exports.expectEquals = createExpect(assertEquals); exports.expectDeepEquals = createExpect(assertDeepEquals); exports.expectLE = createExpect(assertLE); exports.expectLT = createExpect(assertLT); exports.expectNotEquals = createExpect(assertNotEquals); exports.expectNotReached = createExpect(assertNotReached); exports.expectAccessibilityOk = createExpect(assertAccessibilityOk); exports.expectThrows = createExpect(assertThrows); } /** * Exports methods related to Mock4JS mocking. */ function exportMock4JsHelpers() { exports.callFunction = callFunction; exports.callFunctionWithSavedArgs = callFunctionWithSavedArgs; exports.callGlobalWithSavedArgs = callGlobalWithSavedArgs; exports.eqJSON = eqJSON; exports.eqToString = eqToString; exports.invokeCallback = invokeCallback; exports.SaveMockArguments = SaveMockArguments; // Import the Mock4JS helpers. Mock4JS.addMockSupport(exports); } // Exports. testing.Test = Test; exports.testDone = testDone; exportChaiAsserts(); exports.assertAccessibilityOk = assertAccessibilityOk; exportExpects(); exportMock4JsHelpers(); exports.preloadJavascriptLibraries = preloadJavascriptLibraries; exports.setWaitUser = setWaitUser; exports.go = go; exports.registerMessageCallback = registerMessageCallback; exports.registerMockGlobals = registerMockGlobals; exports.registerMockMessageCallbacks = registerMockMessageCallbacks; exports.resetTestState = resetTestState; exports.runAccessibilityAudit = runAccessibilityAudit; exports.runAllActions = runAllActions; exports.runAllActionsAsync = runAllActionsAsync; exports.runTest = runTest; exports.runTestFunction = runTestFunction; exports.DUMMY_URL = DUMMY_URL; exports.TEST = TEST; exports.TEST_F = TEST_F; exports.TEST_F_WITH_PREAMBLE = TEST_F_WITH_PREAMBLE; exports.RUNTIME_TEST_F = TEST_F; exports.GEN = GEN; exports.GEN_INCLUDE = GEN_INCLUDE; exports.WhenTestDone = WhenTestDone; })(this); ; //# sourceURL=file:///b/s/w/ir/chrome/test/data/webui/test_api.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Asserts that a given argument's value is undefined. * @param {object} a The argument to check. */ function assertUndefined(a) { if (a !== undefined) { throw new Error('Assertion failed: expected undefined'); } } /** * Asserts that the argument is neither null nor undefined. * @param {object} obj The argument to check. * @param {string=} opt_message Error message if the condition is not met. */ function assertNotNullNorUndefined(obj, opt_message) { if (obj === undefined || obj === null) { throw new Error( 'Can\'t be null or undefined: ' + (opt_message || '') + '\n' + 'Actual: ' + obj); } } /** * Asserts that a given function call throws an exception. * @param {string} msg Message to print if exception not thrown. * @param {Function} fn The function to call. * @param {string} error The name of the exception we expect {@code fn} to * throw. */ function assertException(msg, fn, error) { try { fn(); } catch (e) { if (error && e.name != error) { throw new Error( 'Expected to throw ' + error + ' but threw ' + e.name + ' - ' + msg); } return; } throw new Error('Expected to throw exception ' + error + ' - ' + msg); } /** * Asserts that two arrays of strings are equal. * @param {Array<string>} array1 The expected array. * @param {Array<string>} array2 The test array. */ function assertEqualStringArrays(array1, array2) { var same = true; if (array1.length != array2.length) { same = false; } for (var i = 0; i < Math.min(array1.length, array2.length); i++) { if (array1[i].trim() != array2[i].trim()) { same = false; } } if (!same) { throw new Error( 'Expected ' + JSON.stringify(array1) + ', got ' + JSON.stringify(array2)); } } /** * Asserts that two objects have the same JSON serialization. * @param {Object} expected The expected object. * @param {Object} actual The actual object. * @param {string=} opt_message Message used for errors. */ function assertEqualsJSON(expected, actual, opt_message) { if (JSON.stringify(actual) !== JSON.stringify(expected)) { throw new Error( (opt_message ? opt_message + '\n' : '') + 'Expected ' + JSON.stringify(expected) + '\n' + 'Got ' + JSON.stringify(actual)); } } /** * Asserts that two ArrayBuffers have the same content. * @param {ArrayBuffer} arrayBufA The expected ArrayBuffer. * @param {ArrayBuffer} arrayBufB The test ArrayBuffer. */ function assertArrayBuffersEquals(arrayBufA, arrayBufB) { var view1 = new Uint8Array(arrayBufA); var view2 = new Uint8Array(arrayBufB); assertEquals(JSON.stringify(view1), JSON.stringify(view2)); } /** * Asserts that two Arrays have the same content. * @param {ArrayBuffer} arrayA The expected array. * @param {ArrayBuffer} arrayB The test array. */ function assertArraysEquals(arrayA, arrayB) { assertEquals(JSON.stringify(arrayA), JSON.stringify(arrayB)); } /** * Asserts and fails immediately once called. */ function assertNotReached() { assertFalse(true); } /** * Asserts an actual DOM equals an expected stringified DOM. * @param {string} expected * @param {Node} actual */ function assertEqualsDOM(expected, actual) { expected = expected.replace(/>\s+</gm, '><').trim(/\s/gm); var actualStr = actual.outerHTML; actualStr = actualStr.replace(/>\s+</gm, '><').trim(/\s/gm); for (var i = 0; i < expected.length; i++) assertEquals( expected[i], actualStr[i], 'Mismatch at index ' + i + ' in expected:\n' + expected + '\nactual:\n' + actualStr + '\n'); } assertSame = assertEquals; assertNotSame = assertNotEquals; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/assert_additions.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Common testing utilities. /** * Shortcut for document.getElementById. * @param {string} id of the element. * @return {HTMLElement} with the id. */ function $(id) { return document.getElementById(id); } /** * @constructor */ var TestUtils = function() {}; /** * Extracts some inlined html encoded as a comment inside a function, * so you can use it like this: * * this.appendDoc(function() {/*! * <p>Html goes here</p> * * /}); * * @param {Function} commentEncodedHtml The html , embedded as a * comment inside an anonymous function - see example, above. * @param {!Array=} opt_args Optional arguments to be substituted in the form * $0, ... within the code block. * @return {string} The html text. */ TestUtils.extractHtmlFromCommentEncodedString = function( commentEncodedHtml, opt_args) { var stringified = commentEncodedHtml.toString(); if (opt_args) { for (var i = 0; i < opt_args.length; i++) stringified = stringified.replace('$' + i, opt_args[i]); } return stringified.replace(/^[^\/]+\/\*!?/, '').replace(/\*\/[^\/]+$/, ''); }; /** * Creates a data url for a document. * @param {function() : void} doc Snippet wrapped inside of a function. * @return {string} */ TestUtils.createUrlForDoc = function(doc) { var docString = TestUtils.extractHtmlFromCommentEncodedString(doc); return 'data:text/html,<!doctype html>' + encodeURIComponent(TestUtils.collapseWhitespace( docString.replace(/[\n\r]/g, '').trim())); }; /** * Collapses inner whitespace. * @param {string} str * @return {string} */ TestUtils.collapseWhitespace = function(str) { return str.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, ''); }; /** * Similar to |TEST_F|. Generates a test for the given |testFixture|, * |testName|, and |testFunction|. * Used this variant when an |isAsync| fixture wants to temporarily mix in an * sync test. * @param {string} testFixture Fixture name. * @param {string} testName Test name. * @param {function} testFunction The test impl. */ function SYNC_TEST_F(testFixture, testName, testFunction) { TEST_F(testFixture, testName, function() { this.newCallback(testFunction)(); }); } ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/common.js // Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * Creates wrappers for callbacks and calls testDone() when all callbacks * have been invoked. * @param {testing.Test} fixture */ function CallbackHelper(fixture) { /** @type {Object} fixture */ this.fixture_ = fixture; /** @type {number} */ this.pendingCallbacks_ = 0; } CallbackHelper.prototype = { /** * @param {Function=} opt_callback * @return {Function} */ wrap: function(opt_callback) { var callback = opt_callback || function() {}; var savedArgs = new SaveMockArguments(); var lastCall = null; var completionAction = callFunctionWithSavedArgs(savedArgs, function() { if (lastCall) { throw new Error('Called more than once, first call here: ' + lastCall); } else { lastCall = new Error().stack; } callback.apply(this.fixture_, arguments); if (--this.pendingCallbacks_ <= 0) CallbackHelper.testDone_(); }.bind(this)); // runAllActionsAsync catches exceptions and puts them in the test // framework's list of errors and fails the test if appropriate. var runAll = runAllActionsAsync(WhenTestDone.ASSERT, completionAction); ++this.pendingCallbacks_; return function() { savedArgs.arguments = Array.prototype.slice.call(arguments); runAll.invoke(); }; } }; /** * @private */ CallbackHelper.testDone_ = this.testDone; // Remove testDone for public use since directly using it conflicts with // this callback helper. delete this.testDone; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/callback_helper.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. GEN_INCLUDE(['common.js', 'callback_helper.js']); /** * Base test fixture for ChromeVox end to end tests. * * These tests run against production ChromeVox inside of the extension's * background page context. * @constructor */ function ChromeVoxE2ETest() { this.callbackHelper_ = new CallbackHelper(this); } ChromeVoxE2ETest.prototype = { __proto__: testing.Test.prototype, /** * @override * No UI in the background context. */ runAccessibilityChecks: false, /** @override */ isAsync: true, /** @override */ browsePreload: null, /** @override */ testGenCppIncludes: function() { GEN(` #include "ash/accessibility/accessibility_delegate.h" #include "ash/shell.h" #include "base/bind.h" #include "base/callback.h" #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" #include "chrome/common/extensions/extension_constants.h" `); }, /** @override */ testGenPreamble: function() { GEN(` base::Closure load_cb = base::Bind(&chromeos::AccessibilityManager::EnableSpokenFeedback, base::Unretained(chromeos::AccessibilityManager::Get()), true); WaitForExtension(extension_misc::kChromeVoxExtensionId, load_cb); `); }, /** * Launch a new tab, wait until tab status complete, then run callback. * @param {function() : void} doc Snippet wrapped inside of a function. * @param {function()} callback Called once the document is ready. */ runWithLoadedTab: function(doc, callback) { this.launchNewTabWithDoc(doc, function(tab) { chrome.tabs.onUpdated.addListener(function(tabId, changeInfo) { if (tabId == tab.id && changeInfo.status == 'complete') { callback(tabId); } }); }); }, /** * Launches the given document in a new tab. * @param {function() : void} doc Snippet wrapped inside of a function. * @param {function(url: string)} opt_callback Called once the * document is created. */ runWithTab: function(doc, opt_callback) { var url = TestUtils.createUrlForDoc(doc); var createParams = {active: true, url: url}; chrome.tabs.create(createParams, function(tab) { if (opt_callback) opt_callback(tab.url); }); }, /** * Increment the selected index of a select control. * @param {number} tabId Of the page. * @param {string} elementQueryString */ incrementSelectedIndex: function(tabId, elementQueryString) { var code = TestUtils.extractHtmlFromCommentEncodedString( function() { /*! var target = document.body.querySelector('$0'); target.focus(); target.selectedIndex++; */ }, [elementQueryString]); chrome.tabs.executeScript(tabId, {code: code}); }, /** * Creates a callback that optionally calls {@code opt_callback} when * called. If this method is called one or more times, then * {@code testDone()} will be called when all callbacks have been called. * @param {Function=} opt_callback Wrapped callback that will have its this * reference bound to the test fixture. * @return {Function} */ newCallback: function(opt_callback) { return this.callbackHelper_.wrap(opt_callback); } }; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/chromevox_e2e_test_base.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Include test fixture. GEN_INCLUDE(['chromevox_e2e_test_base.js']); /** * Base test fixture for ChromeVox Next end to end tests. * * These tests are identical to ChromeVoxE2ETests except for performing the * necessary setup to run ChromeVox Next. * @constructor * @extends {ChromeVoxE2ETest} */ function ChromeVoxNextE2ETest() { ChromeVoxE2ETest.call(this); if (this.runtimeDeps.length > 0) { chrome.extension.getViews().forEach(function(w) { this.runtimeDeps.forEach(function(dep) { if (w[dep]) window[dep] = w[dep]; }.bind(this)); }.bind(this)); } // For tests, enable announcement of events we trigger via automation. DesktopAutomationHandler.announceActions = true; this.originalOutputContextValues_ = {}; for (var role in Output.ROLE_INFO_) { this.originalOutputContextValues_[role] = Output.ROLE_INFO_[role]['outputContextFirst']; } } ChromeVoxNextE2ETest.prototype = { __proto__: ChromeVoxE2ETest.prototype, /** * Dependencies defined on a background window other than this one. * @type {!Array<string>} */ runtimeDeps: [], /** * Gets the desktop from the automation API and Launches a new tab with * the given document, and runs |callback| when a load complete fires. * Arranges to call |testDone()| after |callback| returns. * NOTE: Callbacks creatd instide |opt_callback| must be wrapped with * |this.newCallback| if passed to asynchonous calls. Otherwise, the test * will be finished prematurely. * @param {function() : void} doc Snippet wrapped inside of a function. * @param {function(chrome.automation.AutomationNode)} callback * Called once the document is ready. * @param {string=} opt_url Optional url to wait for. Defaults to undefined. */ runWithLoadedTree: function(doc, callback, opt_url) { callback = this.newCallback(callback); chrome.automation.getDesktop(function(r) { var url = opt_url || TestUtils.createUrlForDoc(doc); var listener = function(evt) { if (evt.target.root.url != url) return; if (!evt.target.root.docLoaded) return; r.removeEventListener('focus', listener, true); r.removeEventListener('loadComplete', listener, true); CommandHandler.onCommand('nextObject'); callback && callback(evt.target); callback = null; }; r.addEventListener('focus', listener, true); r.addEventListener('loadComplete', listener, true); var createParams = {active: true, url: url}; chrome.tabs.create(createParams); }.bind(this)); }, listenOnce: function(node, eventType, callback, capture) { var innerCallback = this.newCallback(function() { node.removeEventListener(eventType, innerCallback, capture); callback.apply(this, arguments); }); node.addEventListener(eventType, innerCallback, capture); }, /** * Forces output to place context utterances at the end of output. This eases * rebaselining when changing context ordering for a specific role. */ forceContextualLastOutput: function() { for (var role in Output.ROLE_INFO_) Output.ROLE_INFO_[role]['outputContextFirst'] = undefined; }, /** * Forces output to place context utterances at the beginning of output. */ forceContextualFirstOutput: function() { for (var role in Output.ROLE_INFO_) Output.ROLE_INFO_[role]['outputContextFirst'] = true; }, /** Resets contextual output values to their defaults. */ resetContextualOutput: function() { for (var role in Output.ROLE_INFO_) { Output.ROLE_INFO_[role]['outputContextFirst'] = this.originalOutputContextValues_[role]; } } }; ; //# sourceURL=file:///b/s/w/ir/chrome/browser/resources/chromeos/chromevox/testing/chromevox_next_e2e_test_base.js // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. GEN_INCLUDE(['../../testing/assert_additions.js']); GEN_INCLUDE(['../../testing/chromevox_next_e2e_test_base.js']); /** * Gets the braille output and asserts that it matches expected values. * Annotations in the output that are primitive strings are ignored. */ function checkBrailleOutput(expectedText, expectedSpans, output) { var actualOutput = output.brailleOutputForTest; // Remove string annotations. These are tested in the speech output and // there's no need to clutter the tests with the corresponding braille // annotations. var actualSpans = actualOutput.spans_.filter(function(span) { return (typeof span.value !== 'string'); }); checkOutput_( expectedText, expectedSpans, actualOutput.toString(), actualSpans); } function checkSpeechOutput(expectedText, expectedSpans, output) { var actualOutput = output.speechOutputForTest; checkOutput_(expectedText, expectedSpans, actualOutput.toString(), actualOutput.spans_); } /** @private */ function checkOutput_(expectedText, expectedSpans, actualText, actualSpans) { assertEquals(expectedText, actualText); function describeSpanPrettyPrint(span) { return describeSpan(span).replace(':', ': ') .replace('"value":', 'value:') .replace('"start":', 'start:') .replace('"end":', 'end:') .replace('"', '\''); } function describeSpan(span) { var obj = {value: span.value, start: span.start, end: span.end}; if (obj.value instanceof Output.NodeSpan) { obj.value.node = (obj.value.node.name || '') + ' ' + obj.value.node.toString(); } return JSON.stringify(obj); } function describeActualSpans() { return '\nAll actual spans:\n' + actualSpans.map(describeSpanPrettyPrint).join('\n'); } for (var i = 0, max = Math.max(expectedSpans.length, actualSpans.length); i < max; ++i) { var expectedSpan = expectedSpans[i]; var actualSpan = actualSpans[i]; if (!expectedSpan) throw Error('Unexpected span in ' + expectedText + ': ' + describeSpan(actualSpan) + describeActualSpans()); if (!actualSpan) throw Error('Missing expected span in ' + expectedText + ': ' + describeSpan(expectedSpan) + describeActualSpans()); var equal = true; if (expectedSpan.start !== actualSpan.start || expectedSpan.end !== actualSpan.end) { equal = false; } else if (expectedSpan.value instanceof Output.NodeSpan && (!(actualSpan.value instanceof Output.NodeSpan) || expectedSpan.value.node !== actualSpan.value.node)) { equal = false; } else { equal = (JSON.stringify(expectedSpan.value) === JSON.stringify(actualSpan.value)); } if (!equal) { throw Error('Spans differ in ' + expectedText + ':\n' + 'Expected: ' + describeSpan(expectedSpan) + '\n' + 'Got : ' + describeSpan(actualSpan) + describeActualSpans()); } } } /** * Test fixture for output.js. * @constructor * @extends {ChromeVoxNextE2ETestBase} */ function ChromeVoxOutputE2ETest() { ChromeVoxNextE2ETest.call(this); } ChromeVoxOutputE2ETest.prototype = { __proto__: ChromeVoxNextE2ETest.prototype, /** @override */ setUp: function() { window.Dir = AutomationUtil.Dir; window.RoleType = chrome.automation.RoleType; this.forceContextualLastOutput(); } }; TEST_F('ChromeVoxOutputE2ETest', 'Links', function() { this.runWithLoadedTree('<a href="#">Click here</a>', function(root) { var el = root.firstChild.firstChild; var range = cursors.Range.fromNode(el); var o = new Output().withSpeechAndBraille(range, null, 'navigate'); assertEqualsJSON({string_: 'Click here|Link|Press Search+Space to activate.', 'spans_': [ // Attributes. {value: 'name', start: 0, end: 10}, // Link earcon (based on the name). {value: {earconId: 'LINK'}, start: 0, end: 10}, {value: 'role', start: 11, end: 15} ]}, o.speechOutputForTest); checkBrailleOutput( 'Click here lnk', [{value: new Output.NodeSpan(el), start: 0, end: 14}], o); }); }); TEST_F('ChromeVoxOutputE2ETest', 'Checkbox', function() { this.runWithLoadedTree('<input type="checkbox">', function(root) { var el = root.firstChild.firstChild; var range = cursors.Range.fromNode(el); var o = new Output().withSpeechAndBraille(range, null, 'navigate'); checkSpeechOutput('|Check box|Not checked|Press Search+Space to toggle.', [ {value: new Output.EarconAction('CHECK_OFF'), start: 0, end: 0}, {value: 'role', start: 1, end: 10} ], o); checkBrailleOutput( 'chk ( )', [{value: new Output.NodeSpan(el), start: 0, end: 7}], o); }); }); TEST_F('ChromeVoxOutputE2ETest', 'InLineTextBoxValueGetsIgnored', function() { this.runWithLoadedTree('<p>OK', function(root) { var el = root.firstChild.firstChild.firstChild; assertEquals('inlineTextBox', el.role); var range = cursors.Range.fromNode(el); var o = new Output().withSpeechAndBraille(range, null, 'navigate'); assertEqualsJSON({string_: 'OK', 'spans_': [ // Attributes. {value: 'name', start: 0, end: 2} ]}, o.speechOutputForTest); checkBrailleOutput( 'OK', [{value: new Output.NodeSpan(el), start: 0, end: 2}], o); el = root.firstChild.firstChild; assertEquals('staticText', el.role); range = cursors.Range.fromNode(el); o = new Output().withSpeechAndBraille(range, null, 'navigate'); assertEqualsJSON({string_: 'OK', 'spans_': [ // Attributes. {value: 'name', start: 0, end: 2} ]}, o.speechOutputForTest); checkBrailleOutput( 'OK', [{value: new Output.NodeSpan(el), start: 0, end: 2}], o); }); }); TEST_F('ChromeVoxOutputE2ETest', 'Headings', function() { this.runWithLoadedTree(function() {/*! <h1>a</h1><h2>b</h2><h3>c</h3><h4>d</h4><h5>e</h5><h6>f</h6> <h1><a href="a.com">b</a></h1> */}, function(root) { var el = root.firstChild; for (var i = 1; i <= 6; ++i) { var range = cursors.Range.fromNode(el); var o = new Output().withSpeechAndBraille(range, null, 'navigate'); var letter = String.fromCharCode('a'.charCodeAt(0) + i -1); assertEqualsJSON({string_: letter + '|Heading ' + i, 'spans_': [ // Attributes. {value: 'nameOrDescendants', start: 0, end: 1} ]}, o.speechOutputForTest); checkBrailleOutput( letter + ' h' + i, [ {value: new Output.NodeSpan(el), start: 0, end: 4} ], o); el = el.nextSibling; } range = cursors.Range.fromNode(el); o = new Output().withSpeechAndBraille(range, null, 'navigate'); assertEqualsJSON({string_: 'b|Link|Heading 1', 'spans_': [ {value: 'name', start: 0, end: 1}, {value: new Output.EarconAction('LINK'), start: 0, end: 1}, {value: 'role', start: 2, end: 6} ]}, o.speechOutputForTest); checkBrailleOutput( 'b lnk h1', [ {value: new Output.NodeSpan(el.firstChild.firstChild), start: 0, end: 1}, {value: new Output.NodeSpan(el), start: 0, end: 8}, {value: new Output.NodeSpan(el.firstChild), start: 2, end: 5} ], o); }); }); // TODO(crbug.com/901725): test is flaky. TEST_F('ChromeVoxOutputE2ETest', 'DISABLED_Audio', function() { this.runWithLoadedTree('<audio src="foo.mp3" controls></audio>', function(root) { var el = root.find({role: 'button'}); var range = cursors.Range.fromNode(el); var o = new Output() .withoutHints() .withSpeechAndBraille(range, null, 'navigate'); checkSpeechOutput('play|Disabled|Button|audio|Tool bar', [ {value: new Output.EarconAction('BUTTON'), start: 0, end: 4}, {value: 'name', start: 21, end: 26}, {value: 'role', start: 27, end: 35} ], o); checkBrailleOutput( 'play xx btn audio tlbar', [{value: new Output.NodeSpan(el), start: 0, end: 11}, {value: new Output.NodeSpan(el.parent), start: 12, end: 23}], o); // TODO(dmazzoni/dtseng): Replace with a query. el = el.nextSibling.nextSibling.nextSibling; var prevRange = range; range = cursors.Range.fromNode(el); var o = new Output() .withoutHints() .withSpeechAndBraille(range, prevRange, 'navigate'); checkSpeechOutput('|audio time scrubber|Slider|0:00|Min 0|Max 0', [ {value: 'name', start: 0, end: 0}, {value: new Output.EarconAction('SLIDER'), start: 0, end: 0}, {value: 'description', start: 1, end: 20}, {value: 'role', start: 21, end: 27}, {value: 'value', start: 28, end: 32} ], o); checkBrailleOutput( 'audio time scrubber sldr 0:00 min:0 max:0', [ {value: new Output.NodeSpan(el), start: 0, end: 41}], o); }); }); TEST_F('ChromeVoxOutputE2ETest', 'Input', function() { this.runWithLoadedTree( '<input type="text"></input>' + '<input type="email"></input>' + '<input type="password"></input>' + '<input type="tel"></input>' + '<input type="number"></input>' + '<input type="time"></input>' + '<input type="date"></input>' + '<input type="file"</input>' + '<input type="search"</input>' + '<input type="invalidType"</input>', function(root) { var expectedSpans = [ {value: 'name', start: 0, end: 0}, {value: new Output.EarconAction('EDITABLE_TEXT'), start: 0, end: 0}, {value: new Output.SelectionSpan(0, 0, 0), start: 1, end: 1}, {value: 'value', start: 1, end: 1}, {value: 'inputType', start: 2} ]; var expectedSpeechValues = [ '||Edit text', '||Edit text, email entry', '||Password edit text', '||Edit text numeric only', ['|Spin button', [ {value: 'name', start: 0, end: 0}, {value: new Output.EarconAction('LISTBOX'), start: 0, end: 0}, {value: 'role', start: 1, end: 12} ] ], ['Time control', [{value: 'role', start: 0, end: 12}] ], ['Date control', [{value: 'role', start: 0, end: 12}] ], ['Choose File|No file chosen|Button', [{value: 'name', start: 0, end: 11}, {value: new Output.EarconAction("BUTTON"), start: 0, end: 11}, {value: 'value', start: 12, end: 26}, {value: 'role', start: 27, end: 33}] ], '||Edit text, search entry', '||Edit text' ]; // TODO(plundblad): Some of these are wrong, there should be an initial // space for the cursor in edit fields. var expectedBrailleValues = [ ' ed', ' @ed 8dot', ' pwded', ' #ed', {string_: 'spnbtn', spans_: []}, {string_: 'time'}, {string_: 'date'}, {string_: 'Choose File No file chosen btn'}, ' srched', ' ed' ]; assertEquals(expectedSpeechValues.length, expectedBrailleValues.length); var el = root.firstChild.firstChild; expectedSpeechValues.forEach(function(expectedValue) { var range = cursors.Range.fromNode(el); var o = new Output() .withoutHints() .withSpeechAndBraille(range, null, 'navigate'); if (typeof expectedValue == 'object') { checkSpeechOutput(expectedValue[0], expectedValue[1], o); } else { expectedSpans[4].end = expectedValue.length; checkSpeechOutput(expectedValue, expectedSpans, o); } el = el.nextSibling; }); el = root.firstChild.firstChild; expectedBrailleValues.forEach(function(expectedValue) { var range = cursors.Range.fromNode(el); var o = new Output() .withoutHints() .withBraille(range, null, 'navigate'); if (typeof expectedValue === 'string') { checkBrailleOutput( expectedValue, [{value: {startIndex: 0, endIndex: 0}, start: 0, end: 0}, {value: new Output.NodeSpan(el), start: 0, end: expectedValue.length}], o); } else { var spans = [{value: new Output.NodeSpan(el), start: 0, end: expectedValue.string_.length}]; if (expectedValue.spans_) spans = spans.concat(expectedValue.spans_); checkBrailleOutput(expectedValue.string_, spans, o); } el = el.nextSibling; }); }); }); TEST_F('ChromeVoxOutputE2ETest', 'List', function() { this.runWithLoadedTree( '<ul><li aria-label="a">a<li>b<li>c</ul>', function(root) { var el = root.firstChild.firstChild; var range = cursors.Range.fromNode(el); var o = new Output().withSpeechAndBraille(range, null, 'navigate'); checkSpeechOutput('a|List item|List|with 3 items', [ { value: 'name', start: 0, end: 1 }, { value: { earconId: 'LIST_ITEM' }, start: 0, end: 1 }, { value: 'role', start: 12, end: 16 } ], o); // TODO(plundblad): This output is wrong. Add special handling for // braille here. checkBrailleOutput( 'a lstitm lst +3', [ {value: new Output.NodeSpan(el), start: 0, end: 8}, {value: new Output.NodeSpan(el.parent), start: 9, end: 15} ], o); }); }); TEST_F('ChromeVoxOutputE2ETest', 'Tree', function() { this.runWithLoadedTree(function() {/*! <ul role="tree" style="list-style-type:none"> <li aria-expanded="true" role="treeitem">a <li role="treeitem">b <li aria-expanded="false" role="treeitem">c </ul> */}, function(root) { var el = root.firstChild.children[0].firstChild; var range = cursors.Range.fromNode(el); var o = new Output().withSpeechAndBraille(range, null, 'navigate'); checkSpeechOutput( 'a|Tree item|Expanded| 1 of 3 | level 1 |Tree|with 3 items', [ {value: 'name', 'start': 0, end: 1}, {value: 'state', start: 12, end: 20}, {value: 'role','start': 40, end: 44}, ], o); checkBrailleOutput( 'a tritm - 1/3 level 1 tree +3', [{value: new Output.NodeSpan(el), start: 0, end: 1}, {value: new Output.NodeSpan(el.parent), start: 2, end: 22}, {value: new Output.NodeSpan(el.parent.parent), start: 22, end: 29}], o); el = root.firstChild.children[1].firstChild; range = cursors.Range.fromNode(el); o = new Output().withSpeechAndBraille(range, null, 'navigate'); checkSpeechOutput( 'b|Tree item| 2 of 3 | level 1 |Tree|with 3 items', [ {value: 'name', start: 0, end: 1}, {value: 'role', 'start': 31, end: 35} ], o); checkBrailleOutput( 'b tritm 2/3 level 1 tree +3', [{value: new Output.NodeSpan(el), start: 0, end: 1}, {value: new Output.NodeSpan(el.parent), start: 2, end: 20}, {value: new Output.NodeSpan(el.parent.parent), start: 20, end: 27}], o); el = root.firstChild.children[2].firstChild; range = cursors.Range.fromNode(el); o = new Output().withSpeechAndBraille(range, null, 'navigate'); checkSpeechOutput( 'c|Tree item|Collapsed| 3 of 3 | level 1 |Tree|with 3 items', [ {value: 'name', 'start': 0, end: 1}, {value: 'state', start: 12, end: 21}, {value: 'role','start': 41, end: 45}, ], o); checkBrailleOutput( 'c tritm + 3/3 level 1 tree +3', [{value: new Output.NodeSpan(el), start: 0, end: 1}, {value: new Output.NodeSpan(el.parent), start: 2, end: 22}, {value: new Output.NodeSpan(el.parent.parent), start: 22, end: 29}], o); }); }); TEST_F('ChromeVoxOutputE2ETest', 'Menu', function() { this.runWithLoadedTree(function() {/*! <div role="menu"> <div role="menuitem">a</div> <div role="menuitemcheckbox">b</div> <div role="menuitemradio">c</div> </div> */}, function(root) { var el = root.firstChild.firstChild; var range = cursors.Range.fromNode(el); var o = new Output().withSpeechAndBraille(range, null, 'navigate'); checkSpeechOutput('a|Menu item| 1 of 3 |Menu', [ {value: 'name', start: 0, end: 1}, {value: 'role', start: 21, end: 25}], o); checkBrailleOutput( 'a mnuitm 1/3 mnu', [{value: new Output.NodeSpan(el), start: 0, end: 12}, {value: new Output.NodeSpan(el.parent), start: 13, end: 16}], o); }); }); TEST_F('ChromeVoxOutputE2ETest', 'ListBox', function() { this.runWithLoadedTree(function() {/*! <select multiple> <option>1</option> <option>2</option> </select> */}, function(root) { var el = root.firstChild.firstChild.firstChild; var range = cursors.Range.fromNode(el); var o = new Output().withSpeechAndBraille(range, null, 'navigate'); checkSpeechOutput('1|List item| 1 of 2 |Not selected|List box|with 2 items', [ {value: 'name', start: 0, end: 1}, {value: new Output.EarconAction('LIST_ITEM'), start: 0,end: 1}, {value: 'role', start: 34, end: 42} ], o); checkBrailleOutput( '1 lstitm 1/2 ( ) lstbx +2', [{value: new Output.NodeSpan(el), start: 0, end: 16}, {value: new Output.NodeSpan(el.parent), start: 17, end: 25}], o); }); }); SYNC_TEST_F('ChromeVoxOutputE2ETest', 'MessageIdAndEarconValidity', function() { const kNoBrailleMessageRequired = new Set([ 'contentDeletion', 'contentInsertion', 'docAbstract', 'docAcknowledgments', 'docAfterword', 'docAppendix', 'docBackLink', 'docBiblioEntry', 'docBibliography', 'docBiblioRef', 'docChapter', 'docColophon', 'docConclusion', 'docCover', 'docCredit', 'docCredits', 'docDedication', 'docEndnote', 'docEndnotes', 'docEpigraph', 'docEpilogue', 'docErrata', 'docExample', 'docFootnote', 'docForeword', 'docGlossary', 'docGlossRef', 'docIndex', 'docIntroduction', 'docNoteRef', 'docNotice', 'docPageBreak', 'docPageList', 'docPart', 'docPreface', 'docPrologue', 'docPullquote', 'docQna', 'docSubtitle', 'docTip', 'docToc', 'graphicsDocument', 'graphicsObject', 'graphicsSymbol', ]); for (var key in Output.ROLE_INFO_) { var value = Output.ROLE_INFO_[key]; if (value.msgId) { Msgs.getMsg(value.msgId); if (!kNoBrailleMessageRequired.has(key)) Msgs.getMsg(value.msgId + '_brl'); assertFalse(/[A-Z]+/.test(value.msgId)); } if (value.earconId) assertNotNullNorUndefined(cvox.Earcon[value.earconId]); } for (var key in Output.STATE_INFO_) { var value = Output.STATE_INFO_[key]; for (innerKey in value) { var innerValue = value[innerKey]; if (typeof(innerValue) == 'boolean') { assertEquals('isRoleSpecific', innerKey); continue; } Msgs.getMsg(innerValue.msgId); Msgs.getMsg(innerValue.msgId + '_brl'); assertFalse(/[A-Z]+/.test(innerValue.msgId)); if (innerValue.earconId) assertNotNullNorUndefined(cvox.Earcon[innerValue.earconId]); } } for (var key in Output.INPUT_TYPE_MESSAGE_IDS_) { var msgId = Output.INPUT_TYPE_MESSAGE_IDS_[key]; assertFalse(/[A-Z]+/.test(msgId)); Msgs.getMsg(msgId); Msgs.getMsg(msgId + '_brl'); } }); TEST_F('ChromeVoxOutputE2ETest', 'DivOmitsRole', function() { this.runWithLoadedTree(function() {/*! <div>that has content</div> <div></div> <div role='group'><div>nested content</div></div> */}, function(root) { var el = root.firstChild.firstChild; var range = cursors.Range.fromNode(el); var o = new Output().withSpeechAndBraille(range, null, 'navigate'); checkSpeechOutput('that has content', [{value: 'name', start: 0, end: 16}], o); checkBrailleOutput( 'that has content', [{value: new Output.NodeSpan(el), start: 0, end: 16}], o); }); }); TEST_F('ChromeVoxOutputE2ETest', 'LessVerboseAncestry', function() { this.runWithLoadedTree(function() {/*! <div role="banner"><p>inside</p></div> <div role="banner"><p>inside</p></div> <div role="navigation"><p>inside</p></div> */}, function(root) { var first = root.children[0].firstChild; var second = root.children[1].firstChild; var third = root.children[2].firstChild; var firstRange = cursors.Range.fromNode(first); var secondRange = cursors.Range.fromNode(second); var thirdRange = cursors.Range.fromNode(third); var oWithoutPrev = new Output().withSpeech(firstRange, null, 'navigate'); var oWithPrev = new Output().withSpeech(secondRange, firstRange, 'navigate'); var oWithPrevExit = new Output().withSpeech(thirdRange, secondRange, 'navigate'); assertEquals('inside|Banner', oWithoutPrev.speechOutputForTest.string_); // Make sure we don't read the exited ancestry change. assertEquals('inside|Banner', oWithPrev.speechOutputForTest.string_); // Different role; do read the exited ancestry here. assertEquals('inside|Exited Banner.|Navigation', oWithPrevExit.speechOutputForTest.string_); }); }); TEST_F('ChromeVoxOutputE2ETest', 'Brief', function() { this.runWithLoadedTree(function() {/*! <div role="article"><p>inside</p></div> */}, function(root) { var node = root.children[0].firstChild; var range = cursors.Range.fromNode(node); localStorage['useVerboseMode'] = 'false'; var oWithoutPrev = new Output().withSpeech(range, null, 'navigate'); assertEquals('inside', oWithoutPrev.speechOutputForTest.string_); }); }); TEST_F('ChromeVoxOutputE2ETest', 'AuralStyledHeadings', function() { function toFixed(num) { return parseFloat(Number(num).toFixed(1)); } this.runWithLoadedTree(function() {/*! <h1>a</h1><h2>b</h2><h3>c</h3><h4>d</h4><h5>e</h5><h6>f</h6> <h1><a href="a.com">b</a></h1> */}, function(root) { var el = root.firstChild; for (var i = 1; i <= 6; ++i) { var range = cursors.Range.fromNode(el); var o = new Output().withRichSpeech(range, null, 'navigate'); var letter = String.fromCharCode('a'.charCodeAt(0) + i -1); assertEqualsJSON({string_: letter + '|Heading ' + i, 'spans_': [ // Aural styles. {value: {'relativePitch': toFixed(-0.1 * i)}, start: 0, end: 0}, // Attributes. {value: 'nameOrDescendants', start: 0, end: 1}, {value: {'relativePitch': -0.2}, start: 2, end: 2} ]}, o.speechOutputForTest); el = el.nextSibling; } }); }); TEST_F('ChromeVoxOutputE2ETest', 'ToggleButton', function() { this.runWithLoadedTree(function() {/*! <div role="button" aria-pressed="true">Subscribe</div>*/}, function(root) { var el = root.firstChild; var o = new Output().withSpeechAndBraille(cursors.Range.fromNode(el)); assertEqualsJSON({string_: '|Subscribe|Toggle Button|Pressed|Press Search+Space to toggle.', spans_: [ {value: {earconId: 'CHECK_ON'}, start: 0, end: 0}, {value: 'name', start: 1, end:10}, {value: 'role', start: 11, end: 24} ]}, o.speechOutputForTest); assertEquals('Subscribe tgl btn =', o.brailleOutputForTest.string_); }); }); TEST_F('ChromeVoxOutputE2ETest', 'JoinDescendants', function() { this.runWithLoadedTree(function() {/*! <p>This</p> <p>fragment</p> <p>Should be separated</p> <p>with spaces</p> */}, function(root) { var unjoined = new Output().format('$descendants', root); assertEquals('This|fragment|Should be separated|with spaces' , unjoined.speechOutputForTest.string_); var joined = new Output().format('$joinedDescendants', root); assertEquals('This fragment Should be separated with spaces' , joined.speechOutputForTest.string_); }); }); TEST_F('ChromeVoxOutputE2ETest', 'ComplexDiv', function() { this.runWithLoadedTree(function() {/*! <div><button>ok</button></div> */}, function(root) { var div = root.find({role: 'genericContainer'}); var o = new Output().withSpeech(cursors.Range.fromNode(div)); assertEquals('ok', o.speechOutputForTest.string_); }); }); TEST_F('ChromeVoxOutputE2ETest', 'ContainerFocus', function() { this.runWithLoadedTree(function() {/*! <div role="row" tabindex=0 aria-label="start"></div> <div role="row" tabindex=0 aria-label="end"></div> */}, function(root) { var r1 = cursors.Range.fromNode(root.firstChild); var r2 = cursors.Range.fromNode(root.lastChild); assertEquals('start|Row', new Output().withSpeech(r1, r2).speechOutputForTest.string_); }); }); TEST_F('ChromeVoxOutputE2ETest', 'BraileWhitespace', function() { this.runWithLoadedTree(function() {/*! <p>this is a <em>test</em>of emphasized text</p> */}, function(root) { var start = root.firstChild.firstChild; var end = root.firstChild.lastChild; var range = new cursors.Range( cursors.Cursor.fromNode(start), cursors.Cursor.fromNode(end) ); var o = new Output().withBraille(range, null, 'navigate'); checkBrailleOutput( 'this is a test of emphasized text', [ {value: new Output.NodeSpan(start), start: 0, end: 10}, {value: new Output.NodeSpan(start.nextSibling), start: 10, end: 14}, {value: new Output.NodeSpan(end), start: 15, end: 33} ], o); }); }); TEST_F('ChromeVoxOutputE2ETest', 'BrailleAncestry', function() { this.runWithLoadedTree(function() {/*! <ul><li><a href="#">test</a></li></ul> */}, function(root) { var text = root.find({role: 'inlineTextBox'}); var link = root.find({role: 'link'}); var listItem = root.find({role: 'listItem'}); var list = root.find({role: 'list'}); var range = cursors.Range.fromNode(text); var o = new Output().withBraille(range, null, 'navigate'); checkBrailleOutput( 'test lnk lstitm lst +1', [ {value: new Output.NodeSpan(text), start: 0, end: 4}, {value: new Output.NodeSpan(link), start: 5, end: 8}, {value: new Output.NodeSpan(listItem), start: 9, end: 15}, {value: new Output.NodeSpan(list), start: 16, end: 22} ], o); }); }); TEST_F('ChromeVoxOutputE2ETest', 'RangeOutput', function() { this.runWithLoadedTree(function(root) {/*! <div role="slider" aria-valuemin="1" aria-valuemax="10" aria-valuenow="2" aria-label="volume"></div> <progress aria-valuemin="1" aria-valuemax="10" aria-valuenow="2" aria-label="volume"></progress> <meter aria-valuemin="1" aria-valuemax="10" aria-valuenow="2" aria-label="volume"></meter> <div role="spinbutton" aria-valuemin="1" aria-valuemax="10" aria-valuenow="2" aria-label="volume"></div> */}, function(root) { var obj = root.find({role: RoleType.SLIDER}); var o = new Output() .withoutHints() .withSpeech(cursors.Range.fromNode(obj)); checkSpeechOutput('volume|Slider|2|Min 1|Max 10', [ {value: 'name', start: 0, end: 6}, {value: new Output.EarconAction('SLIDER'), start: 0, end: 6}, {value: 'role', start: 7, end: 13}, {value: 'valueForRange', start: 14, end: 15} ], o); obj = root.find({role: RoleType.PROGRESS_INDICATOR}); o = new Output() .withoutHints() .withSpeech(cursors.Range.fromNode(obj)); checkSpeechOutput('volume|Progress indicator|2|Min 1|Max 10', [ {value: 'name', start: 0,end: 6}, {value: 'role', start: 7, end: 25}, {value: 'valueForRange', start: 26, end: 27} ], o); obj = root.find({role: RoleType.METER}); o = new Output() .withoutHints() .withSpeech(cursors.Range.fromNode(obj)); checkSpeechOutput('volume|Meter|2|Min 1|Max 10', [ {value: 'name', start: 0,end: 6}, {value: 'role', start: 7, end: 12}, {value: 'valueForRange', start: 13, end: 14} ], o); obj = root.find({role: RoleType.SPIN_BUTTON}); o = new Output() .withoutHints() .withSpeech(cursors.Range.fromNode(obj)); checkSpeechOutput('volume|Spin button|2|Min 1|Max 10', [ {value: 'name', start: 0,end: 6}, {value: new Output.EarconAction('LISTBOX'), start: 0, end: 6}, {value: 'role', start: 7, end: 18}, {value: 'valueForRange', start: 19, end: 20} ], o); }); }); TEST_F('ChromeVoxOutputE2ETest', 'RoleDescription', function() { this.runWithLoadedTree(function(root) {/*! <div aria-label="hi" role="button" aria-roledescription="foo"></div> */}, function(root) { var obj = root.find({role: RoleType.BUTTON}); var o = new Output() .withoutHints() .withSpeech(cursors.Range.fromNode(obj)); checkSpeechOutput('hi|foo', [ {value: 'name', start: 0, end: 2}, {value: new Output.EarconAction('BUTTON'), start: 0, end: 2}, {value: 'role', start: 3, end: 6} ], o); }); }); SYNC_TEST_F('ChromeVoxOutputE2ETest', 'ValidateCommonProperties', function() { var stateStr = '$state'; var restrictionStr = '$restriction'; var descStr = '$description'; var missingState = []; var missingRestriction = []; var missingDescription = []; for (var key in Output.RULES.navigate) { var speak = Output.RULES.navigate[key].speak; if (!speak) continue; if (speak.indexOf(stateStr) == -1) missingState.push(key); if (speak.indexOf(restrictionStr) == -1) missingRestriction.push(key); if (speak.indexOf(descStr) == -1) missingDescription.push(key); } // This filters out known roles that don't have states or descriptions. var notStated = [RoleType.CLIENT, RoleType.EMBEDDED_OBJECT, RoleType.INLINE_TEXT_BOX, RoleType.LINE_BREAK, RoleType.LIST_MARKER, RoleType.PARAGRAPH, RoleType.ROOT_WEB_AREA, RoleType.STATIC_TEXT, RoleType.WINDOW]; var notRestricted = [RoleType.ALERT, RoleType.ALERT_DIALOG, RoleType.CELL, RoleType.CLIENT, RoleType.EMBEDDED_OBJECT, RoleType.GENERIC_CONTAINER, RoleType.IMAGE, RoleType.INLINE_TEXT_BOX, RoleType.LINE_BREAK, RoleType.LIST, RoleType.LIST_MARKER, RoleType.PARAGRAPH, RoleType.REGION, RoleType.ROOT_WEB_AREA, RoleType.ROW_HEADER, RoleType.STATIC_TEXT, RoleType.TABLE_HEADER_CONTAINER, RoleType.TIMER, RoleType.WINDOW]; var notDescribed = [RoleType.CLIENT, RoleType.EMBEDDED_OBJECT, RoleType.INLINE_TEXT_BOX, RoleType.LINE_BREAK, RoleType.LIST_MARKER, RoleType.PARAGRAPH, RoleType.ROOT_WEB_AREA, RoleType.STATIC_TEXT, RoleType.WINDOW]; missingState = missingState.filter(function(state) { return notStated.indexOf(state) == -1; }); missingRestriction = missingRestriction.filter(function(restriction) { return notRestricted.indexOf(restriction) == -1; }); missingDescription = missingDescription.filter(function(desc) { return notDescribed.indexOf(desc) == -1; }); assertEquals(0, missingState.length, 'Unexpected missing states for output rules ' + missingState.join(' ')); assertEquals(0, missingRestriction.length, 'Unexpected missing restriction for output rules ' + missingRestriction.join(' ')); assertEquals(0, missingDescription.length, 'Unexpected missing descriptions for output rules ' + missingDescription.join(' ')); // If you fail this test, you likely need to insert a $state, $restriction or // $description into the output rules for the printed roles. Typically, // $description goes towards the end of the output rule, though this depends // on the role. For example, it could make sense to put $description before // $value or $state. // You can also add the role to be excluded from this check. You are // encouraged to write a more intelligent output rule to provide friendlier // feedback. For example, 'not selected apple item 2 out of 3' coming from a // message template like '@smart_selection($state, $name, $indexInParent, // $childCount)'. // In such cases, you are responsible for ensuring you include all states and // descriptions somewhere in the output. }); TEST_F('ChromeVoxOutputE2ETest', 'InlineBraille', function() { this.runWithLoadedTree(function(root) {/*! <table border=1> <tr><td>Name</td><td id="active">Age</td><td>Address</td></tr> </table> */}, function(root) { var obj = root.find({role: RoleType.CELL}); var o = new Output().withRichSpeechAndBraille(cursors.Range.fromNode(obj)); assertEquals('Name|row 1 column 1|Table , 1 by 3', o.speechOutputForTest.string_); assertEquals('Name r1c1 Age r1c2 Address r1c3', o.brailleOutputForTest.string_); }); }); TEST_F('ChromeVoxOutputE2ETest', 'TextFieldObeysRoleDescription', function() { this.runWithLoadedTree(function(root) {/*! <div role="textbox" aria-roledescription="square"></div> <div role="region" aria-roledescription="circle"></div> */}, function(root) { var text = root.find({role: RoleType.TEXT_FIELD}); // True even though |text| does not have editable state. assertTrue(AutomationPredicate.editText(text)); var o = new Output().withRichSpeechAndBraille(cursors.Range.fromNode(text)); assertEquals('|square', o.speechOutputForTest.string_); assertEquals('square', o.brailleOutputForTest.string_); var region = root.find({role: RoleType.REGION}); o = new Output().withRichSpeechAndBraille(cursors.Range.fromNode(region)); assertEquals('circle', o.speechOutputForTest.string_); assertEquals('circle', o.brailleOutputForTest.string_); }); }); TEST_F('ChromeVoxOutputE2ETest', 'ARCListItem', function() { this.runWithLoadedTree(function(root) {/*! <div role="listitem"> <p>storage</p> <p>128 GB</p> </div> */}, function(root) { var listitem = root.find({role: RoleType.LIST_ITEM}); Object.defineProperty(listitem, 'clickable', { get: () => true }); assertTrue(AutomationPredicate.leaf(listitem)); assertFalse(AutomationPredicate.container(listitem)); var o = new Output().withRichSpeechAndBraille(cursors.Range.fromNode(listitem)); assertEquals('storage 128 GB|List item|Press Search+Space to activate.', o.speechOutputForTest.string_); assertEquals('storage 128 GB lstitm', o.brailleOutputForTest.string_); }); }); TEST_F('ChromeVoxOutputE2ETest', 'NestedList', function() { this.runWithLoadedTree(function() {/*! <ul role="tree">schedule <li role="treeitem">wake up <li role="treeitem">drink coffee <ul role="tree">tasks <li role="treeitem" aria-level='2'>meeting <li role="treeitem" aria-level='2'>lunch </ul> <li role="treeitem">cook dinner </ul> */}, function(root) { var lists = root.findAll({role: 'tree'}); var outer_list = lists[0]; var inner_list = lists[1]; var el = outer_list.children[0]; var start_range = cursors.Range.fromNode(el); var o = new Output().withSpeech(start_range, null, 'navigate'); assertEquals('schedule|Tree|with 3 items', o.speechOutputForTest.string_); el = outer_list.children[1]; start_range = cursors.Range.fromNode(el); o = new Output().withSpeech(start_range, cursors.Range.fromNode(outer_list.children[0]), 'navigate'); assertEquals('wake up|Tree item|Not selected| 1 of 3 | level 1 ', o.speechOutputForTest.string_); el = outer_list.children[2]; start_range = cursors.Range.fromNode(el); o = new Output().withSpeech(start_range, cursors.Range.fromNode(outer_list.children[0]), 'navigate'); assertEquals('drink coffee|Tree item|Not selected| 2 of 3 | level 1 ', o.speechOutputForTest.string_); el = outer_list.children[3]; start_range = cursors.Range.fromNode(el); o = new Output().withSpeech(start_range, cursors.Range.fromNode(outer_list.children[0]), 'navigate'); assertEquals('cook dinner|Tree item|Not selected| 3 of 3 | level 1 ', o.speechOutputForTest.string_); el = inner_list.children[0]; start_range = cursors.Range.fromNode(el); o = new Output().withSpeech(start_range, cursors.Range.fromNode(outer_list.children[2]), 'navigate'); assertEquals('tasks|Tree|with 2 items',o.speechOutputForTest.string_); el = inner_list.children[1]; start_range = cursors.Range.fromNode(el); o = new Output().withSpeech(start_range, cursors.Range.fromNode(inner_list.children[0]), 'navigate'); assertEquals('meeting|Tree item|Not selected| 1 of 2 | level 2 ', o.speechOutputForTest.string_); el = inner_list.children[2]; start_range = cursors.Range.fromNode(el); o = new Output().withSpeech(start_range, cursors.Range.fromNode(inner_list.children[0]), 'navigate'); assertEquals('lunch|Tree item|Not selected| 2 of 2 | level 2 ', o.speechOutputForTest.string_); }); }); ; //# sourceURL=file:///b/s/w/ir/out/Debug/test_data/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs runTest(true,"RUN_TEST_F",["ChromeVoxOutputE2ETest","BraileWhitespace"]); Stack trace: #0 0x7f801ecb8bd5 base::debug::StackTrace::StackTrace() #1 0x55f6a17888d0 StackTraceGetter::CurrentStackTrace() #2 0x55f6a1793537 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop() #3 0x55f6a17930c3 testing::internal::AssertHelper::operator=() #4 0x55f6a36ff33a extensions::browsertest_util::ExecuteScriptInBackgroundPage() #5 0x55f6a395f1aa ExtensionJSBrowserTest::RunJavascriptTestF() #6 0x55f6a376bc62 ChromeVoxOutputE2ETest_BraileWhitespace_Test::RunTestOnMainThread() #7 0x55f6a4320e13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #8 0x55f69f50569d base::internal::FunctorTraits<>::Invoke<>() #9 0x55f69f5055e1 base::internal::InvokeHelper<>::MakeItSo<>() #10 0x55f69f505587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #11 0x55f69f6d183c base::internal::Invoker<>::Run() #12 0x55f69f4f8f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #13 0x55f6a3a6dd9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #14 0x55f6a3a6cb52 ChromeBrowserMainParts::PreMainMessageLoopRun() #15 0x55f6a124f4dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #16 0x7f80174ce807 content::BrowserMainLoop::PreMainMessageLoopRun() #17 0x7f80168aa61d base::internal::FunctorTraits<>::Invoke<>() #18 0x7f80168aa591 base::internal::InvokeHelper<>::MakeItSo<>() #19 0x7f80168aa537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #20 0x7f801727611c base::internal::Invoker<>::Run() #21 0x7f801681ed5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #22 0x7f8017ce1acc content::StartupTaskRunner::RunAllTasksNow() #23 0x7f80174ccfc1 content::BrowserMainLoop::CreateStartupTasks() #24 0x7f80174d3ece content::BrowserMainRunnerImpl::Initialize() #25 0x7f80174ca361 content::BrowserMain() #26 0x7f8018831d2b content::RunBrowserProcessMain() #27 0x7f8018832fe6 content::ContentMainRunnerImpl::RunServiceManager() #28 0x7f8018832aa0 content::ContentMainRunnerImpl::Run() #29 0x7f8018830589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #30 0x7f7ff60f3703 service_manager::Main() #31 0x7f8018831835 content::ContentMain() #32 0x55f6a4320a19 content::BrowserTestBase::SetUp() #33 0x55f6a39cbf4e InProcessBrowserTest::SetUp() BrowserTestBase received signal: Segmentation fault. Backtrace: #0 0x7f801ee50901 base::debug::CollectStackTrace() #1 0x7f801ecb8c1d base::debug::StackTrace::StackTrace() #2 0x7f801ecb8bd5 base::debug::StackTrace::StackTrace() #3 0x55f6a432181d content::(anonymous namespace)::DumpStackTraceSignalHandler() #4 0x7f7ff75cdcb0 <unknown> #5 0x55f69f4fd12c gfx::Size::width() #6 0x55f6a395f20d ExtensionJSBrowserTest::RunJavascriptTestF() #7 0x55f6a376bc62 ChromeVoxOutputE2ETest_BraileWhitespace_Test::RunTestOnMainThread() #8 0x55f6a4320e13 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #9 0x55f69f50569d base::internal::FunctorTraits<>::Invoke<>() #10 0x55f69f5055e1 base::internal::InvokeHelper<>::MakeItSo<>() #11 0x55f69f505587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #12 0x55f69f6d183c base::internal::Invoker<>::Run() #13 0x55f69f4f8f8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #14 0x55f6a3a6dd9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #15 0x55f6a3a6cb52 ChromeBrowserMainParts::PreMainMessageLoopRun() #16 0x55f6a124f4dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #17 0x7f80174ce807 content::BrowserMainLoop::PreMainMessageLoopRun() #18 0x7f80168aa61d base::internal::FunctorTraits<>::Invoke<>() #19 0x7f80168aa591 base::internal::InvokeHelper<>::MakeItSo<>() #20 0x7f80168aa537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #21 0x7f801727611c base::internal::Invoker<>::Run() #22 0x7f801681ed5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #23 0x7f8017ce1acc content::StartupTaskRunner::RunAllTasksNow() #24 0x7f80174ccfc1 content::BrowserMainLoop::CreateStartupTasks() #25 0x7f80174d3ece content::BrowserMainRunnerImpl::Initialize() #26 0x7f80174ca361 content::BrowserMain() #27 0x7f8018831d2b content::RunBrowserProcessMain() #28 0x7f8018832fe6 content::ContentMainRunnerImpl::RunServiceManager() #29 0x7f8018832aa0 content::ContentMainRunnerImpl::Run() #30 0x7f8018830589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #31 0x7f7ff60f3703 service_manager::Main() #32 0x7f8018831835 content::ContentMain() #33 0x55f6a4320a19 content::BrowserTestBase::SetUp() #34 0x55f6a39cbf4e InProcessBrowserTest::SetUp() #35 0x55f6a17aa63e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #36 0x55f6a17a6302 testing::internal::HandleExceptionsInMethodIfSupported<>() #37 0x55f6a1799b94 testing::Test::Run() #38 0x55f6a179a282 testing::TestInfo::Run() #39 0x55f6a179a793 testing::TestSuite::Run() #40 0x55f6a17a2274 testing::internal::UnitTestImpl::RunAllTests() #41 0x55f6a17aa6ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #42 0x55f6a17a7152 testing::internal::HandleExceptionsInMethodIfSupported<>() #43 0x55f6a17a1f97 testing::UnitTest::Run() #44 0x55f6a39ebd01 RUN_ALL_TESTS() #45 0x55f6a39ea562 base::TestSuite::Run() #46 0x55f6a394eb57 ChromeTestSuiteRunner::RunTestSuite() #47 0x55f6a394ec43 ChromeTestLauncherDelegate::RunTestSuite() #48 0x55f6a4366005 content::LaunchTests() #49 0x55f6a394ef87 LaunchChromeTests() #50 0x55f6a394e9ab main #51 0x7f7ff75b8f45 __libc_start_main #52 0x55f69f4a702a _start [465/694] ChromeVoxOutputE2ETest.BraileWhitespace (CRASHED) [466/694] ChromeVoxEditingTest.RichTextMoveByLine (23124 ms) [467/694] ChromeVoxOutputE2ETest.Input (22048 ms) [468/694] ChromeVoxBluetoothBrailleDisplayManagerUnitTest.Connect (6835 ms) [469/694] ChromeVoxBluetoothBrailleDisplayUIUnitTest.PincodeRequest (7614 ms) [470/694] ChromeVoxBrailleDisplayManagerUnitTest.RandB_Random (7884 ms) [471/694] ChromeVoxTtsBackgroundTest.Preprocess (12353 ms) [472/694] ChromeVoxBrailleInputHandlerUnitTest.TypingUrlWithContracted (7389 ms) [473/694] ChromeVoxPanStrategyUnitTest.FixedSetContent (7100 ms) [474/694] ChromeVoxEventWatcherUnitTest.FocusLinksBackwards (8660 ms) [475/694] ChromeVoxNavigationManagerUnitTest.LabelThenControl (8656 ms) [476/694] ChromeVoxDomUtilUnitTest.NestedVisibilityPara (7871 ms) [477/694] ChromeVoxDomUtilUnitTest.GetName (7620 ms) [478/694] ChromeVoxDomUtilUnitTest.ShallowChildlessClone (7095 ms) [479/694] ChromeVoxEditableTextUnitTest.Selection (7620 ms) [480/694] ChromeVoxEditableTextUnitTest.CharacterEcho (7352 ms) [481/694] ChromeVoxSpannableUnitTest.ToStringUnannotated (7366 ms) [482/694] ChromeVoxSpannableUnitTest.GetSpanStartAndEndAndLengthAbsent (7361 ms) [483/694] ChromeVoxSpannableUnitTest.TrimSpans (7088 ms) [484/694] StringUtilUnitTest.previousCodePointOffset (7092 ms) [485/694] MockFeedbackUnitTest.expectAfterReplayThrows (7093 ms) [486/694] SelectToSpeakKeystrokeSelectionTest.SpeaksTextAtKeystrokeSingleWord (9445 ms) [487/694] SelectToSpeakKeystrokeSelectionTest.SpeaksAcrossNodesAtKeystroke (9709 ms) [488/694] SelectToSpeakKeystrokeSelectionTest.SpeakTextSurroundedByBrs (9444 ms) [489/694] SwitchAccessNavigationManagerTest.MoveForward (10763 ms) [490/694] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/17 (7882 ms) [491/694] WebViewChannelTest.Shim_WebViewWebRequestRegistryHasNoPersistentCache/0 (8930 ms) [492/694] SwitchAccessPredicateTest.IsGroup (10757 ms) [493/694] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/38 (7083 ms) [494/694] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/50 (7351 ms) [495/694] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/94 (7609 ms) [496/694] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/100 (6822 ms) [497/694] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/105 (6569 ms) [498/694] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/106 (7093 ms) [499/694] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/121 (6589 ms) [500/694] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/118 (10510 ms) [501/694] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/127 (7882 ms) [502/694] EncodingAliases/BrowserEncodingTest.TestEncodingAliasMapping/22 (6833 ms) [503/694] AllForms/FormStructureBrowserTest.DataDrivenHeuristics/154 (7371 ms) [504/694] BrowsingDataRemoverBrowserTestP.WebSqlDeletion/1 (7356 ms) [505/694] BrowsingDataRemoverBrowserTestP.EmptyWebSqlDeletion/0 (7088 ms) [506/694] CookieSettingsTest.BlockCookiesUsingExceptions/0 (7358 ms) [507/694] SaveType/SavePageOriginalVsSavedComparisonTest.RuntimeChanges/0 (9451 ms) [508/694] SaveType/SavePageOriginalVsSavedComparisonTest.Encoding/0 (9976 ms) [0212/012446.650478:ERROR:kill_posix.cc(84)] Unable to terminate process group 19914: No such process (3) [ RUN ] OutOfBlinkCorsWithoutServicification/CorsOriginAccessListBrowserTest.AllowExactHostInCaseInsensitive/0 [1:1:0212/012441.899865:INFO:hugepage_text.cc(68)] Mlocking text pages failed: Cannot allocate memory (12) [19914:19914:0212/012442.213579:WARNING:chrome_browser_main_chromeos.cc(557)] Running as stub user with profile dir: test-user [19914:19914:0212/012443.072333:INFO:remote_commands_service.cc(38)] Fetching remote commands. [19914:19914:0212/012443.073223:WARNING:remote_commands_service.cc(40)] Client is not registered. [19914:19914:0212/012443.073646:INFO:remote_commands_invalidator.cc(32)] Initialize RemoteCommandsInvalidator. [19914:19914:0212/012443.074150:INFO:remote_commands_invalidator.cc(57)] Starting RemoteCommandsInvalidator. [19914:19914:0212/012443.074462:INFO:remote_commands_invalidator.cc(123)] RemoteCommandsInvalidator ReloadPolicyData. [19914:19914:0212/012443.075285:INFO:remote_commands_invalidator.cc(167)] Unregister RemoteCommandsInvalidator. [19914:19914:0212/012443.406044:WARNING:wallpaper_controller_client.cc(385)] Cannot get wallpaper files id in RemovePolicyWallpaper. This should never happen under normal circumstances. [19914:19914:0212/012445.139748:FATAL:shelf_widget.cc(293)] Check failed: login_shelf_view_->visible(). #0 0x7f9db512b901 base::debug::CollectStackTrace() #1 0x7f9db4f93c1d base::debug::StackTrace::StackTrace() #2 0x7f9db4f93bd5 base::debug::StackTrace::StackTrace() #3 0x7f9db4fce827 logging::LogMessage::~LogMessage() #4 0x7f9da01fef47 ash::ShelfWidget::GetHitTestRects() #5 0x7f9da0200f11 ash::ShelfWindowTargeter::GetHitTestRects() #6 0x7f9da7db13ae aura::WindowTargeter::EventLocationInsideBounds() #7 0x7f9d9ec7e7d0 wm::EasyResizeWindowTargeter::EventLocationInsideBounds() #8 0x7f9da7dafe04 aura::WindowTargeter::SubtreeShouldBeExploredForEvent() #9 0x7f9da7db1046 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #10 0x7f9da7db0ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #11 0x7f9da01b722b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #12 0x7f9da7db0c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #13 0x7f9da7db0aa1 aura::WindowTargeter::FindTargetForEvent() #14 0x7f9da7db1096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #15 0x7f9da7db0ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #16 0x7f9da01b722b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #17 0x7f9da7db0c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #18 0x7f9da7db0aa1 aura::WindowTargeter::FindTargetForEvent() #19 0x7f9da7db1096 aura::WindowTargeter::FindTargetForLocatedEventRecursively() #20 0x7f9da7db0ef3 aura::WindowTargeter::FindTargetForLocatedEvent() #21 0x7f9da01b722b ash::(anonymous namespace)::RootWindowTargeter::FindTargetForLocatedEvent() #22 0x7f9da7db0c8a aura::WindowTargeter::FindTargetForNonKeyEvent() #23 0x7f9da7db0aa1 aura::WindowTargeter::FindTargetForEvent() #24 0x7f9da9fd6c0c ui::EventProcessor::OnEventFromSource() #25 0x7f9da9fd6fac ui::EventProcessor::OnEventFromSource() #26 0x7f9d9e7eba1f ws::EventQueue::DeliverOrQueueEvent() #27 0x7f9da012b2b8 ash::AshWindowTreeHostPlatform::DeliverEventToSink() #28 0x7f9da012b35c ash::AshWindowTreeHostPlatform::DeliverEventToSink() #29 0x7f9da9fd79f8 ui::EventSource::SendEventToSinkFromRewriter() #30 0x7f9da9fd7591 ui::EventSource::SendEventToSink() #31 0x7f9da7db701d aura::WindowTreeHostPlatform::DispatchEvent() #32 0x7f9da012b191 ash::AshWindowTreeHostPlatform::DispatchEvent() #33 0x7f9d9f604f55 base::internal::FunctorTraits<>::Invoke<>() #34 0x7f9d9f604eb6 base::internal::InvokeHelper<>::MakeItSo<>() #35 0x7f9d9f604e47 _ZN4base8internal7InvokerINS0_9BindStateIMN2ui22PlatformWindowDelegateEFvPNS3_5EventEEJNS0_17UnretainedWrapperIS4_EEEEEFvS6_EE7RunImplIS8_NSt4__Cr5tupleIJSA_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOS6_ #36 0x7f9d9f604de9 base::internal::Invoker<>::RunOnce() #37 0x7f9da9fe3db3 _ZNO4base12OnceCallbackIFvPN2ui5EventEEE3RunES3_ #38 0x7f9da9fe3be4 ui::DispatchEventFromNativeUiEvent() #39 0x7f9d9f67b4bc ui::X11WindowOzone::DispatchEvent() #40 0x7f9db00af887 ui::PlatformEventSource::DispatchEvent() #41 0x7f9d888ad4a9 ui::X11EventSourceLibevent::DispatchPlatformEvent() #42 0x7f9d888ad053 ui::X11EventSourceLibevent::ProcessXEvent() #43 0x7f9d8889f8a5 ui::X11EventSource::ExtractCookieDataDispatchEvent() #44 0x7f9d8889f82e ui::X11EventSource::DispatchXEvents() #45 0x7f9d888ad70f ui::X11EventSourceLibevent::OnFileCanReadWithoutBlocking() #46 0x7f9db515ecae base::MessagePumpLibevent::FdWatchController::OnFileCanReadWithoutBlocking() #47 0x7f9db515fdcd base::MessagePumpLibevent::OnLibeventNotification() #48 0x7f9db51a81fe event_process_active #49 0x7f9db51a7847 event_base_loop #50 0x7f9db515fea4 base::MessagePumpLibevent::Run() #51 0x7f9db509002c base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run() #52 0x7f9db50349d7 base::RunLoop::Run() #53 0x55d673272c8e content::RunThisRunLoop() #54 0x55d673272e33 content::RunAllPendingInMessageLoop() #55 0x55d6728d2111 InProcessBrowserTest::PreRunTestOnMainThread() #56 0x55d673225cde content::BrowserTestBase::ProxyRunTestOnMainThreadLoop() #57 0x55d66e40a69d base::internal::FunctorTraits<>::Invoke<>() #58 0x55d66e40a5e1 base::internal::InvokeHelper<>::MakeItSo<>() #59 0x55d66e40a587 _ZN4base8internal7InvokerINS0_9BindStateIM25RenderViewContextMenuBaseFvvEJNS0_17UnretainedWrapperI21RenderViewContextMenuEEEEEFvvEE7RunImplIS5_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #60 0x55d66e5d683c base::internal::Invoker<>::Run() #61 0x55d66e3fdf8d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #62 0x55d672972d9f ChromeBrowserMainParts::PreMainMessageLoopRunImpl() #63 0x55d672971b52 ChromeBrowserMainParts::PreMainMessageLoopRun() #64 0x55d6701544dc chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun() #65 0x7f9dad7a9807 content::BrowserMainLoop::PreMainMessageLoopRun() #66 0x7f9dacb8561d base::internal::FunctorTraits<>::Invoke<>() #67 0x7f9dacb85591 base::internal::InvokeHelper<>::MakeItSo<>() #68 0x7f9dacb85537 _ZN4base8internal7InvokerINS0_9BindStateIMN7content12ChildProcessEFvvEJNS0_17UnretainedWrapperIS4_EEEEEFvvEE7RunImplIS6_NSt4__Cr5tupleIJS8_EEEJLm0EEEEvOT_OT0_NSD_16integer_sequenceImJXspT1_EEEE #69 0x7f9dad55111c base::internal::Invoker<>::Run() #70 0x7f9dacaf9d5d _ZNKR4base17RepeatingCallbackIFvvEE3RunEv #71 0x7f9dadfbcacc content::StartupTaskRunner::RunAllTasksNow() #72 0x7f9dad7a7fc1 content::BrowserMainLoop::CreateStartupTasks() #73 0x7f9dad7aeece content::BrowserMainRunnerImpl::Initialize() #74 0x7f9dad7a5361 content::BrowserMain() #75 0x7f9daeb0cd2b content::RunBrowserProcessMain() #76 0x7f9daeb0dfe6 content::ContentMainRunnerImpl::RunServiceManager() #77 0x7f9daeb0daa0 content::ContentMainRunnerImpl::Run() #78 0x7f9daeb0b589 content::ContentServiceManagerMainDelegate::RunEmbedderProcess() #79 0x7f9d8c3ce703 service_manager::Main() #80 0x7f9daeb0c835 content::ContentMain() #81 0x55d673225a19 content::BrowserTestBase::SetUp() #82 0x55d6728d0f4e InProcessBrowserTest::SetUp() #83 0x55d6706af63e testing::internal::HandleSehExceptionsInMethodIfSupported<>() #84 0x55d6706ab302 testing::internal::HandleExceptionsInMethodIfSupported<>() #85 0x55d67069eb94 testing::Test::Run() #86 0x55d67069f282 testing::TestInfo::Run() #87 0x55d67069f793 testing::TestSuite::Run() #88 0x55d6706a7274 testing::internal::UnitTestImpl::RunAllTests() #89 0x55d6706af6ce testing::internal::HandleSehExceptionsInMethodIfSupported<>() #90 0x55d6706ac152 testing::internal::HandleExceptionsInMethodIfSupported<>() #91 0x55d6706a6f97 testing::UnitTest::Run() #92 0x55d6728f0d01 RUN_ALL_TESTS() #93 0x55d6728ef562 base::TestSuite::Run() #94 0x55d672853b57 ChromeTestSuiteRunner::RunTestSuite() #95 0x55d672853c43 ChromeTestLauncherDelegate::RunTestSuite() #96 0x55d67326b005 content::LaunchTests() #97 0x55d672853f87 LaunchChromeTests() #98 0x55d6728539ab main #99 0x7f9d8d893f45 __libc_start_main #100 0x55d66e3ac02a _start [509/694] OutOfBlinkCorsWithoutServicification/CorsOriginAccessListBrowserTest.AllowExactHostInCaseInsensitive/0 (CRASHED) [510/694] SaveType/SavePageOriginalVsSavedComparisonTest.Style/1 (9984 ms) [511/694] LookalikeUrlNavigationObserverBrowserTest.TopDomainChromeUrl_NoMatch/1 (7626 ms) [512/694] MSE_ClearKey/EncryptedMediaTest.ConfigChangeVideo_EncryptedToEncrypted/0 (11037 ms) [513/694] MSE_ClearKey/EncryptedMediaTest.Playback_EncryptedVideo_CENC_EncryptedAudio_CBCS/0 (10768 ms) [514/694] SRC_ExternalClearKey/EncryptedMediaTest.Playback_AudioOnly_MP4_FLAC/0 (8151 ms) [515/694] MSE_ClearKey/EncryptedMediaTest.EncryptedMediaDisabled/0 (12868 ms) [516/694] CDM_9/ECKEncryptedMediaTest.LoadSessionAfterClose/0 (8924 ms) [517/694] MSE_ExternalClearKey/EncryptedMediaTest.PolicyCheck/0 (10231 ms) [518/694] MSE_ExternalClearKey/EncryptedMediaTest.Playback_VideoOnly_WebM_AV1_10bit/0 (11800 ms) [519/694] CDM_9/ECKEncryptedMediaTest.Playback_Encryption_CENC/0 (11290 ms) [520/694] CDM_11/ECKEncryptedMediaTest.InitializeCDMFail/0 (9715 ms) [521/694] CDM_11/ECKEncryptedMediaTest.LoadSessionAfterClose/0 (9194 ms) [522/694] CDM_10/ECKEncryptedMediaTest.DecryptOnly_VideoAudio_WebM/0 (12864 ms) [523/694] CDM_11/ECKEncryptedMediaTest.DecryptOnly_VideoOnly_MP4_VP9/0 (12868 ms) [524/694] MediaEngagementAutoplayBrowserTest.DoNotBypassAutoplayLowEngagement/1 (7348 ms) [525/694] CDM_11/ECKEncryptedMediaTest.Playback_Encryption_CENS/0 (8396 ms) [526/694] MediaEngagementAutoplayBrowserTest.DoNotBypassAutoplayFrameLowEngagement_Delegation/1 (7613 ms) [527/694] NetInfoNetworkQualityEstimatorHoldbackBrowserTest.EffectiveConnectionTypeChangeNotified/1 (8408 ms) [528/694] WebRtcGetDisplayMediaBrowserTestWithFakeUI.GetDisplayMediaVideo/3 (11814 ms) [529/694] OnDiskApp/NetworkContextConfigurationBrowserTest.CacheIsolation/0 (9185 ms) [530/694] UkmBrowserTest.RegularPlusIncognitoCheck/0 (11817 ms) [531/694] OnDiskApp/NetworkContextConfigurationBrowserTest.PRE_CookiesEnabled/0 (6579 ms) [532/694] OnDiskApp/NetworkContextConfigurationBrowserTest.PRE_CookieSettings/0 (6581 ms) [533/694] OnDiskAppWithIncognitoProfile/NetworkContextConfigurationBrowserTest.PRE_SSLConfig/0 (7627 ms) [534/694] OnDiskAppWithIncognitoProfile/NetworkContextConfigurationBrowserTest.PRE_CookiesEnabled/0 (7611 ms) [535/694] SystemNetworkContext/NetworkContextConfigurationBrowserTest.PRE_EnableReferrers/0 (6304 ms) [536/694] ProfileMainNetworkContext/NetworkContextConfigurationBrowserTest.PRE_EnableReferrers/0 (6560 ms) [537/694] ProfileMainNetworkContext/NetworkContextConfigurationBrowserTest.CookieIsolation/0 (7613 ms) [538/694] ProfileMainNetworkContext/NetworkContextConfigurationBrowserTest.PRE_ThirdPartyCookiesBlocked/0 (6303 ms) [539/694] OnDiskAppWithIncognitoProfile/NetworkContextConfigurationFixedPortBrowserTest.TestingFixedPort/0 (7346 ms) [540/694] SystemNetworkContext/NetworkContextConfigurationHttpPacBrowserTest.HttpPac/0 (7353 ms) [541/694] NetworkRequestMetricsBrowserTest.NetErrorDuringBody/0 (6566 ms) [542/694] OnDiskApp/NetworkContextConfigurationFtpPacBrowserTest.FtpPac/0 (7363 ms) [543/694] NetworkRequestMetricsBrowserTest.CancelDuringBody/0 (7348 ms) [544/694] NetworkRequestMetricsBrowserTest.CancelDuringBody/3 (7607 ms) [545/694] NetworkRequestMetricsBrowserTest.SuccessWithEmptyBody/0 (6559 ms) [546/694] NetworkRequestMetricsBrowserTest.FileURLSuccess/2 (6570 ms) [547/694] SubframeDownloadFlagsBrowserTest.Download/25 (7622 ms) [548/694] SubframeDownloadFlagsBrowserTest.Download/29 (8132 ms) [549/694] SubframeDownloadFlagsBrowserTest.Download/43 (7883 ms) [550/694] SubframeDownloadFlagsBrowserTest.Download/52 (8395 ms) [551/694] SubframeDownloadFlagsBrowserTest.Download/61 (8426 ms) [552/694] SubframeDownloadFlagsBrowserTest.Download/63 (8410 ms) [553/694] SubframeDownloadFlagsBrowserTest.Download/84 (7622 ms) [554/694] SubframeDownloadFlagsBrowserTest.Download/93 (7610 ms) [555/694] DeviceManagementServiceIntegrationTestInstance/DeviceManagementServiceIntegrationTest.ApiAuthCodeFetch/1 (7350 ms) [556/694] SSLPolicyTestCommittedInterstitials.SafeBrowsingExtendedReportingOptInAllowed/1 (7900 ms) [557/694] ConnectionHelpTabHelperTest.CorrectlyExpandsCertErrorSection/0 (7881 ms) [558/694] SecurityStateTabHelperTest.DefaultSecurityLevelOnBlobUrl/1 (7346 ms) [559/694] SSLUITest.TestHTTPWithBrokenHTTPSResource/0 (8161 ms) [560/694] SSLUITest.TestHTTPWithBrokenHTTPSResource/1 (8170 ms) [561/694] SSLUITest.TestBrokenHTTPSMetricsReporting_Proceed/0 (7872 ms) [562/694] SSLUITest.GoBackToMixedContent/0 (8659 ms) [563/694] SSLUITest.MarkAboutAsNonSecure/0 (6829 ms) [564/694] SSLUITest.TestBrowserUseClientCertStore/0 (6821 ms) [565/694] SSLUITest.TestClientAuthContinueWithoutCert/0 (7608 ms) [566/694] SSLUITest.TestCertDBChangedFlushesClientAuthCache/0 (8441 ms) [567/694] SSLUITest.TestDisplaysCachedInsecureContent/0 (7363 ms) [568/694] SSLUITest.SSLStatusMatchesOnInterstitialAndAfterProceed/1 (8146 ms) [569/694] SSLUITest.SameDocumentNavigationDuringLoadSSLState/0 (7088 ms) [570/694] SSLUITestIgnoreLocalhostCertErrors.NoCrashOnLoadWithNoNavigationEntry/0 (7362 ms) [571/694] SSLUITest.OSReportsCaptivePortal/0 (11028 ms) [572/694] SSLUITestWithExtendedReporting.TestBrokenHTTPSProceedShowNoCheckYesReportNo/0 (6048 ms) [573/694] SSLUITestWithExtendedReporting.TestBrokenHTTPSGoBackReporting/1 (6826 ms) [574/694] CommonNameMismatchBrowserTest.NoCrashIfBothSubdomainsHaveCommonNameErrors/1 (7101 ms) [575/694] CommonNameMismatchBrowserTest.InterstitialStopNavigationWhileLoading/1 (6833 ms) [576/694] SSLUIMITMSoftwareEnabledTest.CertificateCommonNameMatchOnly_NoMITMSoftwareInterstitial/1 (7351 ms) [577/694] SSLUICaptivePortalListResourceBundleTest.Enabled_DynamicUpdate/1 (8393 ms) [578/694] HostedAppTest.ShouldShowToolbarMixedContent/0 (9447 ms) [579/694] HostedAppTest.WebContentsPrefsReparentWebContents/6 (10234 ms) [580/694] DefaultIsolation/TaskManagerOOPIFBrowserTest.SubframeHistoryNavigation/0 (12866 ms) [581/694] HostedAppPWAOnlyTest.InstallToShelfContainsAppName/0 (7358 ms) [582/694] HostedAppTest.CreatedForInstalledPwaForNonPwas/4 (8138 ms) [583/694] RecurrentInterstitialBrowserTest.RecurrentInterstitial/1 (21257 ms) [584/694] HostedAppPWAOnlyTest.PopOutDisabledInIncognito/0 (8662 ms) [585/694] HostedAppPWAOnlyTest.IFrameDynamicMixedConten