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

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

Issue 2805089: Add bookmark promo to NTP on first run. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 25 matching lines...) Expand all
36 params->searchable_form_encoding = std::string(); 36 params->searchable_form_encoding = std::string();
37 params->password_form = PasswordForm(); 37 params->password_form = PasswordForm();
38 params->security_info = std::string(); 38 params->security_info = std::string();
39 params->gesture = NavigationGestureUser; 39 params->gesture = NavigationGestureUser;
40 params->is_post = false; 40 params->is_post = false;
41 } 41 }
42 42
43 // Subclass the TestingProfile so that it can return certain services we need. 43 // Subclass the TestingProfile so that it can return certain services we need.
44 class TabContentsTestingProfile : public TestingProfile { 44 class TabContentsTestingProfile : public TestingProfile {
45 public: 45 public:
46 TabContentsTestingProfile() : TestingProfile() { } 46 TabContentsTestingProfile() : TestingProfile() {
47 CreateBookmarkModel(false);
48 }
47 49
48 virtual PrefService* GetPrefs() { 50 virtual PrefService* GetPrefs() {
49 if (!prefs_.get()) { 51 if (!prefs_.get()) {
50 FilePath source_path; 52 FilePath source_path;
51 PathService::Get(chrome::DIR_TEST_DATA, &source_path); 53 PathService::Get(chrome::DIR_TEST_DATA, &source_path);
52 source_path = source_path.AppendASCII("profiles") 54 source_path = source_path.AppendASCII("profiles")
53 .AppendASCII("chrome_prefs").AppendASCII("Preferences"); 55 .AppendASCII("chrome_prefs").AppendASCII("Preferences");
54 56
55 // Create a preference service that only contains user defined 57 // Create a preference service that only contains user defined
56 // preference values. 58 // preference values.
(...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 1469
1468 // While the interstitial is showing, let's simulate the hidden page 1470 // While the interstitial is showing, let's simulate the hidden page
1469 // attempting to show a JS message. 1471 // attempting to show a JS message.
1470 IPC::Message* dummy_message = new IPC::Message; 1472 IPC::Message* dummy_message = new IPC::Message;
1471 bool did_suppress_message = false; 1473 bool did_suppress_message = false;
1472 contents()->RunJavaScriptMessage(L"This is an informative message", L"OK", 1474 contents()->RunJavaScriptMessage(L"This is an informative message", L"OK",
1473 kGURL, MessageBoxFlags::kIsJavascriptAlert, dummy_message, 1475 kGURL, MessageBoxFlags::kIsJavascriptAlert, dummy_message,
1474 &did_suppress_message); 1476 &did_suppress_message);
1475 EXPECT_TRUE(did_suppress_message); 1477 EXPECT_TRUE(did_suppress_message);
1476 } 1478 }
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