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

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

Issue 114883002: Remove chrome-internal scheme, chrome::kChromeInternalScheme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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') | content/common/url_schemes.cc » ('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"
(...skipping 18 matching lines...) Expand all
29 EXPECT_TRUE(ContentSettingsObserver::IsWhitelistedForContentSettings( 29 EXPECT_TRUE(ContentSettingsObserver::IsWhitelistedForContentSettings(
30 WebSecurityOrigin::create(chrome_dev_tools_url), 30 WebSecurityOrigin::create(chrome_dev_tools_url),
31 GURL())); 31 GURL()));
32 32
33 GURL extension_url = 33 GURL extension_url =
34 GURL(std::string(extensions::kExtensionScheme).append(end_url)); 34 GURL(std::string(extensions::kExtensionScheme).append(end_url));
35 EXPECT_TRUE(ContentSettingsObserver::IsWhitelistedForContentSettings( 35 EXPECT_TRUE(ContentSettingsObserver::IsWhitelistedForContentSettings(
36 WebSecurityOrigin::create(extension_url), 36 WebSecurityOrigin::create(extension_url),
37 GURL())); 37 GURL()));
38 38
39 GURL chrome_internal_url =
40 GURL(std::string(chrome::kChromeInternalScheme).append(end_url));
41 EXPECT_TRUE(ContentSettingsObserver::IsWhitelistedForContentSettings(
42 WebSecurityOrigin::create(chrome_internal_url),
43 GURL()));
44
45 GURL file_url("file:///dir/"); 39 GURL file_url("file:///dir/");
46 EXPECT_TRUE(ContentSettingsObserver::IsWhitelistedForContentSettings( 40 EXPECT_TRUE(ContentSettingsObserver::IsWhitelistedForContentSettings(
47 WebSecurityOrigin::create(file_url), 41 WebSecurityOrigin::create(file_url),
48 GURL("file:///dir/"))); 42 GURL("file:///dir/")));
49 EXPECT_FALSE(ContentSettingsObserver::IsWhitelistedForContentSettings( 43 EXPECT_FALSE(ContentSettingsObserver::IsWhitelistedForContentSettings(
50 WebSecurityOrigin::create(file_url), 44 WebSecurityOrigin::create(file_url),
51 GURL("file:///dir/file"))); 45 GURL("file:///dir/file")));
52 46
53 GURL http_url = 47 GURL http_url =
54 GURL("http://server.com/path"); 48 GURL("http://server.com/path");
55 EXPECT_FALSE(ContentSettingsObserver::IsWhitelistedForContentSettings( 49 EXPECT_FALSE(ContentSettingsObserver::IsWhitelistedForContentSettings(
56 WebSecurityOrigin::create(http_url), 50 WebSecurityOrigin::create(http_url),
57 GURL())); 51 GURL()));
58 } 52 }
OLDNEW
« no previous file with comments | « chrome/renderer/content_settings_observer.cc ('k') | content/common/url_schemes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698