OLD | NEW |
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 "content/shell/test_runner/test_interfaces.h" | 5 #include "content/shell/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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 test_runner_->setShouldGeneratePixelResults(false); | 101 test_runner_->setShouldGeneratePixelResults(false); |
102 } | 102 } |
103 if (spec.find("/inspector/") != std::string::npos || | 103 if (spec.find("/inspector/") != std::string::npos || |
104 spec.find("/inspector-enabled/") != std::string::npos) { | 104 spec.find("/inspector-enabled/") != std::string::npos) { |
105 test_runner_->ClearDevToolsLocalStorage(); | 105 test_runner_->ClearDevToolsLocalStorage(); |
106 test_runner_->SetV8CacheDisabled(true); | 106 test_runner_->SetV8CacheDisabled(true); |
107 } else { | 107 } else { |
108 test_runner_->SetV8CacheDisabled(false); | 108 test_runner_->SetV8CacheDisabled(false); |
109 } | 109 } |
110 if (spec.find("/inspector/") != std::string::npos && | 110 if (spec.find("/inspector/") != std::string::npos && |
| 111 spec.find("integration_test_runner.html") == std::string::npos && |
111 spec.find("unit_test_runner.html") == std::string::npos) { | 112 spec.find("unit_test_runner.html") == std::string::npos) { |
112 // Subfolder name determines default panel to open. | 113 // Subfolder name determines default panel to open. |
113 std::string test_path = spec.substr(spec.find("/inspector/") + 11); | 114 std::string test_path = spec.substr(spec.find("/inspector/") + 11); |
114 base::DictionaryValue settings; | 115 base::DictionaryValue settings; |
115 settings.SetString("testPath", base::GetQuotedJSONString(spec)); | 116 settings.SetString("testPath", base::GetQuotedJSONString(spec)); |
116 std::string settings_string; | 117 std::string settings_string; |
117 base::JSONWriter::Write(settings, &settings_string); | 118 base::JSONWriter::Write(settings, &settings_string); |
118 test_runner_->ShowDevTools(settings_string, std::string()); | 119 test_runner_->ShowDevTools(settings_string, std::string()); |
119 } | 120 } |
120 if (spec.find("/viewsource/") != std::string::npos) { | 121 if (spec.find("/viewsource/") != std::string::npos) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 161 |
161 blink::WebThemeEngine* TestInterfaces::GetThemeEngine() { | 162 blink::WebThemeEngine* TestInterfaces::GetThemeEngine() { |
162 if (!test_runner_->UseMockTheme()) | 163 if (!test_runner_->UseMockTheme()) |
163 return 0; | 164 return 0; |
164 if (!theme_engine_.get()) | 165 if (!theme_engine_.get()) |
165 theme_engine_.reset(new MockWebThemeEngine()); | 166 theme_engine_.reset(new MockWebThemeEngine()); |
166 return theme_engine_.get(); | 167 return theme_engine_.get(); |
167 } | 168 } |
168 | 169 |
169 } // namespace test_runner | 170 } // namespace test_runner |
OLD | NEW |