OLD | NEW |
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 <set> | 5 #include <set> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "chrome/test/ui/ui_test.h" | 8 #include "chrome/test/ui/ui_test.h" |
9 | 9 |
10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 return base::GetProcessCount(chrome::kBrowserProcessExecutableName, | 456 return base::GetProcessCount(chrome::kBrowserProcessExecutableName, |
457 &filter); | 457 &filter); |
458 } | 458 } |
459 | 459 |
460 static DictionaryValue* LoadDictionaryValueFromPath(const std::wstring& path) { | 460 static DictionaryValue* LoadDictionaryValueFromPath(const std::wstring& path) { |
461 if (path.empty()) | 461 if (path.empty()) |
462 return NULL; | 462 return NULL; |
463 | 463 |
464 JSONFileValueSerializer serializer(path); | 464 JSONFileValueSerializer serializer(path); |
465 Value* root_value = NULL; | 465 Value* root_value = NULL; |
466 if (serializer.Deserialize(&root_value) && | 466 if (serializer.Deserialize(&root_value, NULL) && |
467 root_value->GetType() != Value::TYPE_DICTIONARY) { | 467 root_value->GetType() != Value::TYPE_DICTIONARY) { |
468 delete root_value; | 468 delete root_value; |
469 return NULL; | 469 return NULL; |
470 } | 470 } |
471 return static_cast<DictionaryValue*>(root_value); | 471 return static_cast<DictionaryValue*>(root_value); |
472 } | 472 } |
473 | 473 |
474 DictionaryValue* UITest::GetLocalState() { | 474 DictionaryValue* UITest::GetLocalState() { |
475 std::wstring local_state_path; | 475 std::wstring local_state_path; |
476 PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); | 476 PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 const std::wstring& units, | 674 const std::wstring& units, |
675 bool important) { | 675 bool important) { |
676 // <*>RESULT <graph_name>: <trace_name>= <value> <units> | 676 // <*>RESULT <graph_name>: <trace_name>= <value> <units> |
677 // <*>RESULT <graph_name>: <trace_name>= {<mean>, <std deviation>} <units> | 677 // <*>RESULT <graph_name>: <trace_name>= {<mean>, <std deviation>} <units> |
678 // <*>RESULT <graph_name>: <trace_name>= [<value>,value,value,...,] <units> | 678 // <*>RESULT <graph_name>: <trace_name>= [<value>,value,value,...,] <units> |
679 wprintf(L"%lsRESULT %ls%ls: %ls= %ls%ls%ls %ls\n", | 679 wprintf(L"%lsRESULT %ls%ls: %ls= %ls%ls%ls %ls\n", |
680 important ? L"*" : L"", measurement.c_str(), modifier.c_str(), | 680 important ? L"*" : L"", measurement.c_str(), modifier.c_str(), |
681 trace.c_str(), prefix.c_str(), values.c_str(), suffix.c_str(), | 681 trace.c_str(), prefix.c_str(), values.c_str(), suffix.c_str(), |
682 units.c_str()); | 682 units.c_str()); |
683 } | 683 } |
OLD | NEW |