OLD | NEW |
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 "base/utf_string_conversions.h" | 5 #include "base/utf_string_conversions.h" |
6 #include "base/time.h" | 6 #include "base/time.h" |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "chrome/browser/content_settings/host_content_settings_map.h" | 8 #include "chrome/browser/content_settings/host_content_settings_map.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/tab_contents/tab_specific_content_settings.h" | 10 #include "chrome/browser/tab_contents/tab_specific_content_settings.h" |
11 #include "chrome/browser/ui/browser.h" | 11 #include "chrome/browser/ui/browser.h" |
12 #include "chrome/common/render_messages_params.h" | |
13 #include "chrome/test/in_process_browser_test.h" | 12 #include "chrome/test/in_process_browser_test.h" |
14 #include "chrome/test/ui_test_utils.h" | 13 #include "chrome/test/ui_test_utils.h" |
15 #include "content/browser/renderer_host/render_view_host.h" | 14 #include "content/browser/renderer_host/render_view_host.h" |
16 #include "content/browser/tab_contents/tab_contents.h" | 15 #include "content/browser/tab_contents/tab_contents.h" |
17 #include "content/browser/tab_contents/tab_contents_observer.h" | 16 #include "content/browser/tab_contents/tab_contents_observer.h" |
| 17 #include "content/common/view_messages.h" |
18 #include "net/base/host_port_pair.h" | 18 #include "net/base/host_port_pair.h" |
19 #include "net/test/test_server.h" | 19 #include "net/test/test_server.h" |
20 | 20 |
21 typedef std::pair<int, Value*> ExecuteDetailType; | 21 typedef std::pair<int, Value*> ExecuteDetailType; |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // NotificationObserver used to listen for EXECUTE_JAVASCRIPT_RESULT | 25 // NotificationObserver used to listen for EXECUTE_JAVASCRIPT_RESULT |
26 // notifications. | 26 // notifications. |
27 class ExecuteNotificationObserver : public NotificationObserver { | 27 class ExecuteNotificationObserver : public NotificationObserver { |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 RenderViewHostTestTabContentsObserver observer( | 259 RenderViewHostTestTabContentsObserver observer( |
260 browser()->GetSelectedTabContents()); | 260 browser()->GetSelectedTabContents()); |
261 | 261 |
262 GURL test_url = test_server()->GetURL("files/simple.html"); | 262 GURL test_url = test_server()->GetURL("files/simple.html"); |
263 ui_test_utils::NavigateToURL(browser(), test_url); | 263 ui_test_utils::NavigateToURL(browser(), test_url); |
264 | 264 |
265 EXPECT_EQ(test_server()->host_port_pair().ToString(), | 265 EXPECT_EQ(test_server()->host_port_pair().ToString(), |
266 observer.observed_socket_address().ToString()); | 266 observer.observed_socket_address().ToString()); |
267 EXPECT_EQ(1, observer.navigation_count()); | 267 EXPECT_EQ(1, observer.navigation_count()); |
268 } | 268 } |
OLD | NEW |