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

Unified Diff: chrome/test/data/extensions/platform_apps/web_view/common/cleardata_twice/bootstrap.js

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/bootstrap.js
diff --git a/chrome/test/data/extensions/platform_apps/web_view/common/cleardata_twice/bootstrap.js b/chrome/test/data/extensions/platform_apps/web_view/common/cleardata_twice/bootstrap.js
new file mode 100644
index 0000000000000000000000000000000000000000..289c052a3438c43fb6ef4be4fe16e266bee4f46c
--- /dev/null
+++ b/chrome/test/data/extensions/platform_apps/web_view/common/cleardata_twice/bootstrap.js
@@ -0,0 +1,43 @@
+// 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.
+
+config.IS_CHROME_TEST = true;
+// Guest served from TestServer.
+config.IS_JS_ONLY_GUEST = false;
+config.TEST_DIR = 'cleardata_twice';
+
+var clearDataTwiceTests = {};
+
+var run = function() {
+ var container = document.createElement('div');
+ container.id = 'webview-tag-container';
+ document.body.appendChild(container);
+
+ chrome.test.getConfig(function(chromeConfig) {
+ window.console.log('getConfig: ' + chromeConfig);
+ utils.setUp(chromeConfig, config);
+ embedder.loadGuest(function() {
+ chrome.test.runTests([
+ clearDataTwiceTests.clear
+ ]);
+ }, function(data) {
+ // We don't expect guest to send us any postMessage.
+ chrome.test.fail();
+ });
+ });
+};
+
+// Tests.
+// Clears http cache of a webview twice.
+clearDataTwiceTests.clear = function testClearDataTwice() {
+ console.log('clearDataTwiceTests.clear');
+ embedder.webview.clearData({}, {cache: true}, function() {
+ embedder.webview.clearData({}, {cache: true}, function() {
+ chrome.test.succeed();
+ });
+ });
+};
+
+// Run test(s).
+run();

Powered by Google App Engine
This is Rietveld 408576698