summaryrefslogtreecommitdiffstats
path: root/native_client_sdk/src/examples
diff options
context:
space:
mode:
authorsbc@chromium.org <sbc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-24 21:43:12 +0000
committersbc@chromium.org <sbc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-24 21:43:12 +0000
commit98ffd9fd0303b3c4ff47439f607a491b2aceac07 (patch)
treec7b54da0c32306f5ec2199c6d5f8ae04eb3c9fd0 /native_client_sdk/src/examples
parent114571b355d34bc8459f10775255032c2b86105e (diff)
downloadchromium_src-98ffd9fd0303b3c4ff47439f607a491b2aceac07.zip
chromium_src-98ffd9fd0303b3c4ff47439f607a491b2aceac07.tar.gz
chromium_src-98ffd9fd0303b3c4ff47439f607a491b2aceac07.tar.bz2
[NaCl SDK] nacl_io: Remove duplication between passthroughfs and devfs.
They both had implementations of RealNode. Also update examples/tutorial/testing so that it shuts down the NaCl module correctly. TEST=trybots R=binji@chromium.org Review URL: https://codereview.chromium.org/414993002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@285382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk/src/examples')
-rw-r--r--native_client_sdk/src/examples/tutorial/testing/example.js7
-rw-r--r--native_client_sdk/src/examples/tutorial/testing/index.html2
2 files changed, 7 insertions, 2 deletions
diff --git a/native_client_sdk/src/examples/tutorial/testing/example.js b/native_client_sdk/src/examples/tutorial/testing/example.js
index 627c5ca..b51b988 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);
diff --git a/native_client_sdk/src/examples/tutorial/testing/index.html b/native_client_sdk/src/examples/tutorial/testing/index.html
index 4fd2383..37fcdd8 100644
--- a/native_client_sdk/src/examples/tutorial/testing/index.html
+++ b/native_client_sdk/src/examples/tutorial/testing/index.html
@@ -17,7 +17,7 @@
.failed { background-color: #f00; }
</style>
</head>
-<body {{attrs}}>
+<body data-attrs="PS_EXIT_MESSAGE=testend" {{attrs}}>
<h1>{{title}}</h1>
<div id="listener"></div>
<h2>Status: <code id="statusField">NO-STATUS</code></h2>