| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, | 187 ASSERT_EQ(AUTOMATION_MSG_NAVIGATION_SUCCESS, |
| 188 tab->NavigateToURL(net::FilePathToFileURL(test_path))); | 188 tab->NavigateToURL(net::FilePathToFileURL(test_path))); |
| 189 } | 189 } |
| 190 | 190 |
| 191 // Block until initialization completes | 191 // Block until initialization completes |
| 192 // If the following assertion fails intermittently, it could be due to a | 192 // If the following assertion fails intermittently, it could be due to a |
| 193 // race condition caused by an html redirect. If that is the case, verify | 193 // race condition caused by an html redirect. If that is the case, verify |
| 194 // that flag kHasRedirect is enabled for the current test. | 194 // that flag kHasRedirect is enabled for the current test. |
| 195 ASSERT_TRUE(WaitUntilJavaScriptCondition( | 195 ASSERT_TRUE(WaitUntilJavaScriptCondition( |
| 196 tab, L"", L"window.domAutomationController.send(__initialized);", | 196 tab, L"", L"window.domAutomationController.send(__initialized);", |
| 197 TestTimeouts::large_test_timeout_ms())); | 197 TestTimeouts::large_test_timeout())); |
| 198 | 198 |
| 199 if (HasFlag(kForceGpuComposited)) { | 199 if (HasFlag(kForceGpuComposited)) { |
| 200 ASSERT_TRUE(tab->NavigateToURLAsync( | 200 ASSERT_TRUE(tab->NavigateToURLAsync( |
| 201 GURL("javascript:__make_body_composited();"))); | 201 GURL("javascript:__make_body_composited();"))); |
| 202 } | 202 } |
| 203 | 203 |
| 204 // Start the tests. | 204 // Start the tests. |
| 205 ASSERT_TRUE(tab->NavigateToURLAsync(GURL("javascript:__start_all();"))); | 205 ASSERT_TRUE(tab->NavigateToURLAsync(GURL("javascript:__start_all();"))); |
| 206 | 206 |
| 207 // Block until the tests completes. | 207 // Block until the tests completes. |
| 208 ASSERT_TRUE(WaitUntilJavaScriptCondition( | 208 ASSERT_TRUE(WaitUntilJavaScriptCondition( |
| 209 tab, L"", L"window.domAutomationController.send(!__running_all);", | 209 tab, L"", L"window.domAutomationController.send(!__running_all);", |
| 210 TestTimeouts::large_test_timeout_ms())); | 210 TestTimeouts::large_test_timeout())); |
| 211 | 211 |
| 212 // TODO(jbates): remove this check when ref builds are updated. | 212 // TODO(jbates): remove this check when ref builds are updated. |
| 213 if (!HasFlag(kUseReferenceBuild)) { | 213 if (!HasFlag(kUseReferenceBuild)) { |
| 214 std::string json_events; | 214 std::string json_events; |
| 215 ASSERT_TRUE(automation()->EndTracing(&json_events)); | 215 ASSERT_TRUE(automation()->EndTracing(&json_events)); |
| 216 | 216 |
| 217 bool did_run_on_gpu = DidRunOnGpu(json_events); | 217 bool did_run_on_gpu = DidRunOnGpu(json_events); |
| 218 bool expect_gpu = HasFlag(kUseGpu); | 218 bool expect_gpu = HasFlag(kUseGpu); |
| 219 EXPECT_EQ(expect_gpu, did_run_on_gpu); | 219 EXPECT_EQ(expect_gpu, did_run_on_gpu); |
| 220 } | 220 } |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 kDisableVsync)); | 316 kDisableVsync)); |
| 317 | 317 |
| 318 // crbug.com/132133 | 318 // crbug.com/132133 |
| 319 #if !defined(OS_WIN) | 319 #if !defined(OS_WIN) |
| 320 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(fireflies) | 320 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(fireflies) |
| 321 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(FishIE) | 321 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(FishIE) |
| 322 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(speedreading) | 322 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(speedreading) |
| 323 #endif | 323 #endif |
| 324 | 324 |
| 325 } // namespace | 325 } // namespace |
| OLD | NEW |