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

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

Issue 2671933002: Migrate WTF::HashMap::add() to ::insert() (Closed)
Patch Set: rebase, add TODOs 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 10462 matching lines...) Expand 10 before | Expand all | Expand 10 after
10473 TestResourcePriorityWebFrameClient() {} 10473 TestResourcePriorityWebFrameClient() {}
10474 10474
10475 void willSendRequest(WebLocalFrame*, WebURLRequest& request) override { 10475 void willSendRequest(WebLocalFrame*, WebURLRequest& request) override {
10476 ExpectedRequest* expectedRequest = m_expectedRequests.get(request.url()); 10476 ExpectedRequest* expectedRequest = m_expectedRequests.get(request.url());
10477 DCHECK(expectedRequest); 10477 DCHECK(expectedRequest);
10478 EXPECT_EQ(expectedRequest->priority, request.getPriority()); 10478 EXPECT_EQ(expectedRequest->priority, request.getPriority());
10479 expectedRequest->seen = true; 10479 expectedRequest->seen = true;
10480 } 10480 }
10481 10481
10482 void addExpectedRequest(const KURL& url, WebURLRequest::Priority priority) { 10482 void addExpectedRequest(const KURL& url, WebURLRequest::Priority priority) {
10483 m_expectedRequests.add(url, 10483 m_expectedRequests.insert(url,
10484 WTF::makeUnique<ExpectedRequest>(url, priority)); 10484 WTF::makeUnique<ExpectedRequest>(url, priority));
10485 } 10485 }
10486 10486
10487 void verifyAllRequests() { 10487 void verifyAllRequests() {
10488 for (const auto& request : m_expectedRequests) 10488 for (const auto& request : m_expectedRequests)
10489 EXPECT_TRUE(request.value->seen); 10489 EXPECT_TRUE(request.value->seen);
10490 } 10490 }
10491 10491
10492 private: 10492 private:
10493 HashMap<KURL, std::unique_ptr<ExpectedRequest>> m_expectedRequests; 10493 HashMap<KURL, std::unique_ptr<ExpectedRequest>> m_expectedRequests;
10494 }; 10494 };
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
11257 11257
11258 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); 11258 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached());
11259 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); 11259 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading());
11260 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); 11260 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad());
11261 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); 11261 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents());
11262 11262
11263 webViewHelper.reset(); 11263 webViewHelper.reset();
11264 } 11264 }
11265 11265
11266 } // namespace blink 11266 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/FrameSerializerTest.cpp ('k') | third_party/WebKit/Source/web/tests/sim/SimNetwork.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698