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

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

Issue 657037: Add a metrics extensions API.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
6 6
7 #include "chrome/browser/browser.h" 7 #include "chrome/browser/browser.h"
8 #include "chrome/browser/extensions/extensions_service.h" 8 #include "chrome/browser/extensions/extensions_service.h"
9 #include "chrome/browser/profile.h" 9 #include "chrome/browser/profile.h"
10 #include "chrome/common/chrome_switches.h"
10 #include "chrome/common/notification_registrar.h" 11 #include "chrome/common/notification_registrar.h"
11 #include "chrome/test/ui_test_utils.h" 12 #include "chrome/test/ui_test_utils.h"
12 13
13 namespace { 14 namespace {
14 static const int kTimeoutMs = 60 * 1000; // 1 minute 15 static const int kTimeoutMs = 60 * 1000; // 1 minute
15 }; 16 };
16 17
17 ExtensionApiTest::ResultCatcher::ResultCatcher() { 18 ExtensionApiTest::ResultCatcher::ResultCatcher() {
18 registrar_.Add(this, NotificationType::EXTENSION_TEST_PASSED, 19 registrar_.Add(this, NotificationType::EXTENSION_TEST_PASSED,
19 NotificationService::AllSources()); 20 NotificationService::AllSources());
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 if (!extension) { 97 if (!extension) {
97 message_ = "extension pointer is NULL."; 98 message_ = "extension pointer is NULL.";
98 return NULL; 99 return NULL;
99 } 100 }
100 return extension; 101 return extension;
101 } 102 }
102 103
103 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { 104 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) {
104 ExtensionBrowserTest::SetUpCommandLine(command_line); 105 ExtensionBrowserTest::SetUpCommandLine(command_line);
105 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); 106 test_data_dir_ = test_data_dir_.AppendASCII("api_test");
107
108 // Needed for metrics extension API tests.
109 command_line->AppendSwitch(switches::kEnableMetricsExtensionApi);
106 } 110 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698