| 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 7401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7412 FrameLoadTypeBackForward, item.get(), HistorySameDocumentLoad); | 7412 FrameLoadTypeBackForward, item.get(), HistorySameDocumentLoad); |
| 7413 EXPECT_EQ(WebBackForwardCommit, client.lastCommitType()); | 7413 EXPECT_EQ(WebBackForwardCommit, client.lastCommitType()); |
| 7414 } | 7414 } |
| 7415 | 7415 |
| 7416 class TestHistoryWebFrameClient : public FrameTestHelpers::TestWebFrameClient { | 7416 class TestHistoryWebFrameClient : public FrameTestHelpers::TestWebFrameClient { |
| 7417 public: | 7417 public: |
| 7418 TestHistoryWebFrameClient() { | 7418 TestHistoryWebFrameClient() { |
| 7419 m_replacesCurrentHistoryItem = false; | 7419 m_replacesCurrentHistoryItem = false; |
| 7420 } | 7420 } |
| 7421 | 7421 |
| 7422 void didStartProvisionalLoad(WebDataSource* dataSource, | 7422 void didStartProvisionalLoad(WebLocalFrame* initiatorFrame, |
| 7423 WebDataSource* dataSource, |
| 7423 WebURLRequest& request) { | 7424 WebURLRequest& request) { |
| 7424 m_replacesCurrentHistoryItem = dataSource->replacesCurrentHistoryItem(); | 7425 m_replacesCurrentHistoryItem = dataSource->replacesCurrentHistoryItem(); |
| 7425 } | 7426 } |
| 7426 | 7427 |
| 7427 bool replacesCurrentHistoryItem() { return m_replacesCurrentHistoryItem; } | 7428 bool replacesCurrentHistoryItem() { return m_replacesCurrentHistoryItem; } |
| 7428 | 7429 |
| 7429 private: | 7430 private: |
| 7430 bool m_replacesCurrentHistoryItem; | 7431 bool m_replacesCurrentHistoryItem; |
| 7431 }; | 7432 }; |
| 7432 | 7433 |
| (...skipping 1714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9147 | 9148 |
| 9148 // Manually reset to break WebViewHelper's dependency on the stack allocated | 9149 // Manually reset to break WebViewHelper's dependency on the stack allocated |
| 9149 // TestWebFrameClient. | 9150 // TestWebFrameClient. |
| 9150 reset(); | 9151 reset(); |
| 9151 remoteFrame->close(); | 9152 remoteFrame->close(); |
| 9152 } | 9153 } |
| 9153 | 9154 |
| 9154 class RemoteNavigationClient | 9155 class RemoteNavigationClient |
| 9155 : public FrameTestHelpers::TestWebRemoteFrameClient { | 9156 : public FrameTestHelpers::TestWebRemoteFrameClient { |
| 9156 public: | 9157 public: |
| 9157 void navigate(const WebURLRequest& request, | 9158 void navigate(WebLocalFrame* initiatorFrame, |
| 9159 const WebURLRequest& request, |
| 9158 bool shouldReplaceCurrentEntry) override { | 9160 bool shouldReplaceCurrentEntry) override { |
| 9159 m_lastRequest = request; | 9161 m_lastRequest = request; |
| 9160 } | 9162 } |
| 9161 | 9163 |
| 9162 const WebURLRequest& lastRequest() const { return m_lastRequest; } | 9164 const WebURLRequest& lastRequest() const { return m_lastRequest; } |
| 9163 | 9165 |
| 9164 private: | 9166 private: |
| 9165 WebURLRequest m_lastRequest; | 9167 WebURLRequest m_lastRequest; |
| 9166 }; | 9168 }; |
| 9167 | 9169 |
| (...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10122 | 10124 |
| 10123 class CallbackOrderingWebFrameClient | 10125 class CallbackOrderingWebFrameClient |
| 10124 : public FrameTestHelpers::TestWebFrameClient { | 10126 : public FrameTestHelpers::TestWebFrameClient { |
| 10125 public: | 10127 public: |
| 10126 CallbackOrderingWebFrameClient() : m_callbackCount(0) {} | 10128 CallbackOrderingWebFrameClient() : m_callbackCount(0) {} |
| 10127 | 10129 |
| 10128 void didStartLoading(bool toDifferentDocument) override { | 10130 void didStartLoading(bool toDifferentDocument) override { |
| 10129 EXPECT_EQ(0, m_callbackCount++); | 10131 EXPECT_EQ(0, m_callbackCount++); |
| 10130 FrameTestHelpers::TestWebFrameClient::didStartLoading(toDifferentDocument); | 10132 FrameTestHelpers::TestWebFrameClient::didStartLoading(toDifferentDocument); |
| 10131 } | 10133 } |
| 10132 void didStartProvisionalLoad(WebDataSource*, WebURLRequest&) override { | 10134 void didStartProvisionalLoad(WebLocalFrame* initiatorFrame, |
| 10135 WebDataSource*, |
| 10136 WebURLRequest&) override { |
| 10133 EXPECT_EQ(1, m_callbackCount++); | 10137 EXPECT_EQ(1, m_callbackCount++); |
| 10134 } | 10138 } |
| 10135 void didCommitProvisionalLoad(WebLocalFrame*, | 10139 void didCommitProvisionalLoad(WebLocalFrame*, |
| 10136 const WebHistoryItem&, | 10140 const WebHistoryItem&, |
| 10137 WebHistoryCommitType) override { | 10141 WebHistoryCommitType) override { |
| 10138 EXPECT_EQ(2, m_callbackCount++); | 10142 EXPECT_EQ(2, m_callbackCount++); |
| 10139 } | 10143 } |
| 10140 void didFinishDocumentLoad(WebLocalFrame*) override { | 10144 void didFinishDocumentLoad(WebLocalFrame*) override { |
| 10141 EXPECT_EQ(3, m_callbackCount++); | 10145 EXPECT_EQ(3, m_callbackCount++); |
| 10142 } | 10146 } |
| (...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11499 EXPECT_FALSE(testSelectAll("<textarea></textarea>")); | 11503 EXPECT_FALSE(testSelectAll("<textarea></textarea>")); |
| 11500 EXPECT_TRUE(testSelectAll("<textarea>nonempty</textarea>")); | 11504 EXPECT_TRUE(testSelectAll("<textarea>nonempty</textarea>")); |
| 11501 EXPECT_FALSE(testSelectAll("<input>")); | 11505 EXPECT_FALSE(testSelectAll("<input>")); |
| 11502 EXPECT_TRUE(testSelectAll("<input value='nonempty'>")); | 11506 EXPECT_TRUE(testSelectAll("<input value='nonempty'>")); |
| 11503 // TODO(amaralp): Empty contenteditable should not have select all enabled. | 11507 // TODO(amaralp): Empty contenteditable should not have select all enabled. |
| 11504 EXPECT_TRUE(testSelectAll("<div contenteditable></div>")); | 11508 EXPECT_TRUE(testSelectAll("<div contenteditable></div>")); |
| 11505 EXPECT_TRUE(testSelectAll("<div contenteditable>nonempty</div>")); | 11509 EXPECT_TRUE(testSelectAll("<div contenteditable>nonempty</div>")); |
| 11506 } | 11510 } |
| 11507 | 11511 |
| 11508 } // namespace blink | 11512 } // namespace blink |
| OLD | NEW |