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

Side by Side Diff: content/renderer/render_view_browsertest.cc

Issue 1259253009: Revert of Attach a SecurityStyle to each request in ResourceLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « content/common/ssl_status_serialization_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 1935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1946 EXPECT_TRUE(view()->main_render_frame_); 1946 EXPECT_TRUE(view()->main_render_frame_);
1947 } 1947 }
1948 1948
1949 TEST_F(RenderViewImplTest, GetSSLStatusOfFrame) { 1949 TEST_F(RenderViewImplTest, GetSSLStatusOfFrame) {
1950 LoadHTML("<!DOCTYPE html><html><body></body></html>"); 1950 LoadHTML("<!DOCTYPE html><html><body></body></html>");
1951 1951
1952 WebLocalFrame* frame = GetMainFrame(); 1952 WebLocalFrame* frame = GetMainFrame();
1953 SSLStatus ssl_status = view()->GetSSLStatusOfFrame(frame); 1953 SSLStatus ssl_status = view()->GetSSLStatusOfFrame(frame);
1954 EXPECT_FALSE(net::IsCertStatusError(ssl_status.cert_status)); 1954 EXPECT_FALSE(net::IsCertStatusError(ssl_status.cert_status));
1955 1955
1956 SSLStatus status; 1956 const_cast<blink::WebURLResponse&>(frame->dataSource()->response()).
1957 status.cert_status = net::CERT_STATUS_ALL_ERRORS; 1957 setSecurityInfo(
1958 const_cast<blink::WebURLResponse&>(frame->dataSource()->response()) 1958 SerializeSecurityInfo(0, net::CERT_STATUS_ALL_ERRORS, 0, 0,
1959 .setSecurityInfo(SerializeSecurityInfo(status)); 1959 SignedCertificateTimestampIDStatusList()));
1960 ssl_status = view()->GetSSLStatusOfFrame(frame); 1960 ssl_status = view()->GetSSLStatusOfFrame(frame);
1961 EXPECT_TRUE(net::IsCertStatusError(ssl_status.cert_status)); 1961 EXPECT_TRUE(net::IsCertStatusError(ssl_status.cert_status));
1962 } 1962 }
1963 1963
1964 TEST_F(RenderViewImplTest, MessageOrderInDidChangeSelection) { 1964 TEST_F(RenderViewImplTest, MessageOrderInDidChangeSelection) {
1965 view()->set_send_content_state_immediately(true); 1965 view()->set_send_content_state_immediately(true);
1966 LoadHTML("<textarea id=\"test\"></textarea>"); 1966 LoadHTML("<textarea id=\"test\"></textarea>");
1967 1967
1968 view()->handling_input_event_ = true; 1968 view()->handling_input_event_ = true;
1969 ExecuteJavaScriptForTests("document.getElementById('test').focus();"); 1969 ExecuteJavaScriptForTests("document.getElementById('test').focus();");
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
2382 FROM_HERE, 2382 FROM_HERE,
2383 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this))); 2383 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this)));
2384 ExecuteJavaScriptForTests("debugger;"); 2384 ExecuteJavaScriptForTests("debugger;");
2385 2385
2386 // CloseWhilePaused should resume execution and continue here. 2386 // CloseWhilePaused should resume execution and continue here.
2387 EXPECT_FALSE(IsPaused()); 2387 EXPECT_FALSE(IsPaused());
2388 Detach(); 2388 Detach();
2389 } 2389 }
2390 2390
2391 } // namespace content 2391 } // namespace content
OLDNEW
« no previous file with comments | « content/common/ssl_status_serialization_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698