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

Side by Side Diff: chrome/test/ui/ui_test.cc

Issue 42628: - Add UI test for the V8 Benchmark Suite.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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
« no previous file with comments | « chrome/test/ui/ui_test.h ('k') | chrome/test/ui/ui_tests.scons » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/test/ui/ui_test.h" 5 #include "chrome/test/ui/ui_test.h"
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/base_switches.h" 10 #include "base/base_switches.h"
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 #elif defined(OS_POSIX) 356 #elif defined(OS_POSIX)
357 // Sometimes one needs to run the browser under a special environment 357 // Sometimes one needs to run the browser under a special environment
358 // (e.g. valgrind) without also running the test harness (e.g. python) 358 // (e.g. valgrind) without also running the test harness (e.g. python)
359 // under the special environment. Provide a way to wrap the browser 359 // under the special environment. Provide a way to wrap the browser
360 // commandline with a special prefix to invoke the special environment. 360 // commandline with a special prefix to invoke the special environment.
361 const char* browser_wrapper = getenv("BROWSER_WRAPPER"); 361 const char* browser_wrapper = getenv("BROWSER_WRAPPER");
362 if (browser_wrapper) { 362 if (browser_wrapper) {
363 CommandLine wrapped_command(ASCIIToWide(browser_wrapper)); 363 CommandLine wrapped_command(ASCIIToWide(browser_wrapper));
364 wrapped_command.AppendArguments(command_line, true); 364 wrapped_command.AppendArguments(command_line, true);
365 command_line = wrapped_command; 365 command_line = wrapped_command;
366 LOG(INFO) << "BROWSER_WRAPPER was set, prefixing command_line with " << brow ser_wrapper; 366 LOG(INFO) << "BROWSER_WRAPPER was set, prefixing command_line with "
367 << browser_wrapper;
367 } 368 }
368 369
369 bool started = base::LaunchApp(command_line.argv(), 370 bool started = base::LaunchApp(command_line.argv(),
370 server_->fds_to_map(), 371 server_->fds_to_map(),
371 false, // Don't wait. 372 false, // Don't wait.
372 &process_); 373 &process_);
373 #endif 374 #endif
374 ASSERT_TRUE(started); 375 ASSERT_TRUE(started);
375 376
376 #if defined(OS_WIN) 377 #if defined(OS_WIN)
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 void UITest::PrintResult(const std::string& measurement, 806 void UITest::PrintResult(const std::string& measurement,
806 const std::string& modifier, 807 const std::string& modifier,
807 const std::string& trace, 808 const std::string& trace,
808 size_t value, 809 size_t value,
809 const std::string& units, 810 const std::string& units,
810 bool important) { 811 bool important) {
811 PrintResultsImpl(measurement, modifier, trace, UintToString(value), 812 PrintResultsImpl(measurement, modifier, trace, UintToString(value),
812 "", "", units, important); 813 "", "", units, important);
813 } 814 }
814 815
816 void UITest::PrintResult(const std::string& measurement,
817 const std::string& modifier,
818 const std::string& trace,
819 const std::string& value,
820 const std::string& units,
821 bool important) {
822 PrintResultsImpl(measurement, modifier, trace, value, "", "", units,
823 important);
824 }
825
815 void UITest::PrintResultMeanAndError(const std::string& measurement, 826 void UITest::PrintResultMeanAndError(const std::string& measurement,
816 const std::string& modifier, 827 const std::string& modifier,
817 const std::string& trace, 828 const std::string& trace,
818 const std::string& mean_and_error, 829 const std::string& mean_and_error,
819 const std::string& units, 830 const std::string& units,
820 bool important) { 831 bool important) {
821 PrintResultsImpl(measurement, modifier, trace, mean_and_error, 832 PrintResultsImpl(measurement, modifier, trace, mean_and_error,
822 "{", "}", units, important); 833 "{", "}", units, important);
823 } 834 }
824 835
(...skipping 25 matching lines...) Expand all
850 } 861 }
851 862
852 bool UITest::EvictFileFromSystemCacheWrapper(const FilePath& path) { 863 bool UITest::EvictFileFromSystemCacheWrapper(const FilePath& path) {
853 for (int i = 0; i < 10; i++) { 864 for (int i = 0; i < 10; i++) {
854 if (file_util::EvictFileFromSystemCache(path)) 865 if (file_util::EvictFileFromSystemCache(path))
855 return true; 866 return true;
856 PlatformThread::Sleep(1000); 867 PlatformThread::Sleep(1000);
857 } 868 }
858 return false; 869 return false;
859 } 870 }
OLDNEW
« no previous file with comments | « chrome/test/ui/ui_test.h ('k') | chrome/test/ui/ui_tests.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698