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

Unified Diff: chrome/test/data/extensions/platform_apps/web_view/common/cleardata_twice/guest.html

Issue 2033993002: Don't call WebCacheManager::Remove(RPH_id) to clear webview's cache. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/common/cleardata_twice/guest.html
diff --git a/chrome/test/data/extensions/platform_apps/web_view/common/cleardata_twice/guest.html b/chrome/test/data/extensions/platform_apps/web_view/common/cleardata_twice/guest.html
new file mode 100644
index 0000000000000000000000000000000000000000..30d2c3278622f1cdab1b49a06361db502d55fa80
--- /dev/null
+++ b/chrome/test/data/extensions/platform_apps/web_view/common/cleardata_twice/guest.html
@@ -0,0 +1,41 @@
+<!doctype html>
+<!--
+ * Copyright 2016 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.
+-->
+<html>
+ <head>
+ <script type="text/javascript">
+ // A guest that stores and deletes cookies.
+ // Note that the embedder has to initiate a postMessage first so that
+ // the guest has a reference to the embedder's window.
+
+ // The window reference of the embedder to send post message reply.
+ var embedderWindowChannel = null;
+
+ // A value that uniquely identifies the guest sending the messages to the
+ // embedder.
+ var channelId = 0;
+ var notifyEmbedder = function(msg_array) {
+ var msg = msg_array.concat([channelId]);
+ embedderWindowChannel.postMessage(JSON.stringify(msg), '*');
+ };
+
+ var onPostMessageReceived = function(e) {
+ embedderWindowChannel = e.source;
+ var data = JSON.parse(e.data);
+ if (data[0] == 'create-channel') {
+ window.console.log('guest: create-channel');
+ channelId = data[1];
+ notifyEmbedder(['channel-created']);
+ return;
+ }
+ };
+ window.addEventListener('message', onPostMessageReceived, false);
+ </script>
+ </head>
+ <body>
+ <div>Simple guest page.</div>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698