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

Side by Side Diff: Source/core/loader/MixedContentCheckerTest.cpp

Issue 666593002: Convert ARRAYSIZE_UNSAFE -> arraysize. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | Source/platform/weborigin/DatabaseIdentifierTest.cpp » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "config.h" 5 #include "config.h"
6 #include "core/loader/MixedContentChecker.h" 6 #include "core/loader/MixedContentChecker.h"
7 7
8 #include "platform/weborigin/KURL.h" 8 #include "platform/weborigin/KURL.h"
9 #include "platform/weborigin/SecurityOrigin.h" 9 #include "platform/weborigin/SecurityOrigin.h"
10 #include "wtf/RefPtr.h" 10 #include "wtf/RefPtr.h"
(...skipping 13 matching lines...) Expand all
24 {"http://example.com/foo", "http://example.com/foo", false}, 24 {"http://example.com/foo", "http://example.com/foo", false},
25 {"http://example.com/foo", "https://example.com/foo", false}, 25 {"http://example.com/foo", "https://example.com/foo", false},
26 {"https://example.com/foo", "https://example.com/foo", false}, 26 {"https://example.com/foo", "https://example.com/foo", false},
27 {"https://example.com/foo", "wss://example.com/foo", false}, 27 {"https://example.com/foo", "wss://example.com/foo", false},
28 {"https://example.com/foo", "http://example.com/foo", true}, 28 {"https://example.com/foo", "http://example.com/foo", true},
29 {"https://example.com/foo", "http://google.com/foo", true}, 29 {"https://example.com/foo", "http://google.com/foo", true},
30 {"https://example.com/foo", "ws://example.com/foo", true}, 30 {"https://example.com/foo", "ws://example.com/foo", true},
31 {"https://example.com/foo", "ws://google.com/foo", true}, 31 {"https://example.com/foo", "ws://google.com/foo", true},
32 }; 32 };
33 33
34 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) { 34 for (size_t i = 0; i < arraysize(cases); ++i) {
35 const char* origin = cases[i].origin; 35 const char* origin = cases[i].origin;
36 const char* target = cases[i].target; 36 const char* target = cases[i].target;
37 bool expectation = cases[i].expectation; 37 bool expectation = cases[i].expectation;
38 38
39 KURL originUrl(KURL(), origin); 39 KURL originUrl(KURL(), origin);
40 RefPtr<SecurityOrigin> securityOrigin(SecurityOrigin::create(originUrl)) ; 40 RefPtr<SecurityOrigin> securityOrigin(SecurityOrigin::create(originUrl)) ;
41 KURL targetUrl(KURL(), target); 41 KURL targetUrl(KURL(), target);
42 EXPECT_EQ(expectation, MixedContentChecker::isMixedContent(securityOrigi n.get(), targetUrl)) << "Origin: " << origin << ", Target: " << target << ", Exp ectation: " << expectation; 42 EXPECT_EQ(expectation, MixedContentChecker::isMixedContent(securityOrigi n.get(), targetUrl)) << "Origin: " << origin << ", Target: " << target << ", Exp ectation: " << expectation;
43 } 43 }
44 } 44 }
45 45
46 } // namespace blink 46 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/platform/weborigin/DatabaseIdentifierTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698