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

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

Issue 1244863003: Attach a SecurityStyle to each request in ResourceLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unit test fixes Created 5 years, 5 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 "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 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after
1918 EXPECT_TRUE(view()->main_render_frame_); 1918 EXPECT_TRUE(view()->main_render_frame_);
1919 } 1919 }
1920 1920
1921 TEST_F(RenderViewImplTest, GetSSLStatusOfFrame) { 1921 TEST_F(RenderViewImplTest, GetSSLStatusOfFrame) {
1922 LoadHTML("<!DOCTYPE html><html><body></body></html>"); 1922 LoadHTML("<!DOCTYPE html><html><body></body></html>");
1923 1923
1924 WebLocalFrame* frame = GetMainFrame(); 1924 WebLocalFrame* frame = GetMainFrame();
1925 SSLStatus ssl_status = view()->GetSSLStatusOfFrame(frame); 1925 SSLStatus ssl_status = view()->GetSSLStatusOfFrame(frame);
1926 EXPECT_FALSE(net::IsCertStatusError(ssl_status.cert_status)); 1926 EXPECT_FALSE(net::IsCertStatusError(ssl_status.cert_status));
1927 1927
1928 const_cast<blink::WebURLResponse&>(frame->dataSource()->response()). 1928 SSLStatus status;
1929 setSecurityInfo( 1929 status.cert_status = net::CERT_STATUS_ALL_ERRORS;
1930 SerializeSecurityInfo(0, net::CERT_STATUS_ALL_ERRORS, 0, 0, 1930 const_cast<blink::WebURLResponse&>(frame->dataSource()->response())
1931 SignedCertificateTimestampIDStatusList())); 1931 .setSecurityInfo(SerializeSecurityInfo(status));
1932 ssl_status = view()->GetSSLStatusOfFrame(frame); 1932 ssl_status = view()->GetSSLStatusOfFrame(frame);
1933 EXPECT_TRUE(net::IsCertStatusError(ssl_status.cert_status)); 1933 EXPECT_TRUE(net::IsCertStatusError(ssl_status.cert_status));
1934 } 1934 }
1935 1935
1936 TEST_F(RenderViewImplTest, MessageOrderInDidChangeSelection) { 1936 TEST_F(RenderViewImplTest, MessageOrderInDidChangeSelection) {
1937 view()->set_send_content_state_immediately(true); 1937 view()->set_send_content_state_immediately(true);
1938 LoadHTML("<textarea id=\"test\"></textarea>"); 1938 LoadHTML("<textarea id=\"test\"></textarea>");
1939 1939
1940 view()->handling_input_event_ = true; 1940 view()->handling_input_event_ = true;
1941 ExecuteJavaScript("document.getElementById('test').focus();"); 1941 ExecuteJavaScript("document.getElementById('test').focus();");
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
2352 FROM_HERE, 2352 FROM_HERE,
2353 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this))); 2353 base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this)));
2354 ExecuteJavaScript("debugger;"); 2354 ExecuteJavaScript("debugger;");
2355 2355
2356 // CloseWhilePaused should resume execution and continue here. 2356 // CloseWhilePaused should resume execution and continue here.
2357 EXPECT_FALSE(IsPaused()); 2357 EXPECT_FALSE(IsPaused());
2358 Detach(); 2358 Detach();
2359 } 2359 }
2360 2360
2361 } // namespace content 2361 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698