| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "app/sql/connection.h" | 10 #include "app/sql/connection.h" |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 699 | 699 |
| 700 int UITestBase::GetBrowserProcessCount() { | 700 int UITestBase::GetBrowserProcessCount() { |
| 701 return GetRunningChromeProcesses(process_id_).size(); | 701 return GetRunningChromeProcesses(process_id_).size(); |
| 702 } | 702 } |
| 703 | 703 |
| 704 static DictionaryValue* LoadDictionaryValueFromPath(const FilePath& path) { | 704 static DictionaryValue* LoadDictionaryValueFromPath(const FilePath& path) { |
| 705 if (path.empty()) | 705 if (path.empty()) |
| 706 return NULL; | 706 return NULL; |
| 707 | 707 |
| 708 JSONFileValueSerializer serializer(path); | 708 JSONFileValueSerializer serializer(path); |
| 709 scoped_ptr<Value> root_value(serializer.Deserialize(NULL)); | 709 scoped_ptr<Value> root_value(serializer.Deserialize(NULL, NULL)); |
| 710 if (!root_value.get() || root_value->GetType() != Value::TYPE_DICTIONARY) | 710 if (!root_value.get() || root_value->GetType() != Value::TYPE_DICTIONARY) |
| 711 return NULL; | 711 return NULL; |
| 712 | 712 |
| 713 return static_cast<DictionaryValue*>(root_value.release()); | 713 return static_cast<DictionaryValue*>(root_value.release()); |
| 714 } | 714 } |
| 715 | 715 |
| 716 DictionaryValue* UITestBase::GetLocalState() { | 716 DictionaryValue* UITestBase::GetLocalState() { |
| 717 FilePath local_state_path; | 717 FilePath local_state_path; |
| 718 PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); | 718 PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); |
| 719 return LoadDictionaryValueFromPath(local_state_path); | 719 return LoadDictionaryValueFromPath(local_state_path); |
| (...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1513 set_ui_test_name(ASCIIToWide(test_name)); | 1513 set_ui_test_name(ASCIIToWide(test_name)); |
| 1514 } | 1514 } |
| 1515 UITestBase::SetUp(); | 1515 UITestBase::SetUp(); |
| 1516 PlatformTest::SetUp(); | 1516 PlatformTest::SetUp(); |
| 1517 } | 1517 } |
| 1518 | 1518 |
| 1519 void UITest::TearDown() { | 1519 void UITest::TearDown() { |
| 1520 UITestBase::TearDown(); | 1520 UITestBase::TearDown(); |
| 1521 PlatformTest::TearDown(); | 1521 PlatformTest::TearDown(); |
| 1522 } | 1522 } |
| OLD | NEW |