OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/containers/hash_tables.h" | 6 #include "base/containers/hash_tables.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" | 8 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" |
9 #include "content/browser/dom_storage/session_storage_namespace_impl.h" | 9 #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
10 #include "content/browser/frame_host/navigator.h" | 10 #include "content/browser/frame_host/navigator.h" |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 | 258 |
259 ASSERT_TRUE(message_queue.WaitForMessage(&message)); | 259 ASSERT_TRUE(message_queue.WaitForMessage(&message)); |
260 ASSERT_EQ("evil", message) | 260 ASSERT_EQ("evil", message) |
261 << "Automation message should be received by WebContents."; | 261 << "Automation message should be received by WebContents."; |
262 ASSERT_EQ("\"okay\"", interstitial->last_command()) | 262 ASSERT_EQ("\"okay\"", interstitial->last_command()) |
263 << "Interstitial should not be affected."; | 263 << "Interstitial should not be affected."; |
264 | 264 |
265 // Send a second message from the interstitial page, and make sure that the | 265 // Send a second message from the interstitial page, and make sure that the |
266 // "evil" message doesn't arrive in the intervening period. | 266 // "evil" message doesn't arrive in the intervening period. |
267 ASSERT_TRUE(content::ExecuteScript( | 267 ASSERT_TRUE(content::ExecuteScript( |
268 interstitial_page->GetRenderViewHostForTesting(), | 268 interstitial_page->GetMainFrame(), |
269 "window.domAutomationController.send(\"okay2\");")); | 269 "window.domAutomationController.send(\"okay2\");")); |
270 ASSERT_TRUE(message_queue.WaitForMessage(&message)); | 270 ASSERT_TRUE(message_queue.WaitForMessage(&message)); |
271 ASSERT_EQ("\"okay2\"", message); | 271 ASSERT_EQ("\"okay2\"", message); |
272 ASSERT_EQ("\"okay2\"", interstitial->last_command()); | 272 ASSERT_EQ("\"okay2\"", interstitial->last_command()); |
273 } | 273 } |
274 | 274 |
275 } // namespace content | 275 } // namespace content |
OLD | NEW |