Index: tools/cc-frame-viewer/third_party/py-chrome-app/unittest_data/app-that-sends-event/index.js |
diff --git a/tools/cc-frame-viewer/third_party/py-chrome-app/unittest_data/app-that-sends-event/index.js b/tools/cc-frame-viewer/third_party/py-chrome-app/unittest_data/app-that-sends-event/index.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7caf3149a9b683be2a41dde5ffab55b5f44a4b2e |
--- /dev/null |
+++ b/tools/cc-frame-viewer/third_party/py-chrome-app/unittest_data/app-that-sends-event/index.js |
@@ -0,0 +1,19 @@ |
+/* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+ * Use of this source code is governed by a BSD-style license that can be |
+ * found in the LICENSE file. |
+ */ |
+chromeapp.sendEvent( |
+ 'hello-world', |
+ [[1, 2, 3], true], |
+ function(result) { |
+ if (result.length != 2) |
+ throw new Error('Expected array of size 2'); |
+ if (result[0] != 314) |
+ throw new Error('Expected result[0] to be 314'); |
+ if (result[1] != 'hi') |
+ throw new Error('Expected result[1] to be "hi"'); |
+ chromeapp.exit(0) |
+ }, |
+ function() { |
+ chromeapp.exit(1) |
+ }); |