Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(782)

Side by Side Diff: chrome/test/gpu/gpu_feature_browsertest.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_util.h" 6 #include "base/file_util.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/test/trace_event_analyzer.h" 10 #include "base/test/trace_event_analyzer.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const char* expected_reply, 84 const char* expected_reply,
85 bool new_tab) { 85 bool new_tab) {
86 #if defined(OS_LINUX) && !defined(NDEBUG) 86 #if defined(OS_LINUX) && !defined(NDEBUG)
87 // Bypass tests on GPU Linux Debug bots. 87 // Bypass tests on GPU Linux Debug bots.
88 if (gpu_enabled_) 88 if (gpu_enabled_)
89 return; 89 return;
90 #endif 90 #endif
91 91
92 base::FilePath test_path; 92 base::FilePath test_path;
93 test_path = gpu_test_dir_.Append(url); 93 test_path = gpu_test_dir_.Append(url);
94 ASSERT_TRUE(file_util::PathExists(test_path)) 94 ASSERT_TRUE(base::PathExists(test_path))
95 << "Missing test file: " << test_path.value(); 95 << "Missing test file: " << test_path.value();
96 96
97 content::DOMMessageQueue message_queue; 97 content::DOMMessageQueue message_queue;
98 if (new_tab) { 98 if (new_tab) {
99 ui_test_utils::NavigateToURLWithDisposition( 99 ui_test_utils::NavigateToURLWithDisposition(
100 browser(), net::FilePathToFileURL(test_path), 100 browser(), net::FilePathToFileURL(test_path),
101 NEW_FOREGROUND_TAB, ui_test_utils::BROWSER_TEST_NONE); 101 NEW_FOREGROUND_TAB, ui_test_utils::BROWSER_TEST_NONE);
102 } else { 102 } else {
103 ui_test_utils::NavigateToURL( 103 ui_test_utils::NavigateToURL(
104 browser(), net::FilePathToFileURL(test_path)); 104 browser(), net::FilePathToFileURL(test_path));
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 } 487 }
488 488
489 #if defined(OS_MACOSX) 489 #if defined(OS_MACOSX)
490 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, IOSurfaceReuse) { 490 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, IOSurfaceReuse) {
491 if (!IOSurfaceSupport::Initialize()) 491 if (!IOSurfaceSupport::Initialize())
492 return; 492 return;
493 493
494 const base::FilePath url( 494 const base::FilePath url(
495 FILE_PATH_LITERAL("feature_compositing_static.html")); 495 FILE_PATH_LITERAL("feature_compositing_static.html"));
496 base::FilePath test_path = gpu_test_dir_.Append(url); 496 base::FilePath test_path = gpu_test_dir_.Append(url);
497 ASSERT_TRUE(file_util::PathExists(test_path)) 497 ASSERT_TRUE(base::PathExists(test_path))
498 << "Missing test file: " << test_path.value(); 498 << "Missing test file: " << test_path.value();
499 499
500 ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(test_path)); 500 ui_test_utils::NavigateToURL(browser(), net::FilePathToFileURL(test_path));
501 501
502 gfx::Rect bounds = browser()->window()->GetBounds(); 502 gfx::Rect bounds = browser()->window()->GetBounds();
503 gfx::Rect new_bounds = bounds; 503 gfx::Rect new_bounds = bounds;
504 504
505 const char* create_event = "IOSurfaceImageTransportSurface::CreateIOSurface"; 505 const char* create_event = "IOSurfaceImageTransportSurface::CreateIOSurface";
506 const char* resize_event = "IOSurfaceImageTransportSurface::OnResize"; 506 const char* resize_event = "IOSurfaceImageTransportSurface::OnResize";
507 const char* draw_event = "CompositingIOSurfaceMac::DrawIOSurface"; 507 const char* draw_event = "CompositingIOSurfaceMac::DrawIOSurface";
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 base::StringPrintf( 552 base::StringPrintf(
553 "%d (resize offset %d): IOSurface width %d -> %d; Creates %d " 553 "%d (resize offset %d): IOSurface width %d -> %d; Creates %d "
554 "Expected %d", offset_i, offsets[offset_i], 554 "Expected %d", offset_i, offsets[offset_i],
555 old_width, new_width, num_creates, expected_creates); 555 old_width, new_width, num_creates, expected_creates);
556 } 556 }
557 } 557 }
558 } 558 }
559 #endif 559 #endif
560 560
561 } // namespace anonymous 561 } // namespace anonymous
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/session_commands_unittest.cc ('k') | chrome/test/mini_installer_test/installer_path_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698