Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: chrome/browser/ui/chrome_pages_unittest.cc

Issue 2034573002: [Cleanup] Factor out common code. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wherein we relearn that "commit -a" doesn't add new files. Created 4 years, 6 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
(Empty)
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 #include "chrome/browser/ui/chrome_pages.h"
5
6 #include "chrome/common/url_constants.h"
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 TEST(ChromePagesTest, IsInternalPage) {
10 EXPECT_TRUE(chrome::IsInternalPage(GURL(chrome::kChromeUIDownloadsURL)));
11 EXPECT_TRUE(chrome::IsInternalPage(GURL(chrome::kChromeUIHistoryURL)));
12 EXPECT_TRUE(chrome::IsInternalPage(GURL(chrome::kChromeUINewTabURL)));
13 EXPECT_TRUE(chrome::IsInternalPage(GURL(chrome::kChromeUISettingsURL)));
14
15 // Debugging URLs are not included.
16 #if defined(OS_CHROMEOS)
17 EXPECT_FALSE(chrome::IsInternalPage(GURL(chrome::kChromeUIDiscardsURL)));
18 #endif
19 EXPECT_FALSE(
20 chrome::IsInternalPage(GURL(chrome::kChromeUINetInternalsURL)));
21
22 // Prefix matches are included.
23 EXPECT_TRUE(
24 chrome::IsInternalPage(GURL("chrome://settings/fakeSetting")));
25 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698