// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/functional/bind.h" #include "content/browser/web_contents/web_contents_impl.h" #include "content/public/browser/web_contents.h" #include "content/public/test/browser_test.h" #include "content/public/test/content_browser_test.h" #include "content/public/test/content_browser_test_utils.h" #include "content/public/test/url_loader_interceptor.h" #include "content/shell/browser/shell.h" #include "net/http/http_util.h" #include "net/test/embedded_test_server/embedded_test_server.h" namespace content { namespace { constexpr char kAsyncScriptThatAbortsOnEndPage[] = …; constexpr char k400AbortOnEndUrl[] = …; bool AbortOnEndInterceptor(URLLoaderInterceptor::RequestParams* params) { … } } // namespace WebKitBrowserTest; // This is a browser test because it is hard to reproduce reliably in a // web test without races. http://crbug.com/75604 deals with a request // for an async script which gets data in the response and immediately // after aborts. This test creates that condition, and it is passed // if chrome does not crash. IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, AbortOnEnd) { … } // This is a browser test because the test_runner framework holds // onto a Document* reference that blocks this reproduction from // destroying the Document, so it is not a use after free unless // you don't have test_runner loaded. // TODO(gavinp): remove this browser_test if we can get good web test // coverage of the same issue. const char kXsltBadImportPage[] = …; IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, XsltBadImport) { … } // This is a content_browsertests because the purpose of this test is to ensure // that content_shell does not crash when <link rel=prerender> elements are // encountered with no prerendering (NoStatePrefetch) implementation supplied by // embedders. IN_PROC_BROWSER_TEST_F(WebKitBrowserTest, PrerenderNoCrash) { … } } // namespace content