This will allow mojo-service-backed APIs to write the mocks for their layout tests alongside the test code instead of in C++ controlled by internals or test runner interfaces.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3f06742ebe125991b2c893638063cf8df55d8a86 commit 3f06742ebe125991b2c893638063cf8df55d8a86 Author: sammc <sammc@chromium.org> Date: Thu Mar 24 01:44:15 2016 Make the process-wide ServiceRegistry available to JS. BUG= 597465 Review URL: https://codereview.chromium.org/1827473002 Cr-Commit-Position: refs/heads/master@{#383008} [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/chrome/browser/resources/engagement/site_engagement.js [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/chrome/browser/resources/omnibox/omnibox.js [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/chrome/browser/resources/plugins.js [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/content/renderer/mojo/service_registry_js_wrapper.cc [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/content/renderer/mojo/service_registry_js_wrapper.h [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/content/renderer/render_frame_impl.cc [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/content/test/data/web_ui_mojo.js [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/content/test/data/web_ui_mojo_shell_test.js [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/extensions/renderer/api_test_base.cc [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/extensions/renderer/resources/keep_alive.js [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/extensions/renderer/resources/media_router_bindings.js [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/extensions/renderer/resources/mime_handler_private_custom_bindings.js [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/extensions/renderer/resources/serial_service.js [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/extensions/renderer/resources/stash_client.js [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/extensions/test/data/api_test_base_unittest.js [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/extensions/test/data/data_sender_unittest.js [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/third_party/WebKit/LayoutTests/harness-tests/mojo-helpers.html [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/third_party/WebKit/LayoutTests/resources/mojo-helpers.js [modify] https://crrev.com/3f06742ebe125991b2c893638063cf8df55d8a86/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/33515e2d141a9e16e2430136a80369f3376292b4 commit 33515e2d141a9e16e2430136a80369f3376292b4 Author: sammc <sammc@chromium.org> Date: Wed Mar 30 20:41:54 2016 Change the battery-status layout tests to use JS mocks. BUG= 597465 ,593607 Review URL: https://codereview.chromium.org/1836203002 Cr-Commit-Position: refs/heads/master@{#384082} [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/content/renderer/renderer_blink_platform_impl.cc [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/content/shell/renderer/layout_test/blink_test_runner.cc [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/api-defined-expected.txt [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/api-defined.html [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/multiple-promises-after-resolve-expected.txt [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/multiple-promises-after-resolve.html [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/multiple-promises-expected.txt [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/multiple-promises.html [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/multiple-windows-expected.txt [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/multiple-windows-page-visibility-expected.txt [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/multiple-windows-page-visibility.html [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/multiple-windows.html [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/no-gc-with-eventlisteners-expected.txt [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/no-gc-with-eventlisteners.html [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/page-visibility-expected.txt [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/page-visibility.html [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/promise-with-eventlisteners-expected.txt [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/promise-with-eventlisteners.html [add] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/resources/mock-battery-monitor.js [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/battery-status/restricted-level-precision.html [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/LayoutTests/resources/mojo-helpers.js [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/Source/modules/battery/BatteryDispatcher.h [delete] https://crrev.com/1f6dc1b24dfb56e0199b851f1c121195e33f2bd6/third_party/WebKit/Source/modules/battery/testing/InternalsBattery.cpp [delete] https://crrev.com/1f6dc1b24dfb56e0199b851f1c121195e33f2bd6/third_party/WebKit/Source/modules/battery/testing/InternalsBattery.h [delete] https://crrev.com/1f6dc1b24dfb56e0199b851f1c121195e33f2bd6/third_party/WebKit/Source/modules/battery/testing/InternalsBattery.idl [modify] https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4/third_party/WebKit/Source/modules/modules.gypi
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/88f961ed0a8796a52bf9783b18ae116c8e324876 commit 88f961ed0a8796a52bf9783b18ae116c8e324876 Author: lukasza <lukasza@chromium.org> Date: Thu Mar 31 00:03:18 2016 Revert of Change the battery-status layout tests to use JS mocks. (patchset #4 id:80001 of https://codereview.chromium.org/1836203002/ ) Reason for revert: This CL caused 100 layout tests to crash when run with --site-per-process - see https://crbug.com/599297 Original issue's description: > Change the battery-status layout tests to use JS mocks. > > BUG= 597465 ,593607 > > Committed: https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4 > Cr-Commit-Position: refs/heads/master@{#384082} TBR=yukishiino@chromium.org,timvolodine@chromium.org,jam@chromium.org,sammc@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 597465 ,593607 Review URL: https://codereview.chromium.org/1844033004 Cr-Commit-Position: refs/heads/master@{#384147} [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/content/renderer/renderer_blink_platform_impl.cc [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/content/shell/renderer/layout_test/blink_test_runner.cc [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/api-defined-expected.txt [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/api-defined.html [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/multiple-promises-after-resolve-expected.txt [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/multiple-promises-after-resolve.html [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/multiple-promises-expected.txt [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/multiple-promises.html [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/multiple-windows-expected.txt [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/multiple-windows-page-visibility-expected.txt [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/multiple-windows-page-visibility.html [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/multiple-windows.html [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/no-gc-with-eventlisteners-expected.txt [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/no-gc-with-eventlisteners.html [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/page-visibility-expected.txt [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/page-visibility.html [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/promise-with-eventlisteners-expected.txt [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/promise-with-eventlisteners.html [delete] https://crrev.com/672a4cf2d22d8d5d2130687e7465dbce822a3425/third_party/WebKit/LayoutTests/battery-status/resources/mock-battery-monitor.js [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/battery-status/restricted-level-precision.html [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/LayoutTests/resources/mojo-helpers.js [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/Source/modules/battery/BatteryDispatcher.h [add] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/Source/modules/battery/testing/InternalsBattery.cpp [add] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/Source/modules/battery/testing/InternalsBattery.h [add] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/Source/modules/battery/testing/InternalsBattery.idl [modify] https://crrev.com/88f961ed0a8796a52bf9783b18ae116c8e324876/third_party/WebKit/Source/modules/modules.gypi
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/77d2ac27f7ea8f6e54de319baee30754a26e5ac1 commit 77d2ac27f7ea8f6e54de319baee30754a26e5ac1 Author: sammc <sammc@chromium.org> Date: Thu Mar 31 07:12:00 2016 Change the battery-status layout tests to use JS mocks. BUG= 597465 ,593607 Committed: https://crrev.com/33515e2d141a9e16e2430136a80369f3376292b4 Cr-Commit-Position: refs/heads/master@{#384082} Review URL: https://codereview.chromium.org/1836203002 Cr-Commit-Position: refs/heads/master@{#384207} [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/content/renderer/renderer_blink_platform_impl.cc [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/api-defined-expected.txt [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/api-defined.html [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/multiple-promises-after-resolve-expected.txt [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/multiple-promises-after-resolve.html [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/multiple-promises-expected.txt [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/multiple-promises.html [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/multiple-windows-expected.txt [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/multiple-windows-page-visibility-expected.txt [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/multiple-windows-page-visibility.html [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/multiple-windows.html [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/no-gc-with-eventlisteners-expected.txt [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/no-gc-with-eventlisteners.html [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/page-visibility-expected.txt [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/page-visibility.html [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/promise-with-eventlisteners-expected.txt [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/promise-with-eventlisteners.html [add] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/resources/mock-battery-monitor.js [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/battery-status/restricted-level-precision.html [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/LayoutTests/resources/mojo-helpers.js [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/Source/modules/battery/BatteryDispatcher.h [delete] https://crrev.com/76ff0ce0d70c76a955d4d3a94cac1bcbb585d1cf/third_party/WebKit/Source/modules/battery/testing/InternalsBattery.cpp [delete] https://crrev.com/76ff0ce0d70c76a955d4d3a94cac1bcbb585d1cf/third_party/WebKit/Source/modules/battery/testing/InternalsBattery.h [delete] https://crrev.com/76ff0ce0d70c76a955d4d3a94cac1bcbb585d1cf/third_party/WebKit/Source/modules/battery/testing/InternalsBattery.idl [modify] https://crrev.com/77d2ac27f7ea8f6e54de319baee30754a26e5ac1/third_party/WebKit/Source/modules/modules.gypi
Comment 1 by bugdroid1@chromium.org
, Mar 24 2016