| OLD | NEW | 
|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/base_switches.h" | 5 #include "base/base_switches.h" | 
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" | 
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" | 
| 8 #include "chrome/browser/net/prediction_options.h" | 8 #include "chrome/browser/net/prediction_options.h" | 
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" | 
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" | 
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 128         new MockNetworkChangeNotifier4G); | 128         new MockNetworkChangeNotifier4G); | 
| 129     EXPECT_TRUE(RunPrefetchExperiment(true, browser())); | 129     EXPECT_TRUE(RunPrefetchExperiment(true, browser())); | 
| 130   } | 130   } | 
| 131 } | 131 } | 
| 132 | 132 | 
| 133 // Bug 339909: When in incognito mode the browser crashed due to an | 133 // Bug 339909: When in incognito mode the browser crashed due to an | 
| 134 // uninitialized preference member. Verify that it no longer does. | 134 // uninitialized preference member. Verify that it no longer does. | 
| 135 IN_PROC_BROWSER_TEST_F(PrefetchBrowserTestPrediction, IncognitoTest) { | 135 IN_PROC_BROWSER_TEST_F(PrefetchBrowserTestPrediction, IncognitoTest) { | 
| 136   Profile* incognito_profile = browser()->profile()->GetOffTheRecordProfile(); | 136   Profile* incognito_profile = browser()->profile()->GetOffTheRecordProfile(); | 
| 137   Browser* incognito_browser = | 137   Browser* incognito_browser = | 
| 138       new Browser(Browser::CreateParams(incognito_profile)); | 138       new Browser(Browser::CreateParams(incognito_profile, true)); | 
| 139 | 139 | 
| 140   // Navigate just to have a tab in this window, otherwise there is no | 140   // Navigate just to have a tab in this window, otherwise there is no | 
| 141   // WebContents for the incognito browser. | 141   // WebContents for the incognito browser. | 
| 142   OpenURLOffTheRecord(browser()->profile(), GURL("about:blank")); | 142   OpenURLOffTheRecord(browser()->profile(), GURL("about:blank")); | 
| 143 | 143 | 
| 144   EXPECT_TRUE(RunPrefetchExperiment(true, incognito_browser)); | 144   EXPECT_TRUE(RunPrefetchExperiment(true, incognito_browser)); | 
| 145 } | 145 } | 
| 146 | 146 | 
| 147 }  // namespace | 147 }  // namespace | 
| OLD | NEW | 
|---|