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

Side by Side Diff: chrome/browser/metrics/metrics_service_browsertest.cc

Issue 12036003: Move window_open_disposition.h from webkit/ into ui/base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win Created 7 years, 11 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
OLDNEW
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 // Tests the MetricsService stat recording to make sure that the numbers are 5 // Tests the MetricsService stat recording to make sure that the numbers are
6 // what we expect. 6 // what we expect.
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/file_path.h" 11 #include "base/file_path.h"
12 #include "base/path_service.h" 12 #include "base/path_service.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/metrics/metrics_service.h" 14 #include "chrome/browser/metrics/metrics_service.h"
15 #include "chrome/browser/prefs/pref_service.h" 15 #include "chrome/browser/prefs/pref_service.h"
16 #include "chrome/common/chrome_paths.h" 16 #include "chrome/common/chrome_paths.h"
17 #include "chrome/common/chrome_switches.h" 17 #include "chrome/common/chrome_switches.h"
18 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
19 #include "chrome/common/url_constants.h" 19 #include "chrome/common/url_constants.h"
20 #include "chrome/test/base/in_process_browser_test.h" 20 #include "chrome/test/base/in_process_browser_test.h"
21 #include "chrome/test/base/ui_test_utils.h" 21 #include "chrome/test/base/ui_test_utils.h"
22 #include "content/public/browser/notification_service.h" 22 #include "content/public/browser/notification_service.h"
23 #include "content/public/browser/notification_types.h" 23 #include "content/public/browser/notification_types.h"
24 #include "googleurl/src/gurl.h" 24 #include "googleurl/src/gurl.h"
25 #include "net/base/net_util.h" 25 #include "net/base/net_util.h"
26 #include "webkit/glue/window_open_disposition.h" 26 #include "ui/base/window_open_disposition.h"
27 27
28 class MetricsServiceTest : public InProcessBrowserTest { 28 class MetricsServiceTest : public InProcessBrowserTest {
29 public: 29 public:
30 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 30 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
31 // Enable the metrics service for testing (in recording-only mode). 31 // Enable the metrics service for testing (in recording-only mode).
32 command_line->AppendSwitch(switches::kMetricsRecordingOnly); 32 command_line->AppendSwitch(switches::kMetricsRecordingOnly);
33 } 33 }
34 34
35 // Open a couple of tabs of random content. 35 // Open a couple of tabs of random content.
36 void OpenTabs() { 36 void OpenTabs() {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 IN_PROC_BROWSER_TEST_F(MetricsServiceReportingTest, 125 IN_PROC_BROWSER_TEST_F(MetricsServiceReportingTest,
126 CheckHighEntropySourceUsed) { 126 CheckHighEntropySourceUsed) {
127 // Since the full metrics service runs in this test, we expect that 127 // Since the full metrics service runs in this test, we expect that
128 // MetricsService returns the full entropy source at some point during 128 // MetricsService returns the full entropy source at some point during
129 // BrowserMain startup. 129 // BrowserMain startup.
130 ASSERT_TRUE(g_browser_process->metrics_service()); 130 ASSERT_TRUE(g_browser_process->metrics_service());
131 EXPECT_EQ(MetricsService::LAST_ENTROPY_HIGH, 131 EXPECT_EQ(MetricsService::LAST_ENTROPY_HIGH,
132 g_browser_process->metrics_service()->entropy_source_returned()); 132 g_browser_process->metrics_service()->entropy_source_returned());
133 } 133 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tab_util.h ('k') | chrome/browser/notifications/notification_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698