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

Side by Side Diff: chrome/browser/tab_contents/web_contents_unittest.cc

Issue 83001: ImportantFileWriter (Closed)
Patch Set: share more code Created 11 years, 7 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/logging.h" 5 #include "base/logging.h"
6 #include "chrome/browser/renderer_host/render_view_host.h" 6 #include "chrome/browser/renderer_host/render_view_host.h"
7 #include "chrome/browser/renderer_host/render_widget_host_view.h" 7 #include "chrome/browser/renderer_host/render_widget_host_view.h"
8 #include "chrome/browser/renderer_host/test_render_view_host.h" 8 #include "chrome/browser/renderer_host/test_render_view_host.h"
9 #include "chrome/browser/tab_contents/interstitial_page.h" 9 #include "chrome/browser/tab_contents/interstitial_page.h"
10 #include "chrome/browser/tab_contents/navigation_controller.h" 10 #include "chrome/browser/tab_contents/navigation_controller.h"
(...skipping 29 matching lines...) Expand all
40 public: 40 public:
41 WebContentsTestingProfile() : TestingProfile() { } 41 WebContentsTestingProfile() : TestingProfile() { }
42 42
43 virtual PrefService* GetPrefs() { 43 virtual PrefService* GetPrefs() {
44 if (!prefs_.get()) { 44 if (!prefs_.get()) {
45 FilePath source_path; 45 FilePath source_path;
46 PathService::Get(chrome::DIR_TEST_DATA, &source_path); 46 PathService::Get(chrome::DIR_TEST_DATA, &source_path);
47 source_path = source_path.AppendASCII("profiles") 47 source_path = source_path.AppendASCII("profiles")
48 .AppendASCII("chrome_prefs").AppendASCII("Preferences"); 48 .AppendASCII("chrome_prefs").AppendASCII("Preferences");
49 49
50 prefs_.reset(new PrefService(source_path)); 50 prefs_.reset(new PrefService(source_path, NULL));
51 Profile::RegisterUserPrefs(prefs_.get()); 51 Profile::RegisterUserPrefs(prefs_.get());
52 browser::RegisterAllPrefs(prefs_.get(), prefs_.get()); 52 browser::RegisterAllPrefs(prefs_.get(), prefs_.get());
53 } 53 }
54 return prefs_.get(); 54 return prefs_.get();
55 } 55 }
56 }; 56 };
57 57
58 class TestInterstitialPage : public InterstitialPage { 58 class TestInterstitialPage : public InterstitialPage {
59 public: 59 public:
60 enum InterstitialState { 60 enum InterstitialState {
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 interstitial = 1110 interstitial =
1111 new TestInterstitialPage(contents(), true, url, &state, &deleted); 1111 new TestInterstitialPage(contents(), true, url, &state, &deleted);
1112 interstitial->Show(); 1112 interstitial->Show();
1113 interstitial->TestDidNavigate(1, url); 1113 interstitial->TestDidNavigate(1, url);
1114 // Simulate a renderer crash. 1114 // Simulate a renderer crash.
1115 interstitial->TestRenderViewGone(); 1115 interstitial->TestRenderViewGone();
1116 // The interstitial should have been dismissed. 1116 // The interstitial should have been dismissed.
1117 EXPECT_TRUE(deleted); 1117 EXPECT_TRUE(deleted);
1118 EXPECT_EQ(TestInterstitialPage::CANCELED, state); 1118 EXPECT_EQ(TestInterstitialPage::CANCELED, state);
1119 } 1119 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_model.cc ('k') | chrome/browser/views/options/options_page_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698