| Index: content/browser/resource_loading_browsertest.cc
|
| diff --git a/content/browser/resource_loading_browsertest.cc b/content/browser/resource_loading_browsertest.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ef13d9c68c7f4f0414deb46b7f021c4b02300103
|
| --- /dev/null
|
| +++ b/content/browser/resource_loading_browsertest.cc
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include <stdlib.h>
|
| +
|
| +#include "content/public/test/browser_test_utils.h"
|
| +#include "content/public/test/content_browser_test.h"
|
| +#include "content/public/test/content_browser_test_utils.h"
|
| +#include "content/public/test/test_navigation_observer.h"
|
| +#include "content/shell/browser/shell.h"
|
| +
|
| +namespace content {
|
| +
|
| +class ResourceLoadingBrowserTest : public ContentBrowserTest {
|
| +};
|
| +
|
| +const char kResourceLoadingNonMobilePage[] =
|
| + "files/resource_loading/resource_loading_non_mobile.html";
|
| +IN_PROC_BROWSER_TEST_F(ResourceLoadingBrowserTest,
|
| + ResourceLoadingAvoidDoubleDownloads) {
|
| + ASSERT_TRUE(test_server()->Start());
|
| + GURL url = test_server()->GetURL(kResourceLoadingNonMobilePage);
|
| + NavigateToURL(shell(), url);
|
| + int data = -1;
|
| + EXPECT_TRUE(ExecuteScriptAndExtractInt(shell()->web_contents(),
|
| + "getResourceNumber()", &data));
|
| + EXPECT_EQ(1, data);
|
| +}
|
| +
|
| +} // namespace content
|
| +
|
|
|