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

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

Issue 2657443005: Migrate WTF::HashSet::add() to ::insert() [part 1 of N] (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/wtf/HashSet.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) 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 11128 matching lines...) Expand 10 before | Expand all | Expand 10 after
11139 11139
11140 TEST_F(WebFrameTest, UniqueNames) { 11140 TEST_F(WebFrameTest, UniqueNames) {
11141 registerMockedHttpURLLoad("frameset-repeated-name.html"); 11141 registerMockedHttpURLLoad("frameset-repeated-name.html");
11142 registerMockedHttpURLLoad("frameset-dest.html"); 11142 registerMockedHttpURLLoad("frameset-dest.html");
11143 FrameTestHelpers::WebViewHelper webViewHelper; 11143 FrameTestHelpers::WebViewHelper webViewHelper;
11144 webViewHelper.initializeAndLoad(m_baseURL + "frameset-repeated-name.html"); 11144 webViewHelper.initializeAndLoad(m_baseURL + "frameset-repeated-name.html");
11145 Frame* mainFrame = webViewHelper.webView()->mainFrameImpl()->frame(); 11145 Frame* mainFrame = webViewHelper.webView()->mainFrameImpl()->frame();
11146 HashSet<AtomicString> names; 11146 HashSet<AtomicString> names;
11147 for (Frame* frame = mainFrame->tree().firstChild(); frame; 11147 for (Frame* frame = mainFrame->tree().firstChild(); frame;
11148 frame = frame->tree().traverseNext()) { 11148 frame = frame->tree().traverseNext()) {
11149 EXPECT_TRUE(names.add(frame->tree().uniqueName()).isNewEntry); 11149 EXPECT_TRUE(names.insert(frame->tree().uniqueName()).isNewEntry);
11150 } 11150 }
11151 EXPECT_EQ(10u, names.size()); 11151 EXPECT_EQ(10u, names.size());
11152 } 11152 }
11153 11153
11154 TEST_F(WebFrameTest, NoLoadingCompletionCallbacksInDetach) { 11154 TEST_F(WebFrameTest, NoLoadingCompletionCallbacksInDetach) {
11155 class LoadingObserverFrameClient 11155 class LoadingObserverFrameClient
11156 : public FrameTestHelpers::TestWebFrameClient { 11156 : public FrameTestHelpers::TestWebFrameClient {
11157 public: 11157 public:
11158 void frameDetached(WebLocalFrame*, DetachType) override { 11158 void frameDetached(WebLocalFrame*, DetachType) override {
11159 m_didCallFrameDetached = true; 11159 m_didCallFrameDetached = true;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
11237 11237
11238 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached()); 11238 EXPECT_TRUE(mainFrameClient.childClient().didCallFrameDetached());
11239 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading()); 11239 EXPECT_TRUE(mainFrameClient.childClient().didCallDidStopLoading());
11240 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad()); 11240 EXPECT_TRUE(mainFrameClient.childClient().didCallDidFinishDocumentLoad());
11241 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents()); 11241 EXPECT_TRUE(mainFrameClient.childClient().didCallDidHandleOnloadEvents());
11242 11242
11243 webViewHelper.reset(); 11243 webViewHelper.reset();
11244 } 11244 }
11245 11245
11246 } // namespace blink 11246 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/wtf/HashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698