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

Unified Diff: chrome/common/extensions/docs/examples/extensions/benchmark/background.html

Issue 2819037: Show a warning message if the cache might not be cleared between runs. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 6 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
« no previous file with comments | « no previous file | chrome/renderer/renderer_glue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/examples/extensions/benchmark/background.html
diff --git a/chrome/common/extensions/docs/examples/extensions/benchmark/background.html b/chrome/common/extensions/docs/examples/extensions/benchmark/background.html
index d7af961e0d16437c4b7b36cb8736d1a8d178a6ca..c560e11c9b642d930288d14b7ade04673dd98fc8 100644
--- a/chrome/common/extensions/docs/examples/extensions/benchmark/background.html
+++ b/chrome/common/extensions/docs/examples/extensions/benchmark/background.html
@@ -322,6 +322,20 @@ chrome.extension.onConnect.addListener(function(port) {
});
function run() {
+ if (window.clearCache) {
+ // Show a warning if we will try to clear the cache between runs
+ // but will also be reusing the same WebKit instance (i.e. Chrome
+ // is in single-process mode, or 'Use New Tabs' is turned off)
+ // because the WebKit cache might not get completely cleared between runs.
+ if (chrome.benchmarking.isSingleProcess()) {
+ alert("Warning: the WebKit cache may not be cleared correctly " +
+ "between runs because Chrome is running in single-process mode.");
+ } else if (!window.useNewTabs) {
+ alert("Warning: the WebKit cache may not be cleared correctly " +
+ "between runs because 'Use New Tabs Per Page' is turned off.");
+ }
+ }
+
var urls = testUrl.split(",");
for (var i = 0; i < urls.length; i++) {
var benchmark = new Benchmark();
« no previous file with comments | « no previous file | chrome/renderer/renderer_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698