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/browser/renderer_host/render_view_host_browsertest.cc

Issue 2175933002: More aggressive IO asserts in content_browsertests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use 1 less instance of ScopedAllowIO in DumpAccessibilityTestBase::RunTestForPlatform. Created 4 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
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/macros.h" 5 #include "base/macros.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 ASSERT_TRUE(embedded_test_server()->Start()); 80 ASSERT_TRUE(embedded_test_server()->Start());
81 RenderViewHostTestWebContentsObserver observer(shell()->web_contents()); 81 RenderViewHostTestWebContentsObserver observer(shell()->web_contents());
82 82
83 // Base URL is not set if it is the same as the URL. 83 // Base URL is not set if it is the same as the URL.
84 GURL test_url = embedded_test_server()->GetURL("/simple_page.html"); 84 GURL test_url = embedded_test_server()->GetURL("/simple_page.html");
85 NavigateToURL(shell(), test_url); 85 NavigateToURL(shell(), test_url);
86 EXPECT_TRUE(observer.base_url().is_empty()); 86 EXPECT_TRUE(observer.base_url().is_empty());
87 EXPECT_EQ(1, observer.navigation_count()); 87 EXPECT_EQ(1, observer.navigation_count());
88 88
89 // But should be set to the original page when reading MHTML. 89 // But should be set to the original page when reading MHTML.
90 base::FilePath content_test_data_dir; 90 NavigateToURL(shell(), GetTestUrl(nullptr, "google.mht"));
91 ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &content_test_data_dir));
92 test_url = net::FilePathToFileURL(
93 content_test_data_dir.AppendASCII("google.mht"));
94 NavigateToURL(shell(), test_url);
95 EXPECT_EQ("http://www.google.com/", observer.base_url().spec()); 91 EXPECT_EQ("http://www.google.com/", observer.base_url().spec());
96 } 92 }
97 93
98 // This test ensures a RenderFrameHost object is created for the top level frame 94 // This test ensures a RenderFrameHost object is created for the top level frame
99 // in each RenderViewHost. 95 // in each RenderViewHost.
100 IN_PROC_BROWSER_TEST_F(RenderViewHostTest, BasicRenderFrameHost) { 96 IN_PROC_BROWSER_TEST_F(RenderViewHostTest, BasicRenderFrameHost) {
101 ASSERT_TRUE(embedded_test_server()->Start()); 97 ASSERT_TRUE(embedded_test_server()->Start());
102 98
103 GURL test_url = embedded_test_server()->GetURL("/simple_page.html"); 99 GURL test_url = embedded_test_server()->GetURL("/simple_page.html");
104 NavigateToURL(shell(), test_url); 100 NavigateToURL(shell(), test_url);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 158
163 // Do something that causes ipc queues to flush and tasks in 159 // Do something that causes ipc queues to flush and tasks in
164 // flight to complete such that we should have received the ACK. 160 // flight to complete such that we should have received the ACK.
165 NavigateToURL(shell(), test_url); 161 NavigateToURL(shell(), test_url);
166 162
167 // Verify we have the only remaining reference to the namespace. 163 // Verify we have the only remaining reference to the namespace.
168 EXPECT_TRUE(session_namespace->HasOneRef()); 164 EXPECT_TRUE(session_namespace->HasOneRef());
169 } 165 }
170 166
171 } // namespace content 167 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698