| 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 4013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4024 TestWillInsertBodyWebFrameClient webFrameClient; | 4024 TestWillInsertBodyWebFrameClient webFrameClient; |
| 4025 FrameTestHelpers::WebViewHelper webViewHelper; | 4025 FrameTestHelpers::WebViewHelper webViewHelper; |
| 4026 webViewHelper.initializeAndLoad(m_baseURL + "clipped-body.html", false, &web
FrameClient); | 4026 webViewHelper.initializeAndLoad(m_baseURL + "clipped-body.html", false, &web
FrameClient); |
| 4027 | 4027 |
| 4028 EXPECT_TRUE(webFrameClient.m_didLoad); | 4028 EXPECT_TRUE(webFrameClient.m_didLoad); |
| 4029 EXPECT_EQ(1, webFrameClient.m_numBodies); | 4029 EXPECT_EQ(1, webFrameClient.m_numBodies); |
| 4030 } | 4030 } |
| 4031 | 4031 |
| 4032 TEST_F(WebFrameTest, EmptyDocument) | 4032 TEST_F(WebFrameTest, EmptyDocument) |
| 4033 { | 4033 { |
| 4034 registerMockedHttpURLLoad("pageserializer/svg/green_rectangle.svg"); | 4034 registerMockedHttpURLLoad("pageserializer/green_rectangle.svg"); |
| 4035 | 4035 |
| 4036 TestWillInsertBodyWebFrameClient webFrameClient; | 4036 TestWillInsertBodyWebFrameClient webFrameClient; |
| 4037 FrameTestHelpers::WebViewHelper webViewHelper; | 4037 FrameTestHelpers::WebViewHelper webViewHelper; |
| 4038 webViewHelper.initialize(false, &webFrameClient); | 4038 webViewHelper.initialize(false, &webFrameClient); |
| 4039 | 4039 |
| 4040 EXPECT_FALSE(webFrameClient.m_didLoad); | 4040 EXPECT_FALSE(webFrameClient.m_didLoad); |
| 4041 EXPECT_EQ(1, webFrameClient.m_numBodies); // The empty document that a new f
rame starts with triggers this. | 4041 EXPECT_EQ(1, webFrameClient.m_numBodies); // The empty document that a new f
rame starts with triggers this. |
| 4042 } | 4042 } |
| 4043 | 4043 |
| 4044 TEST_F(WebFrameTest, MoveCaretSelectionTowardsWindowPointWithNoSelection) | 4044 TEST_F(WebFrameTest, MoveCaretSelectionTowardsWindowPointWithNoSelection) |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4883 | 4883 |
| 4884 FrameTestHelpers::loadFrame(frame, | 4884 FrameTestHelpers::loadFrame(frame, |
| 4885 "javascript:window.frames[1].location.assign('" + m_baseURL + "find.html
')"); | 4885 "javascript:window.frames[1].location.assign('" + m_baseURL + "find.html
')"); |
| 4886 runPendingTasks(); | 4886 runPendingTasks(); |
| 4887 Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests(); | 4887 Platform::current()->unitTestSupport()->serveAsynchronousMockedRequests(); |
| 4888 EXPECT_EQ(client.frame(), iframe); | 4888 EXPECT_EQ(client.frame(), iframe); |
| 4889 EXPECT_FALSE(client.replacesCurrentHistoryItem()); | 4889 EXPECT_FALSE(client.replacesCurrentHistoryItem()); |
| 4890 } | 4890 } |
| 4891 | 4891 |
| 4892 } // namespace | 4892 } // namespace |
| OLD | NEW |