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

Side by Side Diff: chromecast/browser/test/chromecast_browser_test.cc

Issue 1510973007: [Chromecast] Set dummy metrics session ID for browser tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + use GUID format for dummy session ID Created 4 years, 10 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
« no previous file with comments | « chromecast/base/metrics/cast_metrics_helper.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/test/chromecast_browser_test.h" 5 #include "chromecast/browser/test/chromecast_browser_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chromecast/base/metrics/cast_metrics_helper.h"
10 #include "chromecast/browser/cast_browser_context.h" 11 #include "chromecast/browser/cast_browser_context.h"
11 #include "chromecast/browser/cast_browser_process.h" 12 #include "chromecast/browser/cast_browser_process.h"
12 #include "chromecast/browser/cast_content_window.h" 13 #include "chromecast/browser/cast_content_window.h"
13 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
14 #include "content/public/browser/render_process_host.h" 15 #include "content/public/browser/render_process_host.h"
15 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
16 #include "content/public/test/browser_test_utils.h" 17 #include "content/public/test/browser_test_utils.h"
17 #include "content/public/test/test_navigation_observer.h" 18 #include "content/public/test/test_navigation_observer.h"
18 19
19 namespace chromecast { 20 namespace chromecast {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 63 }
63 64
64 content::WebContents* ChromecastBrowserTest::CreateBrowser() { 65 content::WebContents* ChromecastBrowserTest::CreateBrowser() {
65 window_.reset(new CastContentWindow); 66 window_.reset(new CastContentWindow);
66 gfx::Size initial_size(1280, 720); 67 gfx::Size initial_size(1280, 720);
67 68
68 web_contents_ = window_->CreateWebContents( 69 web_contents_ = window_->CreateWebContents(
69 initial_size, 70 initial_size,
70 CastBrowserProcess::GetInstance()->browser_context()); 71 CastBrowserProcess::GetInstance()->browser_context());
71 window_->CreateWindowTree(initial_size, web_contents_.get()); 72 window_->CreateWindowTree(initial_size, web_contents_.get());
73
74 metrics::CastMetricsHelper::GetInstance()->SetDummySessionIdForTesting();
75
72 return web_contents_.get(); 76 return web_contents_.get();
73 } 77 }
74 78
75 } // namespace shell 79 } // namespace shell
76 } // namespace chromecast 80 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/base/metrics/cast_metrics_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698