OLD | NEW |
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 "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" |
11 #include "chrome/browser/tab_contents/navigation_controller.h" | 11 #include "chrome/browser/tab_contents/navigation_controller.h" |
12 #include "chrome/browser/tab_contents/navigation_entry.h" | 12 #include "chrome/browser/tab_contents/navigation_entry.h" |
13 #include "chrome/browser/tab_contents/test_web_contents.h" | 13 #include "chrome/browser/tab_contents/test_web_contents.h" |
14 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
15 #include "chrome/common/ipc_channel.h" | |
16 #include "chrome/common/pref_service.h" | 15 #include "chrome/common/pref_service.h" |
17 #include "chrome/common/render_messages.h" | 16 #include "chrome/common/render_messages.h" |
18 #include "chrome/test/testing_profile.h" | 17 #include "chrome/test/testing_profile.h" |
| 18 #include "ipc/ipc_channel.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 using webkit_glue::PasswordForm; | 21 using webkit_glue::PasswordForm; |
22 | 22 |
23 static void InitNavigateParams(ViewHostMsg_FrameNavigate_Params* params, | 23 static void InitNavigateParams(ViewHostMsg_FrameNavigate_Params* params, |
24 int page_id, | 24 int page_id, |
25 const GURL& url) { | 25 const GURL& url) { |
26 params->page_id = page_id; | 26 params->page_id = page_id; |
27 params->url = url; | 27 params->url = url; |
28 params->referrer = GURL::EmptyGURL(); | 28 params->referrer = GURL::EmptyGURL(); |
(...skipping 1254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1283 | 1283 |
1284 // While the interstitial is showing, let's simulate the hidden page | 1284 // While the interstitial is showing, let's simulate the hidden page |
1285 // attempting to show a JS message. | 1285 // attempting to show a JS message. |
1286 IPC::Message* dummy_message = new IPC::Message; | 1286 IPC::Message* dummy_message = new IPC::Message; |
1287 bool did_suppress_message = false; | 1287 bool did_suppress_message = false; |
1288 contents()->RunJavaScriptMessage(L"This is an informative message", L"OK", | 1288 contents()->RunJavaScriptMessage(L"This is an informative message", L"OK", |
1289 kGURL, MessageBoxFlags::kIsJavascriptAlert, dummy_message, | 1289 kGURL, MessageBoxFlags::kIsJavascriptAlert, dummy_message, |
1290 &did_suppress_message); | 1290 &did_suppress_message); |
1291 EXPECT_TRUE(did_suppress_message); | 1291 EXPECT_TRUE(did_suppress_message); |
1292 } | 1292 } |
OLD | NEW |