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

Side by Side Diff: chrome/browser/extensions/extension_test_api.cc

Issue 171032: end-to-end extension API tests (Closed)
Patch Set: a bit of refactoring and review feedback Created 11 years, 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/extensions/extension_test_api.h"
6 #include "chrome/common/notification_service.h"
7
8 namespace extension_test_api_functions {
9 const char kPassFunction[] = "test.pass";
10 const char kFailFunction[] = "test.fail";
11 }; // namespace extension_test_api_functions
12
13 bool ExtensionTestPassFunction::RunImpl() {
14 NotificationService::current()->Notify(
15 NotificationType::EXTENSION_TEST_PASSED,
16 Source<Profile>(dispatcher()->profile()),
17 NotificationService::NoDetails());
18 return true;
19 }
20
21 bool ExtensionTestFailFunction::RunImpl() {
22 std::string message;
23 EXTENSION_FUNCTION_VALIDATE(args_->GetAsString(&message));
24 NotificationService::current()->Notify(
25 NotificationType::EXTENSION_TEST_FAILED,
26 Source<Profile>(dispatcher()->profile()),
27 Details<std::string>(&message));
28 return true;
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698