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/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 } else { | 183 } else { |
184 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, | 184 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, |
185 tab->NavigateToURL(net::FilePathToFileURL(test_path))); | 185 tab->NavigateToURL(net::FilePathToFileURL(test_path))); |
186 } | 186 } |
187 | 187 |
188 // Block until initialization completes | 188 // Block until initialization completes |
189 // If the following assertion fails intermittently, it could be due to a | 189 // If the following assertion fails intermittently, it could be due to a |
190 // race condition caused by an html redirect. If that is the case, verify | 190 // race condition caused by an html redirect. If that is the case, verify |
191 // that flag kHasRedirect is enabled for the current test. | 191 // that flag kHasRedirect is enabled for the current test. |
192 ASSERT_TRUE(WaitUntilJavaScriptCondition( | 192 ASSERT_TRUE(WaitUntilJavaScriptCondition( |
193 tab, L"", L"window.domAutomationController.send(__initialized);", | 193 tab.get(), L"", L"window.domAutomationController.send(__initialized);", |
194 TestTimeouts::large_test_timeout())); | 194 TestTimeouts::large_test_timeout())); |
195 | 195 |
196 if (HasFlag(kForceGpuComposited)) { | 196 if (HasFlag(kForceGpuComposited)) { |
197 ASSERT_TRUE(tab->NavigateToURLAsync( | 197 ASSERT_TRUE(tab->NavigateToURLAsync( |
198 GURL("javascript:__make_body_composited();"))); | 198 GURL("javascript:__make_body_composited();"))); |
199 } | 199 } |
200 | 200 |
201 // Start the tests. | 201 // Start the tests. |
202 ASSERT_TRUE(tab->NavigateToURLAsync(GURL("javascript:__start_all();"))); | 202 ASSERT_TRUE(tab->NavigateToURLAsync(GURL("javascript:__start_all();"))); |
203 | 203 |
204 // Block until the tests completes. | 204 // Block until the tests completes. |
205 ASSERT_TRUE(WaitUntilJavaScriptCondition( | 205 ASSERT_TRUE(WaitUntilJavaScriptCondition( |
206 tab, L"", L"window.domAutomationController.send(!__running_all);", | 206 tab.get(), L"", L"window.domAutomationController.send(!__running_all);", |
207 TestTimeouts::large_test_timeout())); | 207 TestTimeouts::large_test_timeout())); |
208 | 208 |
209 // TODO(jbates): remove this check when ref builds are updated. | 209 // TODO(jbates): remove this check when ref builds are updated. |
210 if (!HasFlag(kUseReferenceBuild)) { | 210 if (!HasFlag(kUseReferenceBuild)) { |
211 std::string json_events; | 211 std::string json_events; |
212 ASSERT_TRUE(automation()->EndTracing(&json_events)); | 212 ASSERT_TRUE(automation()->EndTracing(&json_events)); |
213 | 213 |
214 bool did_run_on_gpu = DidRunOnGpu(json_events); | 214 bool did_run_on_gpu = DidRunOnGpu(json_events); |
215 bool expect_gpu = HasFlag(kUseGpu); | 215 bool expect_gpu = HasFlag(kUseGpu); |
216 EXPECT_EQ(expect_gpu, did_run_on_gpu); | 216 EXPECT_EQ(expect_gpu, did_run_on_gpu); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 kIsGpuCanvasTest | kInternal | kHasRedirect | kUseGpu | kDisableVsync, | 304 kIsGpuCanvasTest | kInternal | kHasRedirect | kUseGpu | kDisableVsync, |
305 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu, | 305 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu, |
306 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu | | 306 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu | |
307 kDisableVsync)); | 307 kDisableVsync)); |
308 | 308 |
309 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(fireflies) | 309 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(fireflies) |
310 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(FishIE) | 310 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(FishIE) |
311 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(speedreading) | 311 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(speedreading) |
312 | 312 |
313 } // namespace | 313 } // namespace |
OLD | NEW |