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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/ui/window_snapshot/window_snapshot.h" | 21 #include "chrome/browser/ui/window_snapshot/window_snapshot.h" |
22 #include "chrome/common/chrome_paths.h" | 22 #include "chrome/common/chrome_paths.h" |
23 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
24 #include "chrome/test/base/test_switches.h" | 24 #include "chrome/test/base/test_switches.h" |
25 #include "chrome/test/base/tracing.h" | 25 #include "chrome/test/base/tracing.h" |
26 #include "chrome/test/base/ui_test_utils.h" | 26 #include "chrome/test/base/ui_test_utils.h" |
27 #include "chrome/test/perf/browser_perf_test.h" | 27 #include "chrome/test/perf/browser_perf_test.h" |
28 #include "chrome/test/perf/perf_test.h" | 28 #include "chrome/test/perf/perf_test.h" |
29 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
30 #include "content/public/common/content_switches.h" | 30 #include "content/public/common/content_switches.h" |
| 31 #include "content/public/test/browser_test_utils.h" |
31 #include "content/public/test/test_utils.h" | 32 #include "content/public/test/test_utils.h" |
32 #include "content/test/gpu/gpu_test_config.h" | 33 #include "content/test/gpu/gpu_test_config.h" |
33 #include "googleurl/src/gurl.h" | 34 #include "googleurl/src/gurl.h" |
34 #include "net/base/mock_host_resolver.h" | 35 #include "net/base/mock_host_resolver.h" |
35 #include "net/base/net_util.h" | 36 #include "net/base/net_util.h" |
36 #include "testing/gtest/include/gtest/gtest.h" | 37 #include "testing/gtest/include/gtest/gtest.h" |
37 #include "third_party/skia/include/core/SkBitmap.h" | 38 #include "third_party/skia/include/core/SkBitmap.h" |
38 #include "third_party/skia/include/core/SkColor.h" | 39 #include "third_party/skia/include/core/SkColor.h" |
39 #include "ui/gfx/codec/png_codec.h" | 40 #include "ui/gfx/codec/png_codec.h" |
40 #include "ui/gl/gl_switches.h" | 41 #include "ui/gl/gl_switches.h" |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 if (flags & kAllowExternalDNS) | 320 if (flags & kAllowExternalDNS) |
320 AllowExternalDNS(); | 321 AllowExternalDNS(); |
321 | 322 |
322 std::string json_events; | 323 std::string json_events; |
323 TraceEventVector events_sw, events_gpu; | 324 TraceEventVector events_sw, events_gpu; |
324 scoped_ptr<TraceAnalyzer> analyzer; | 325 scoped_ptr<TraceAnalyzer> analyzer; |
325 | 326 |
326 LOG(INFO) << gurl_.possibly_invalid_spec(); | 327 LOG(INFO) << gurl_.possibly_invalid_spec(); |
327 ui_test_utils::NavigateToURLWithDisposition( | 328 ui_test_utils::NavigateToURLWithDisposition( |
328 browser(), gurl_, CURRENT_TAB, ui_test_utils::BROWSER_TEST_NONE); | 329 browser(), gurl_, CURRENT_TAB, ui_test_utils::BROWSER_TEST_NONE); |
329 ui_test_utils::WaitForLoadStop(chrome::GetActiveWebContents(browser())); | 330 content::WaitForLoadStop(chrome::GetActiveWebContents(browser())); |
330 | 331 |
331 // Let the test spin up. | 332 // Let the test spin up. |
332 LOG(INFO) << "Spinning up test..."; | 333 LOG(INFO) << "Spinning up test..."; |
333 ASSERT_TRUE(tracing::BeginTracing("test_gpu")); | 334 ASSERT_TRUE(tracing::BeginTracing("test_gpu")); |
334 Wait(spinup_time_ms_); | 335 Wait(spinup_time_ms_); |
335 ASSERT_TRUE(tracing::EndTracing(&json_events)); | 336 ASSERT_TRUE(tracing::EndTracing(&json_events)); |
336 | 337 |
337 // Wait for a pixel color to change (if requested). | 338 // Wait for a pixel color to change (if requested). |
338 WaitForPixelColor(); | 339 WaitForPixelColor(); |
339 | 340 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 | 586 |
586 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasManyImagesGPU) { | 587 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasManyImagesGPU) { |
587 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); | 588 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); |
588 } | 589 } |
589 | 590 |
590 IN_PROC_BROWSER_TEST_F(ThroughputTestThread, CanvasManyImagesGPU) { | 591 IN_PROC_BROWSER_TEST_F(ThroughputTestThread, CanvasManyImagesGPU) { |
591 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); | 592 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); |
592 } | 593 } |
593 | 594 |
594 } // namespace | 595 } // namespace |
OLD | NEW |