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

Side by Side Diff: third_party/WebKit/Source/web/tests/FrameSerializerTest.cpp

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Opera Software ASA. All rights reserved. 2 * Copyright (c) 2013, Opera Software ASA. 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 break; 172 break;
173 } 173 }
174 } 174 }
175 175
176 if (completeURL.isNull() || !m_rewriteURLs.contains(completeURL)) 176 if (completeURL.isNull() || !m_rewriteURLs.contains(completeURL))
177 return false; 177 return false;
178 178
179 StringBuilder uriBuilder; 179 StringBuilder uriBuilder;
180 uriBuilder.append(m_rewriteFolder); 180 uriBuilder.append(m_rewriteFolder);
181 uriBuilder.append('/'); 181 uriBuilder.append('/');
182 uriBuilder.append(m_rewriteURLs.get(completeURL)); 182 uriBuilder.append(m_rewriteURLs.at(completeURL));
183 rewrittenLink = uriBuilder.toString(); 183 rewrittenLink = uriBuilder.toString();
184 return true; 184 return true;
185 } 185 }
186 186
187 bool shouldSkipResourceWithURL(const KURL& url) { 187 bool shouldSkipResourceWithURL(const KURL& url) {
188 return m_skipURLs.contains(url); 188 return m_skipURLs.contains(url);
189 } 189 }
190 190
191 FrameTestHelpers::WebViewHelper m_helper; 191 FrameTestHelpers::WebViewHelper m_helper;
192 std::string m_folder; 192 std::string m_folder;
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 KURL(ParsedURLString, "http://foo.com?--"))); 554 KURL(ParsedURLString, "http://foo.com?--")));
555 EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D", 555 EXPECT_EQ("saved from url=(0020)http://foo.com/#-%2D",
556 FrameSerializer::markOfTheWebDeclaration( 556 FrameSerializer::markOfTheWebDeclaration(
557 KURL(ParsedURLString, "http://foo.com#--"))); 557 KURL(ParsedURLString, "http://foo.com#--")));
558 EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz", 558 EXPECT_EQ("saved from url=(0026)http://foo.com/#bar-%2Dbaz",
559 FrameSerializer::markOfTheWebDeclaration( 559 FrameSerializer::markOfTheWebDeclaration(
560 KURL(ParsedURLString, "http://foo.com#bar--baz"))); 560 KURL(ParsedURLString, "http://foo.com#bar--baz")));
561 } 561 }
562 562
563 } // namespace blink 563 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebEntities.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698