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

Unified Diff: native_client_sdk/src/examples/tutorial/testing/example.js

Issue 414993002: [NaCl SDK] nacl_io: Remove duplication between passthroughfs and devfs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | native_client_sdk/src/examples/tutorial/testing/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/examples/tutorial/testing/example.js
diff --git a/native_client_sdk/src/examples/tutorial/testing/example.js b/native_client_sdk/src/examples/tutorial/testing/example.js
index 627c5ca4fa4f457bdf6c33cee27ce98eaa9c66e3..b51b98856385c8efb53109dbdc3cd8b2b5704926 100644
--- a/native_client_sdk/src/examples/tutorial/testing/example.js
+++ b/native_client_sdk/src/examples/tutorial/testing/example.js
@@ -45,9 +45,14 @@ function handleMessage(event) {
var msg = event.data;
var firstColon = msg.indexOf(':');
var cmd = msg.substr(0, firstColon);
+
+ if (cmd == 'testend') {
+ event.srcElement.postMessage({'testend' : ''});
+ return;
+ }
+
var cmdFunctionName = cmd + 'Command';
var cmdFunction = window[cmdFunctionName];
-
if (typeof(cmdFunction) !== 'function') {
console.log('Unknown command: ' + cmd);
console.log(' message: ' + msg);
« no previous file with comments | « no previous file | native_client_sdk/src/examples/tutorial/testing/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698