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

Side by Side Diff: content/browser/security_exploit_browsertest.cc

Issue 789703004: Reflect the status of a request for accessing a blacklisted url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
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
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
OLDNEW
« no previous file with comments | « content/browser/frame_host/interstitial_page_impl.cc ('k') | content/browser/web_contents/web_contents_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698