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

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

Issue 2321503002: (Re-)introduce AncestorThrottle to handle 'X-Frame-Options'. (Closed)
Patch Set: Ugh. Created 4 years, 3 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/site_per_process_browsertest.h" 5 #include "content/browser/site_per_process_browsertest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 6469 matching lines...) Expand 10 before | Expand all | Expand 10 after
6480 TestNavigationObserver load_observer(shell()->web_contents()); 6480 TestNavigationObserver load_observer(shell()->web_contents());
6481 EXPECT_TRUE(ExecuteScript(shell(), "frames[0].location.href = '" + 6481 EXPECT_TRUE(ExecuteScript(shell(), "frames[0].location.href = '" +
6482 blocked_urls[i].spec() + "';")); 6482 blocked_urls[i].spec() + "';"));
6483 load_observer.Wait(); 6483 load_observer.Wait();
6484 6484
6485 // The blocked frame's origin should become unique. 6485 // The blocked frame's origin should become unique.
6486 EXPECT_EQ("null", root->child_at(0)->current_origin().Serialize()); 6486 EXPECT_EQ("null", root->child_at(0)->current_origin().Serialize());
6487 6487
6488 // Ensure that we don't use the blocked URL as the blocked frame's last 6488 // Ensure that we don't use the blocked URL as the blocked frame's last
6489 // committed URL (see https://crbug.com/622385). 6489 // committed URL (see https://crbug.com/622385).
6490 EXPECT_NE(root->child_at(0)->current_frame_host()->GetLastCommittedURL(), 6490 EXPECT_NE(root->child_at(0)->current_frame_host()->last_successful_url(),
6491 blocked_urls[i]); 6491 blocked_urls[i]);
6492 6492
6493 // The blocked frame should still fire a load event in its parent's process. 6493 // The blocked frame should still fire a load event in its parent's process.
6494 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); 6494 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
6495 6495
6496 // Check that the current RenderFrameHost has stopped loading. 6496 // Check that the current RenderFrameHost has stopped loading.
6497 EXPECT_FALSE(root->child_at(0)->current_frame_host()->is_loading()); 6497 EXPECT_FALSE(root->child_at(0)->current_frame_host()->is_loading());
6498 6498
6499 // The blocked navigation should behave like an empty 200 response. Make 6499 // The blocked navigation should behave like an empty 200 response. Make
6500 // sure that the frame's document.title is empty: this double-checks both 6500 // sure that the frame's document.title is empty: this double-checks both
(...skipping 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
7978 " Site A ------------ proxies for B C\n" 7978 " Site A ------------ proxies for B C\n"
7979 " +--Site B ------- proxies for A C\n" 7979 " +--Site B ------- proxies for A C\n"
7980 " +--Site C -- proxies for A B\n" 7980 " +--Site C -- proxies for A B\n"
7981 "Where A = http://a.com/\n" 7981 "Where A = http://a.com/\n"
7982 " B = http://b.com/\n" 7982 " B = http://b.com/\n"
7983 " C = http://c.com/", 7983 " C = http://c.com/",
7984 DepictFrameTree(root)); 7984 DepictFrameTree(root));
7985 } 7985 }
7986 7986
7987 } // namespace content 7987 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698