OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <map> | 5 #include <map> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 } else { | 189 } else { |
190 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, | 190 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, |
191 tab->NavigateToURL(net::FilePathToFileURL(test_path))); | 191 tab->NavigateToURL(net::FilePathToFileURL(test_path))); |
192 } | 192 } |
193 | 193 |
194 // Block until initialization completes | 194 // Block until initialization completes |
195 // If the following assertion fails intermittently, it could be due to a | 195 // If the following assertion fails intermittently, it could be due to a |
196 // race condition caused by an html redirect. If that is the case, verify | 196 // race condition caused by an html redirect. If that is the case, verify |
197 // that flag kHasRedirect is enabled for the current test. | 197 // that flag kHasRedirect is enabled for the current test. |
198 ASSERT_TRUE(WaitUntilJavaScriptCondition( | 198 ASSERT_TRUE(WaitUntilJavaScriptCondition( |
199 tab, | 199 tab.get(), |
200 std::wstring(), | 200 std::wstring(), |
201 L"window.domAutomationController.send(__initialized);", | 201 L"window.domAutomationController.send(__initialized);", |
202 TestTimeouts::large_test_timeout())); | 202 TestTimeouts::large_test_timeout())); |
203 | 203 |
204 if (HasFlag(kForceGpuComposited)) { | 204 if (HasFlag(kForceGpuComposited)) { |
205 ASSERT_TRUE(tab->NavigateToURLAsync( | 205 ASSERT_TRUE(tab->NavigateToURLAsync( |
206 GURL("javascript:__make_body_composited();"))); | 206 GURL("javascript:__make_body_composited();"))); |
207 } | 207 } |
208 | 208 |
209 // Start the tests. | 209 // Start the tests. |
210 ASSERT_TRUE(tab->NavigateToURLAsync(GURL("javascript:__start_all();"))); | 210 ASSERT_TRUE(tab->NavigateToURLAsync(GURL("javascript:__start_all();"))); |
211 | 211 |
212 // Block until the tests completes. | 212 // Block until the tests completes. |
213 ASSERT_TRUE(WaitUntilJavaScriptCondition( | 213 ASSERT_TRUE(WaitUntilJavaScriptCondition( |
214 tab, | 214 tab.get(), |
215 std::wstring(), | 215 std::wstring(), |
216 L"window.domAutomationController.send(!__running_all);", | 216 L"window.domAutomationController.send(!__running_all);", |
217 TestTimeouts::large_test_timeout())); | 217 TestTimeouts::large_test_timeout())); |
218 | 218 |
219 // TODO(jbates): remove this check when ref builds are updated. | 219 // TODO(jbates): remove this check when ref builds are updated. |
220 if (!HasFlag(kUseReferenceBuild)) { | 220 if (!HasFlag(kUseReferenceBuild)) { |
221 std::string json_events; | 221 std::string json_events; |
222 ASSERT_TRUE(automation()->EndTracing(&json_events)); | 222 ASSERT_TRUE(automation()->EndTracing(&json_events)); |
223 | 223 |
224 bool did_run_on_gpu = DidRunOnGpu(json_events); | 224 bool did_run_on_gpu = DidRunOnGpu(json_events); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 kIsGpuCanvasTest | kInternal | kHasRedirect | kUseGpu | kDisableVsync, | 318 kIsGpuCanvasTest | kInternal | kHasRedirect | kUseGpu | kDisableVsync, |
319 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu, | 319 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu, |
320 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu | | 320 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu | |
321 kDisableVsync)); | 321 kDisableVsync)); |
322 | 322 |
323 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(fireflies) | 323 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(fireflies) |
324 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(FishIE) | 324 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(FishIE) |
325 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(speedreading) | 325 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(speedreading) |
326 | 326 |
327 } // namespace | 327 } // namespace |
OLD | NEW |