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

Unified Diff: components/test_runner/test_runner.cc

Issue 2586943004: DevTools: disable compilation cache for inspector tests to reduce flakiness. (Closed)
Patch Set: Created 4 years 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 | « components/test_runner/test_runner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/test_runner.cc
diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
index e24c5b030855d78fd5bbd7356859d2c72d2c119a..dbbc994badcd66599e81ea9ba17dffc2a3aa1550 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -1626,6 +1626,8 @@ void TestRunner::SetDelegate(WebTestDelegate* delegate) {
void TestRunner::SetMainView(WebView* web_view) {
main_view_ = web_view;
+ if (disable_v8_cache_)
+ SetV8CacheDisabled(true);
}
void TestRunner::Reset() {
@@ -1965,6 +1967,16 @@ void TestRunner::ClearDevToolsLocalStorage() {
delegate_->ClearDevToolsLocalStorage();
}
+void TestRunner::SetV8CacheDisabled(bool disabled) {
+ if (!main_view_) {
+ disable_v8_cache_ = disabled;
+ return;
+ }
+ main_view_->settings()->setV8CacheOptions(disabled ?
+ blink::WebSettings::V8CacheOptionsNone :
+ blink::WebSettings::V8CacheOptionsDefault);
+}
+
void TestRunner::ShowDevTools(const std::string& settings,
const std::string& frontend_url) {
delegate_->ShowDevTools(settings, frontend_url);
« no previous file with comments | « components/test_runner/test_runner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698