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

Side by Side Diff: chrome/renderer/content_settings_observer_unittest.cc

Issue 63273002: Rename WebKit namespace to blink (part 4) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/content_settings_observer.cc ('k') | chrome/renderer/extensions/app_bindings.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/content_settings_observer.h" 5 #include "chrome/renderer/content_settings_observer.h"
6 6
7 #include "chrome/common/url_constants.h" 7 #include "chrome/common/url_constants.h"
8 #include "content/public/common/url_constants.h" 8 #include "content/public/common/url_constants.h"
9 #include "extensions/common/constants.h" 9 #include "extensions/common/constants.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" 11 #include "third_party/WebKit/public/web/WebSecurityOrigin.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 using WebKit::WebSecurityOrigin; 14 using blink::WebSecurityOrigin;
15 15
16 typedef testing::Test ContentSettingsObserverTest; 16 typedef testing::Test ContentSettingsObserverTest;
17 17
18 TEST_F(ContentSettingsObserverTest, WhitelistedSchemes) { 18 TEST_F(ContentSettingsObserverTest, WhitelistedSchemes) {
19 std::string end_url = ":something"; 19 std::string end_url = ":something";
20 20
21 GURL chrome_ui_url = 21 GURL chrome_ui_url =
22 GURL(std::string(chrome::kChromeUIScheme).append(end_url)); 22 GURL(std::string(chrome::kChromeUIScheme).append(end_url));
23 EXPECT_TRUE(ContentSettingsObserver::IsWhitelistedForContentSettings( 23 EXPECT_TRUE(ContentSettingsObserver::IsWhitelistedForContentSettings(
24 WebSecurityOrigin::create(chrome_ui_url), 24 WebSecurityOrigin::create(chrome_ui_url),
(...skipping 24 matching lines...) Expand all
49 EXPECT_FALSE(ContentSettingsObserver::IsWhitelistedForContentSettings( 49 EXPECT_FALSE(ContentSettingsObserver::IsWhitelistedForContentSettings(
50 WebSecurityOrigin::create(file_url), 50 WebSecurityOrigin::create(file_url),
51 GURL("file:///dir/file"))); 51 GURL("file:///dir/file")));
52 52
53 GURL http_url = 53 GURL http_url =
54 GURL("http://server.com/path"); 54 GURL("http://server.com/path");
55 EXPECT_FALSE(ContentSettingsObserver::IsWhitelistedForContentSettings( 55 EXPECT_FALSE(ContentSettingsObserver::IsWhitelistedForContentSettings(
56 WebSecurityOrigin::create(http_url), 56 WebSecurityOrigin::create(http_url),
57 GURL())); 57 GURL()));
58 } 58 }
OLDNEW
« no previous file with comments | « chrome/renderer/content_settings_observer.cc ('k') | chrome/renderer/extensions/app_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698