Index: chrome/test/data/extensions/platform_apps/web_view/shim/inject_webstore_nav_test.js |
diff --git a/chrome/test/data/extensions/platform_apps/web_view/shim/inject_webstore_nav_test.js b/chrome/test/data/extensions/platform_apps/web_view/shim/inject_webstore_nav_test.js |
new file mode 100755 |
index 0000000000000000000000000000000000000000..691d8ecf5b2279819cde750ad5b7db4b314ab7b2 |
--- /dev/null |
+++ b/chrome/test/data/extensions/platform_apps/web_view/shim/inject_webstore_nav_test.js |
@@ -0,0 +1,16 @@ |
+// Copyright 2014 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. |
+ |
+embedder.processMessage = function(data) { |
+ switch (data[0]) { |
+ case 'navigate': |
+ window.location.href = data[1]; |
+ return true; |
+ case 'isalive': |
+ var msg = ['alive']; |
+ embedder.channel.postMessage(JSON.stringify(msg), '*'); |
+ default: |
+ return false; |
+ } |
+}; |