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

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

Issue 342068: Third patch in getting rid of caching MessageLoop pointers and always using C... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
« no previous file with comments | « chrome/browser/tab_contents/interstitial_page.cc ('k') | chrome/browser/task_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "app/message_box_flags.h" 5 #include "app/message_box_flags.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "chrome/browser/renderer_host/render_view_host.h" 7 #include "chrome/browser/renderer_host/render_view_host.h"
8 #include "chrome/browser/renderer_host/render_widget_host_view.h" 8 #include "chrome/browser/renderer_host/render_widget_host_view.h"
9 #include "chrome/browser/renderer_host/test/test_render_view_host.h" 9 #include "chrome/browser/renderer_host/test/test_render_view_host.h"
10 #include "chrome/browser/tab_contents/interstitial_page.h" 10 #include "chrome/browser/tab_contents/interstitial_page.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 public: 43 public:
44 TabContentsTestingProfile() : TestingProfile() { } 44 TabContentsTestingProfile() : TestingProfile() { }
45 45
46 virtual PrefService* GetPrefs() { 46 virtual PrefService* GetPrefs() {
47 if (!prefs_.get()) { 47 if (!prefs_.get()) {
48 FilePath source_path; 48 FilePath source_path;
49 PathService::Get(chrome::DIR_TEST_DATA, &source_path); 49 PathService::Get(chrome::DIR_TEST_DATA, &source_path);
50 source_path = source_path.AppendASCII("profiles") 50 source_path = source_path.AppendASCII("profiles")
51 .AppendASCII("chrome_prefs").AppendASCII("Preferences"); 51 .AppendASCII("chrome_prefs").AppendASCII("Preferences");
52 52
53 prefs_.reset(new PrefService(source_path, NULL)); 53 prefs_.reset(new PrefService(source_path));
54 Profile::RegisterUserPrefs(prefs_.get()); 54 Profile::RegisterUserPrefs(prefs_.get());
55 browser::RegisterAllPrefs(prefs_.get(), prefs_.get()); 55 browser::RegisterAllPrefs(prefs_.get(), prefs_.get());
56 } 56 }
57 return prefs_.get(); 57 return prefs_.get();
58 } 58 }
59 }; 59 };
60 60
61 class TestInterstitialPage : public InterstitialPage { 61 class TestInterstitialPage : public InterstitialPage {
62 public: 62 public:
63 enum InterstitialState { 63 enum InterstitialState {
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 1292
1293 // While the interstitial is showing, let's simulate the hidden page 1293 // While the interstitial is showing, let's simulate the hidden page
1294 // attempting to show a JS message. 1294 // attempting to show a JS message.
1295 IPC::Message* dummy_message = new IPC::Message; 1295 IPC::Message* dummy_message = new IPC::Message;
1296 bool did_suppress_message = false; 1296 bool did_suppress_message = false;
1297 contents()->RunJavaScriptMessage(L"This is an informative message", L"OK", 1297 contents()->RunJavaScriptMessage(L"This is an informative message", L"OK",
1298 kGURL, MessageBoxFlags::kIsJavascriptAlert, dummy_message, 1298 kGURL, MessageBoxFlags::kIsJavascriptAlert, dummy_message,
1299 &did_suppress_message); 1299 &did_suppress_message);
1300 EXPECT_TRUE(did_suppress_message); 1300 EXPECT_TRUE(did_suppress_message);
1301 } 1301 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/interstitial_page.cc ('k') | chrome/browser/task_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698