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

Side by Side Diff: components/test_runner/test_interfaces.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 unified diff | Download patch
« no previous file with comments | « no previous file | components/test_runner/test_runner.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/test_runner/test_interfaces.h" 5 #include "components/test_runner/test_interfaces.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 if (path_start != std::string::npos) 87 if (path_start != std::string::npos)
88 spec = spec.substr(path_start); 88 spec = spec.substr(path_start);
89 test_runner_->setShouldGeneratePixelResults(generate_pixels); 89 test_runner_->setShouldGeneratePixelResults(generate_pixels);
90 if (spec.find("loading/") != std::string::npos) 90 if (spec.find("loading/") != std::string::npos)
91 test_runner_->setShouldDumpFrameLoadCallbacks(true); 91 test_runner_->setShouldDumpFrameLoadCallbacks(true);
92 if (spec.find("/dumpAsText/") != std::string::npos) { 92 if (spec.find("/dumpAsText/") != std::string::npos) {
93 test_runner_->setShouldDumpAsText(true); 93 test_runner_->setShouldDumpAsText(true);
94 test_runner_->setShouldGeneratePixelResults(false); 94 test_runner_->setShouldGeneratePixelResults(false);
95 } 95 }
96 if (spec.find("/inspector/") != std::string::npos || 96 if (spec.find("/inspector/") != std::string::npos ||
97 spec.find("/inspector-enabled/") != std::string::npos) 97 spec.find("/inspector-enabled/") != std::string::npos) {
98 test_runner_->ClearDevToolsLocalStorage(); 98 test_runner_->ClearDevToolsLocalStorage();
99 test_runner_->SetV8CacheDisabled(true);
100 } else {
101 test_runner_->SetV8CacheDisabled(false);
102 }
99 if (spec.find("/inspector/") != std::string::npos && 103 if (spec.find("/inspector/") != std::string::npos &&
100 spec.find("unit_test_runner.html") == std::string::npos) { 104 spec.find("unit_test_runner.html") == std::string::npos) {
101 // Subfolder name determines default panel to open. 105 // Subfolder name determines default panel to open.
102 std::string test_path = spec.substr(spec.find("/inspector/") + 11); 106 std::string test_path = spec.substr(spec.find("/inspector/") + 11);
103 base::DictionaryValue settings; 107 base::DictionaryValue settings;
104 settings.SetString("testPath", base::GetQuotedJSONString(spec)); 108 settings.SetString("testPath", base::GetQuotedJSONString(spec));
105 std::string settings_string; 109 std::string settings_string;
106 base::JSONWriter::Write(settings, &settings_string); 110 base::JSONWriter::Write(settings, &settings_string);
107 test_runner_->ShowDevTools(settings_string, std::string()); 111 test_runner_->ShowDevTools(settings_string, std::string());
108 } 112 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 152
149 blink::WebThemeEngine* TestInterfaces::GetThemeEngine() { 153 blink::WebThemeEngine* TestInterfaces::GetThemeEngine() {
150 if (!test_runner_->UseMockTheme()) 154 if (!test_runner_->UseMockTheme())
151 return 0; 155 return 0;
152 if (!theme_engine_.get()) 156 if (!theme_engine_.get())
153 theme_engine_.reset(new MockWebThemeEngine()); 157 theme_engine_.reset(new MockWebThemeEngine());
154 return theme_engine_.get(); 158 return theme_engine_.get();
155 } 159 }
156 160
157 } // namespace test_runner 161 } // namespace test_runner
OLDNEW
« no previous file with comments | « no previous file | components/test_runner/test_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698