
The canonical bug format is TODO(crbug.com/<id>). TODOs of the following forms will all be migrated to the new format: - TODO(crbug.com/<old id>) - TODO(https://crbug.com/<old id>) - TODO(crbug/<old id>) - TODO(crbug/monorail/<old id>) - TODO(<old id>) - TODO(issues.chromium.org/<old id>) - TODO(https://issues.chromium.org/<old id>) - TODO(https://issues.chromium.org/u/1/issues/<old id>) - TODO(bugs.chromium.org/<old id>) Bug id mapping is sourced from go/chrome-on-buganizer-prod-issues. See go/crbug-todo-migration for details. #crbug-todo-migration Bug: b/321899722 Change-Id: Ifd155bbeff882ea939f74cf8b8f847f42847940b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5468156 Reviewed-by: Darryl James <dljames@chromium.org> Owners-Override: Alison Gale <agale@chromium.org> Commit-Queue: Alison Gale <agale@chromium.org> Cr-Commit-Position: refs/heads/main@{#1290297}
44 lines
1.5 KiB
C++
44 lines
1.5 KiB
C++
// Copyright 2015 The Chromium Authors
|
|
// 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.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[] =
|
|
"/resource_loading/resource_loading_non_mobile.html";
|
|
|
|
// TODO(crbug.com/40850567): Flaky on Android.
|
|
#if BUILDFLAG(IS_ANDROID)
|
|
#define MAYBE_ResourceLoadingAvoidDoubleDownloads \
|
|
DISABLED_ResourceLoadingAvoidDoubleDownloads
|
|
#else
|
|
#define MAYBE_ResourceLoadingAvoidDoubleDownloads \
|
|
ResourceLoadingAvoidDoubleDownloads
|
|
#endif
|
|
IN_PROC_BROWSER_TEST_F(ResourceLoadingBrowserTest,
|
|
MAYBE_ResourceLoadingAvoidDoubleDownloads) {
|
|
ASSERT_TRUE(embedded_test_server()->Start());
|
|
GURL url = embedded_test_server()->GetURL(kResourceLoadingNonMobilePage);
|
|
EXPECT_TRUE(NavigateToURL(shell(), url));
|
|
int resourceNumber = EvalJs(shell(), "getResourceNumber()").ExtractInt();
|
|
// Hacky way to get the flaky extra resource timing entry content to logs.
|
|
if (resourceNumber != 9) {
|
|
EXPECT_EQ("", EvalJs(shell(), "getResources()"));
|
|
}
|
|
EXPECT_EQ(9, resourceNumber);
|
|
}
|
|
|
|
} // namespace content
|