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

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

Issue 3053015: Revert bookmark bar promo CL, r52993... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/new_new_tab.js ('k') | chrome/common/pref_names.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/pref_service.h" 7 #include "chrome/browser/pref_service.h"
8 #include "chrome/browser/pref_value_store.h" 8 #include "chrome/browser/pref_value_store.h"
9 #include "chrome/browser/renderer_host/render_view_host.h" 9 #include "chrome/browser/renderer_host/render_view_host.h"
10 #include "chrome/browser/renderer_host/render_widget_host_view.h" 10 #include "chrome/browser/renderer_host/render_widget_host_view.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 TabContentsTest() 177 TabContentsTest()
178 : RenderViewHostTestHarness(), 178 : RenderViewHostTestHarness(),
179 ui_thread_(ChromeThread::UI, &message_loop_) { 179 ui_thread_(ChromeThread::UI, &message_loop_) {
180 } 180 }
181 181
182 private: 182 private:
183 // Supply our own profile so we use the correct profile data. The test harness 183 // Supply our own profile so we use the correct profile data. The test harness
184 // is not supposed to overwrite a profile if it's already created. 184 // is not supposed to overwrite a profile if it's already created.
185 virtual void SetUp() { 185 virtual void SetUp() {
186 TestingProfile* profile = new TestingProfile(); 186 TestingProfile* profile = new TestingProfile();
187 profile->CreateBookmarkModel(false);
188 profile_.reset(profile); 187 profile_.reset(profile);
189 188
190 // Set some (WebKit) user preferences. 189 // Set some (WebKit) user preferences.
191 TestingPrefService* pref_services = profile->GetPrefs(); 190 TestingPrefService* pref_services = profile->GetPrefs();
192 #if defined(TOOLKIT_USES_GTK) 191 #if defined(TOOLKIT_USES_GTK)
193 pref_services->SetUserPref(prefs::kUsesSystemTheme, 192 pref_services->SetUserPref(prefs::kUsesSystemTheme,
194 Value::CreateBooleanValue(false)); 193 Value::CreateBooleanValue(false));
195 #endif 194 #endif
196 pref_services->SetUserPref(prefs::kDefaultCharset, 195 pref_services->SetUserPref(prefs::kDefaultCharset,
197 Value::CreateStringValue("utf8")); 196 Value::CreateStringValue("utf8"));
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 1466
1468 // While the interstitial is showing, let's simulate the hidden page 1467 // While the interstitial is showing, let's simulate the hidden page
1469 // attempting to show a JS message. 1468 // attempting to show a JS message.
1470 IPC::Message* dummy_message = new IPC::Message; 1469 IPC::Message* dummy_message = new IPC::Message;
1471 bool did_suppress_message = false; 1470 bool did_suppress_message = false;
1472 contents()->RunJavaScriptMessage(L"This is an informative message", L"OK", 1471 contents()->RunJavaScriptMessage(L"This is an informative message", L"OK",
1473 kGURL, MessageBoxFlags::kIsJavascriptAlert, dummy_message, 1472 kGURL, MessageBoxFlags::kIsJavascriptAlert, dummy_message,
1474 &did_suppress_message); 1473 &did_suppress_message);
1475 EXPECT_TRUE(did_suppress_message); 1474 EXPECT_TRUE(did_suppress_message);
1476 } 1475 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/new_new_tab.js ('k') | chrome/common/pref_names.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698