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

Unified Diff: chrome/test/data/extensions/platform_apps/web_view/shim/inject_webstore_nav_test.js

Issue 140073002: <webview>: navigating to WebStore should fire a loadabort instead of crashing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test Created 6 years, 11 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
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..2525107e946f0093dd9e5f47ba4aeff5d7bfa98e
--- /dev/null
+++ b/chrome/test/data/extensions/platform_apps/web_view/shim/inject_webstore_nav_test.js
@@ -0,0 +1,18 @@
+// 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': {
lazyboy 2014/01/16 22:31:24 nit: here and in other places, remove { .. } after
Fady Samuel 2014/01/16 23:40:27 Done.
+ window.location.href = data[1];
+ return true;
+ }
+ case 'isalive': {
+ var msg = ['alive'];
+ embedder.channel.postMessage(JSON.stringify(msg), '*');
+ }
+ default:
+ return false;
+ }
+};

Powered by Google App Engine
This is Rietveld 408576698