OLD | NEW |
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 "chrome/browser/extensions/api/test/test_api.h" | 5 #include "chrome/browser/extensions/api/test/test_api.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 TestNotifyPassFunction::~TestNotifyPassFunction() {} | 46 TestNotifyPassFunction::~TestNotifyPassFunction() {} |
47 | 47 |
48 bool TestNotifyPassFunction::RunImpl() { | 48 bool TestNotifyPassFunction::RunImpl() { |
49 content::NotificationService::current()->Notify( | 49 content::NotificationService::current()->Notify( |
50 chrome::NOTIFICATION_EXTENSION_TEST_PASSED, | 50 chrome::NOTIFICATION_EXTENSION_TEST_PASSED, |
51 content::Source<Profile>(dispatcher()->profile()), | 51 content::Source<Profile>(dispatcher()->profile()), |
52 content::NotificationService::NoDetails()); | 52 content::NotificationService::NoDetails()); |
53 return true; | 53 return true; |
54 } | 54 } |
55 | 55 |
56 TestFailFunction::~TestFailFunction() {} | 56 TestNotifyFailFunction::~TestNotifyFailFunction() {} |
57 | 57 |
58 bool TestFailFunction::RunImpl() { | 58 bool TestNotifyFailFunction::RunImpl() { |
59 std::string message; | 59 std::string message; |
60 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &message)); | 60 EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &message)); |
61 content::NotificationService::current()->Notify( | 61 content::NotificationService::current()->Notify( |
62 chrome::NOTIFICATION_EXTENSION_TEST_FAILED, | 62 chrome::NOTIFICATION_EXTENSION_TEST_FAILED, |
63 content::Source<Profile>(dispatcher()->profile()), | 63 content::Source<Profile>(dispatcher()->profile()), |
64 content::Details<std::string>(&message)); | 64 content::Details<std::string>(&message)); |
65 return true; | 65 return true; |
66 } | 66 } |
67 | 67 |
68 TestLogFunction::~TestLogFunction() {} | 68 TestLogFunction::~TestLogFunction() {} |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 if (!test_config_state->config_state()) { | 137 if (!test_config_state->config_state()) { |
138 error_ = kNoTestConfigDataError; | 138 error_ = kNoTestConfigDataError; |
139 return false; | 139 return false; |
140 } | 140 } |
141 | 141 |
142 SetResult(test_config_state->config_state()->DeepCopy()); | 142 SetResult(test_config_state->config_state()->DeepCopy()); |
143 return true; | 143 return true; |
144 } | 144 } |
145 | 145 |
146 } // namespace extensions | 146 } // namespace extensions |
OLD | NEW |