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

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

Issue 1419293005: Add assertions that the empty Platform::cryptographicallyRandomValues() overrides are not being use… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to RELEASE_ASSERT and use base::RandBytes() in Chromium. Created 5 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
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 }; 56 };
57 57
58 class OriginAccessEntryTestPlatform : public blink::Platform { 58 class OriginAccessEntryTestPlatform : public blink::Platform {
59 public: 59 public:
60 blink::WebPublicSuffixList* publicSuffixList() override 60 blink::WebPublicSuffixList* publicSuffixList() override
61 { 61 {
62 return &m_suffixList; 62 return &m_suffixList;
63 } 63 }
64 64
65 // Stub for pure virtual method. 65 // Stub for pure virtual method.
66 void cryptographicallyRandomValues(unsigned char*, size_t) override { ASSERT _NOT_REACHED(); } 66 void cryptographicallyRandomValues(unsigned char*, size_t) override
67 {
68 RELEASE_ASSERT_NOT_REACHED();
69 }
67 70
68 void setPublicSuffix(const blink::WebString& suffix) 71 void setPublicSuffix(const blink::WebString& suffix)
69 { 72 {
70 m_suffixList.setPublicSuffix(suffix); 73 m_suffixList.setPublicSuffix(suffix);
71 } 74 }
72 75
73 private: 76 private:
74 OriginAccessEntryTestSuffixList m_suffixList; 77 OriginAccessEntryTestSuffixList m_suffixList;
75 }; 78 };
76 79
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 310
308 OriginAccessEntry entry2(test.protocol, test.host, OriginAccessEntry::Di sallowSubdomains); 311 OriginAccessEntry entry2(test.protocol, test.host, OriginAccessEntry::Di sallowSubdomains);
309 EXPECT_EQ(test.expected, entry2.matchesOrigin(*originToTest)); 312 EXPECT_EQ(test.expected, entry2.matchesOrigin(*originToTest));
310 } 313 }
311 314
312 Platform::shutdown(); 315 Platform::shutdown();
313 } 316 }
314 317
315 } // namespace blink 318 } // namespace blink
316 319
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/RunAllTests.cpp ('k') | third_party/WebKit/Source/web/ImageDecodeBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698