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

Side by Side Diff: chrome/browser/prerender/prerender_unittest.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/format_macros.h" 12 #include "base/format_macros.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/scoped_vector.h" 14 #include "base/memory/scoped_vector.h"
15 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "base/metrics/field_trial.h" 16 #include "base/metrics/field_trial.h"
17 #include "base/prefs/pref_service.h"
18 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
19 #include "base/time/time.h" 18 #include "base/time/time.h"
20 #include "chrome/browser/net/prediction_options.h" 19 #include "chrome/browser/net/prediction_options.h"
21 #include "chrome/browser/prerender/prerender_contents.h" 20 #include "chrome/browser/prerender/prerender_contents.h"
22 #include "chrome/browser/prerender/prerender_field_trial.h" 21 #include "chrome/browser/prerender/prerender_field_trial.h"
23 #include "chrome/browser/prerender/prerender_handle.h" 22 #include "chrome/browser/prerender/prerender_handle.h"
24 #include "chrome/browser/prerender/prerender_link_manager.h" 23 #include "chrome/browser/prerender/prerender_link_manager.h"
25 #include "chrome/browser/prerender/prerender_manager.h" 24 #include "chrome/browser/prerender/prerender_manager.h"
26 #include "chrome/browser/prerender/prerender_origin.h" 25 #include "chrome/browser/prerender/prerender_origin.h"
27 #include "chrome/common/chrome_switches.h" 26 #include "chrome/common/chrome_switches.h"
28 #include "chrome/common/pref_names.h" 27 #include "chrome/common/pref_names.h"
29 #include "chrome/common/prerender_types.h" 28 #include "chrome/common/prerender_types.h"
30 #include "chrome/test/base/testing_browser_process.h" 29 #include "chrome/test/base/testing_browser_process.h"
31 #include "chrome/test/base/testing_profile.h" 30 #include "chrome/test/base/testing_profile.h"
31 #include "components/prefs/pref_service.h"
32 #include "content/public/browser/render_view_host.h" 32 #include "content/public/browser/render_view_host.h"
33 #include "content/public/test/test_browser_thread.h" 33 #include "content/public/test/test_browser_thread.h"
34 #include "testing/gtest/include/gtest/gtest.h" 34 #include "testing/gtest/include/gtest/gtest.h"
35 #include "ui/gfx/geometry/size.h" 35 #include "ui/gfx/geometry/size.h"
36 #include "url/gurl.h" 36 #include "url/gurl.h"
37 37
38 using base::Time; 38 using base::Time;
39 using base::TimeDelta; 39 using base::TimeDelta;
40 using base::TimeTicks; 40 using base::TimeTicks;
41 using content::BrowserThread; 41 using content::BrowserThread;
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 CHECK(prerender_handle.get()); 1567 CHECK(prerender_handle.get());
1568 EXPECT_TRUE(prerender_handle->IsPrerendering()); 1568 EXPECT_TRUE(prerender_handle->IsPrerendering());
1569 EXPECT_TRUE(prerender_contents->prerendering_has_started()); 1569 EXPECT_TRUE(prerender_contents->prerendering_has_started());
1570 EXPECT_EQ(prerender_contents, prerender_handle->contents()); 1570 EXPECT_EQ(prerender_contents, prerender_handle->contents());
1571 EXPECT_EQ(ORIGIN_INSTANT, prerender_handle->contents()->origin()); 1571 EXPECT_EQ(ORIGIN_INSTANT, prerender_handle->contents()->origin());
1572 ASSERT_EQ(prerender_contents, prerender_manager()->FindAndUseEntry(url)); 1572 ASSERT_EQ(prerender_contents, prerender_manager()->FindAndUseEntry(url));
1573 EXPECT_FALSE(prerender_handle->IsPrerendering()); 1573 EXPECT_FALSE(prerender_handle->IsPrerendering());
1574 } 1574 }
1575 1575
1576 } // namespace prerender 1576 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/printing/cloud_print/cloud_print_proxy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698