Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: third_party/WebKit/LayoutTests/resources/mojo-helpers.js

Issue 2643063002: Refactor Blink's ServiceConnector and add ability to mock in layout tests (Closed)
Patch Set: fix compile Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/resources/mojo-helpers.js
diff --git a/third_party/WebKit/LayoutTests/resources/mojo-helpers.js b/third_party/WebKit/LayoutTests/resources/mojo-helpers.js
index 92ddd8d5ae3e7c07dbd8dcf2bdcbf9ab341a1a46..95c1c60fcdc871b7a115df67d486aaaeb65840e7 100644
--- a/third_party/WebKit/LayoutTests/resources/mojo-helpers.js
+++ b/third_party/WebKit/LayoutTests/resources/mojo-helpers.js
@@ -27,34 +27,40 @@ let define = (function(){
}
})();
-define('Mojo Helpers', [
- 'mojo/public/js/core',
- 'mojo/public/js/router',
- 'mojo/public/js/support',
- 'content/public/renderer/frame_interfaces',
- 'content/public/renderer/interfaces',
- 'content/shell/renderer/layout_test/frame_interface_registry',
- 'content/shell/renderer/layout_test/interface_registry',
-], (core, router, support, frameInterfaces, interfaces, frameInterfaceRegistry,
- interfaceRegistry) => {
- let tearDown = () => {
- frameInterfaces.clearInterfaceOverridesForTesting();
- interfaces.clearInterfaceOverridesForTesting();
- };
- addEventListener('unload', tearDown);
- if (window.add_completion_callback)
- add_completion_callback(tearDown);
+define(
+ 'Mojo Helpers',
+ [
+ 'mojo/public/js/core',
+ 'mojo/public/js/router',
+ 'mojo/public/js/support',
+ 'content/public/renderer/connector',
+ 'content/public/renderer/frame_interfaces',
+ 'content/public/renderer/interfaces',
+ 'content/shell/renderer/layout_test/frame_interface_registry',
+ 'content/shell/renderer/layout_test/interface_registry',
+ ],
+ (core, router, support, connector, frameInterfaces, interfaces,
+ frameInterfaceRegistry, interfaceRegistry) => {
+ let tearDown = () => {
+ connector.clearInterfaceOverridesForTesting();
dcheng 2017/03/21 18:56:18 Do we have any documentation about the differences
Ken Rockot(use gerrit already) 2017/03/23 04:56:04 No, they're all different ways for the client (bli
+ frameInterfaces.clearInterfaceOverridesForTesting();
+ interfaces.clearInterfaceOverridesForTesting();
+ };
+ addEventListener('unload', tearDown);
+ if (window.add_completion_callback)
+ add_completion_callback(tearDown);
- return {
- core,
- router,
- support,
- frameInterfaces,
- frameInterfaceRegistry,
- interfaces,
- interfaceRegistry,
- };
-});
+ return {
+ core,
+ router,
+ support,
+ connector,
+ frameInterfaces,
+ frameInterfaceRegistry,
+ interfaces,
+ interfaceRegistry,
+ };
+ });
// Returns a promise to an object that exposes common Mojo module interfaces.
// Additional modules to load can be specified in the |modules| parameter. The

Powered by Google App Engine
This is Rietveld 408576698