| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/browser/extensions/extension_test_api.h" | 5 #include "chrome/browser/extensions/extension_test_api.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "chrome/browser/extensions/extensions_service.h" | 9 #include "chrome/browser/extensions/extensions_service.h" |
| 10 #include "chrome/browser/extensions/extensions_quota_service.h" | 10 #include "chrome/browser/extensions/extensions_quota_service.h" |
| 11 #include "chrome/browser/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
| 12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/common/notification_service.h" | 13 #include "chrome/common/notification_service.h" |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 // If you see this error in your test, you need to set the config state | 17 // If you see this error in your test, you need to set the config state |
| 18 // to be returned by chrome.test.getConfig(). Do this by calling | 18 // to be returned by chrome.test.getConfig(). Do this by calling |
| 19 // ExtensionTestGetConfigFunction::set_test_config_state(Value* state) | 19 // ExtensionTestGetConfigFunction::set_test_config_state(Value* state) |
| 20 // in test set up. | 20 // in test set up. |
| 21 const char kNoTestConfigDataError[] = "Test configuration was not set."; | 21 const char kNoTestConfigDataError[] = "Test configuration was not set."; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 TestConfigState* test_config_state = Singleton<TestConfigState>::get(); | 106 TestConfigState* test_config_state = Singleton<TestConfigState>::get(); |
| 107 | 107 |
| 108 if (!test_config_state->config_state()) { | 108 if (!test_config_state->config_state()) { |
| 109 error_ = kNoTestConfigDataError; | 109 error_ = kNoTestConfigDataError; |
| 110 return false; | 110 return false; |
| 111 } | 111 } |
| 112 | 112 |
| 113 result_.reset(test_config_state->config_state()->DeepCopy()); | 113 result_.reset(test_config_state->config_state()->DeepCopy()); |
| 114 return true; | 114 return true; |
| 115 } | 115 } |
| OLD | NEW |