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

Side by Side Diff: chrome/browser/ui/webui/settings/md_settings_ui_unittest.cc

Issue 2919663002: MD Settings: change how valid origins are checked and tested (Closed)
Patch Set: move md_settings_ui_unittest.cc in chrome/test/BUILD.gn Created 3 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
« no previous file with comments | « chrome/browser/ui/webui/settings/md_settings_ui_browsertest.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 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
5 #include "chrome/browser/ui/webui/settings/md_settings_ui.h"
6
7 #include "chrome/common/url_constants.h"
8 #include "content/public/common/url_constants.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "url/gurl.h"
11
12 TEST(MdSettingsUITest, IsValidOrigin) {
13 EXPECT_TRUE(settings::IsValidOrigin(GURL(chrome::kChromeUISettingsURL)));
14 EXPECT_TRUE(settings::IsValidOrigin(GURL(chrome::kChromeUIMdSettingsURL)));
15
16 EXPECT_FALSE(settings::IsValidOrigin(GURL("http://evil.com")));
17 EXPECT_FALSE(settings::IsValidOrigin(GURL("https://google.com")));
18 EXPECT_FALSE(settings::IsValidOrigin(GURL(chrome::kChromeUINewTabURL)));
19 EXPECT_FALSE(settings::IsValidOrigin(GURL(chrome::kChromeUIHistoryURL)));
20 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/md_settings_ui_browsertest.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698