Chromium change: https://chromium.googlesource.com/chromium/src/+/fb432b1ad18bc0654844e147bf089237e97b6cd3 commit fb432b1ad18bc0654844e147bf089237e97b6cd3 Author: Lukasz Anforowicz <lukasza@chromium.org> Date: Wed Sep 8 22:16:13 2021 +0000 Mark ui_test_utils::NavigateToURL as WARN_UNUSED_RESULT. This is step 2 from https://crbug.com/1246568 - it adds WARN_UNUSED_RESULT annotation to ui_test_utils::NavigateToURL to ensure the callers verify if the navigation has succeeded. The CL has to add ASSERT_TRUE in a few places that have already started backsliding since https://crrev.com/c/3140783 and https://crrev.com/c/3149434. Bug: 1246568
21 lines
855 B
C++
21 lines
855 B
C++
/* Copyright (c) 2021 The Brave Authors. All rights reserved.
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "brave/browser/ui/brave_browser.h"
|
|
#include "chrome/browser/ui/tabs/tab_strip_model.h"
|
|
#include "chrome/test/base/in_process_browser_test.h"
|
|
#include "chrome/test/base/ui_test_utils.h"
|
|
#include "content/public/test/browser_test.h"
|
|
|
|
using BraveBrowserBrowserTest = InProcessBrowserTest;
|
|
|
|
IN_PROC_BROWSER_TEST_F(BraveBrowserBrowserTest, NTPFaviconTest) {
|
|
ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), GURL("brave://newtab/")));
|
|
|
|
auto* tab_model = browser()->tab_strip_model();
|
|
EXPECT_FALSE(
|
|
browser()->ShouldDisplayFavicon(tab_model->GetActiveWebContents()));
|
|
}
|