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

Unified Diff: content/test/data/web_ui_mojo.js

Issue 834153003: Remove usage of [Client=..] from web_ui_mojo test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « content/browser/webui/web_ui_mojo_browsertest.cc ('k') | content/test/data/web_ui_test_mojo_bindings.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/web_ui_mojo.js
diff --git a/content/test/data/web_ui_mojo.js b/content/test/data/web_ui_mojo.js
index 643b35d5b8ed8d6a941f3a58a2f30f04cfc7af49..38b01940c45e7568339293ccc46bee8b37bfc998 100644
--- a/content/test/data/web_ui_mojo.js
+++ b/content/test/data/web_ui_mojo.js
@@ -7,27 +7,16 @@ define('main', [
'content/test/data/web_ui_test_mojo_bindings.mojom',
'content/public/renderer/service_provider',
], function (connection, bindings, serviceProvider) {
- var retainedConnection;
-
- function RendererTargetTest(bindings) {
- this.bindings_ = bindings;
- }
-
- // TODO(aa): It is a bummer to need this stub object in JavaScript. We should
- // have a 'client' object that contains both the sending and receiving bits of
- // the client side of the interface. Since JS is loosely typed, we do not need
- // a separate base class to inherit from to receive callbacks.
- RendererTargetTest.prototype =
- Object.create(bindings.RendererTarget.stubClass.prototype);
-
- RendererTargetTest.prototype.ping = function () {
- this.bindings_.pingResponse();
- };
+ var browserTarget;
return function() {
- retainedConnection = new connection.Connection(
+ browserTarget = connection.bindProxyHandle(
serviceProvider.connectToService(bindings.BrowserTarget.name),
- RendererTargetTest,
- bindings.BrowserTarget.proxyClass);
+ undefined,
+ bindings.BrowserTarget);
+
+ browserTarget.start().then(function() {
+ browserTarget.stop();
+ });
};
});
« no previous file with comments | « content/browser/webui/web_ui_mojo_browsertest.cc ('k') | content/test/data/web_ui_test_mojo_bindings.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698