| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |