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

Side by Side Diff: Source/platform/weborigin/OriginAccessEntryTest.cpp

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/weborigin/OriginAccessEntry.cpp ('k') | Source/platform/weborigin/Referrer.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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 30
31 #include "config.h" 31 #include "config.h"
32 #include "platform/weborigin/OriginAccessEntry.h" 32 #include "platform/weborigin/OriginAccessEntry.h"
33 33
34 #include "platform/weborigin/KURL.h" 34 #include "platform/weborigin/KURL.h"
35 #include "platform/weborigin/SecurityOrigin.h" 35 #include "platform/weborigin/SecurityOrigin.h"
36 #include "public/platform/Platform.h" 36 #include "public/platform/Platform.h"
37 #include "public/platform/WebPublicSuffixList.h" 37 #include "public/platform/WebPublicSuffixList.h"
38 #include <gtest/gtest.h> 38 #include <gtest/gtest.h>
39 39
40 using WebCore::SecurityOrigin; 40 using blink::SecurityOrigin;
41 using WebCore::OriginAccessEntry; 41 using blink::OriginAccessEntry;
42 42
43 namespace { 43 namespace {
44 44
45 class OriginAccessEntryTestSuffixList : public blink::WebPublicSuffixList { 45 class OriginAccessEntryTestSuffixList : public blink::WebPublicSuffixList {
46 public: 46 public:
47 virtual size_t getPublicSuffixLength(const blink::WebString&) 47 virtual size_t getPublicSuffixLength(const blink::WebString&)
48 { 48 {
49 return 3; // e.g. "com" 49 return 3; // e.g. "com"
50 } 50 }
51 }; 51 };
(...skipping 23 matching lines...) Expand all
75 OriginAccessEntry entry3("http", "com", OriginAccessEntry::AllowSubdomains, OriginAccessEntry::TreatIPAddressAsIPAddress); 75 OriginAccessEntry entry3("http", "com", OriginAccessEntry::AllowSubdomains, OriginAccessEntry::TreatIPAddressAsIPAddress);
76 EXPECT_EQ(OriginAccessEntry::MatchesOrigin, entry1.matchesOrigin(*origin)); 76 EXPECT_EQ(OriginAccessEntry::MatchesOrigin, entry1.matchesOrigin(*origin));
77 EXPECT_EQ(OriginAccessEntry::DoesNotMatchOrigin, entry2.matchesOrigin(*origi n)); 77 EXPECT_EQ(OriginAccessEntry::DoesNotMatchOrigin, entry2.matchesOrigin(*origi n));
78 EXPECT_EQ(OriginAccessEntry::MatchesOriginButIsPublicSuffix, entry3.matchesO rigin(*origin)); 78 EXPECT_EQ(OriginAccessEntry::MatchesOriginButIsPublicSuffix, entry3.matchesO rigin(*origin));
79 79
80 blink::Platform::shutdown(); 80 blink::Platform::shutdown();
81 } 81 }
82 82
83 } // namespace 83 } // namespace
84 84
OLDNEW
« no previous file with comments | « Source/platform/weborigin/OriginAccessEntry.cpp ('k') | Source/platform/weborigin/Referrer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698