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

Unified Diff: ppapi/native_client/tools/browser_tester/browserdata/nacltest.js

Issue 10918152: Port nacl_integration exit_status test to browser_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment fixes Created 8 years, 3 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 | « ppapi/native_client/tests/nacl_browser/exit_status/pm_exit_status_test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/native_client/tools/browser_tester/browserdata/nacltest.js
diff --git a/ppapi/native_client/tools/browser_tester/browserdata/nacltest.js b/ppapi/native_client/tools/browser_tester/browserdata/nacltest.js
index 7dc9083b882e16640e47d354ee16d8faae3ef775..d71ebb7ee081725608cf05f4047b3b542509ed61 100644
--- a/ppapi/native_client/tools/browser_tester/browserdata/nacltest.js
+++ b/ppapi/native_client/tools/browser_tester/browserdata/nacltest.js
@@ -117,7 +117,15 @@ function RPCWrapper() {
// Performs a URL-encoded RPC call, given a function name and a dictionary
// (actually just an object - it's a JS idiom) of parameters.
function rpcCall(name, params) {
- if (this_.rpc_available) {
+ if (window.domAutomationController !== undefined) {
+ // Running as a Chrome browser_test.
+ var msg = {type: name};
+ for (var pname in params) {
+ msg[pname] = params[pname];
+ }
+ domAutomationController.setAutomationId(0);
+ domAutomationController.send(JSON.stringify(msg));
+ } else if (this_.rpc_available) {
// Construct the URL for the RPC request.
var args = [];
for (var pname in params) {
« no previous file with comments | « ppapi/native_client/tests/nacl_browser/exit_status/pm_exit_status_test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698