| 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 3983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3994 TestWillInsertBodyWebFrameClient webFrameClient; | 3994 TestWillInsertBodyWebFrameClient webFrameClient; |
| 3995 FrameTestHelpers::WebViewHelper webViewHelper; | 3995 FrameTestHelpers::WebViewHelper webViewHelper; |
| 3996 webViewHelper.initializeAndLoad(m_baseURL + "clipped-body.html", false, &web
FrameClient); | 3996 webViewHelper.initializeAndLoad(m_baseURL + "clipped-body.html", false, &web
FrameClient); |
| 3997 | 3997 |
| 3998 EXPECT_TRUE(webFrameClient.m_didLoad); | 3998 EXPECT_TRUE(webFrameClient.m_didLoad); |
| 3999 EXPECT_EQ(1, webFrameClient.m_numBodies); | 3999 EXPECT_EQ(1, webFrameClient.m_numBodies); |
| 4000 } | 4000 } |
| 4001 | 4001 |
| 4002 TEST_F(WebFrameTest, EmptyDocument) | 4002 TEST_F(WebFrameTest, EmptyDocument) |
| 4003 { | 4003 { |
| 4004 registerMockedHttpURLLoad("pageserializer/green_rectangle.svg"); | 4004 registerMockedHttpURLLoad("pageserializer/svg/green_rectangle.svg"); |
| 4005 | 4005 |
| 4006 TestWillInsertBodyWebFrameClient webFrameClient; | 4006 TestWillInsertBodyWebFrameClient webFrameClient; |
| 4007 FrameTestHelpers::WebViewHelper webViewHelper; | 4007 FrameTestHelpers::WebViewHelper webViewHelper; |
| 4008 webViewHelper.initialize(false, &webFrameClient); | 4008 webViewHelper.initialize(false, &webFrameClient); |
| 4009 | 4009 |
| 4010 EXPECT_FALSE(webFrameClient.m_didLoad); | 4010 EXPECT_FALSE(webFrameClient.m_didLoad); |
| 4011 EXPECT_EQ(1, webFrameClient.m_numBodies); // The empty document that a new f
rame starts with triggers this. | 4011 EXPECT_EQ(1, webFrameClient.m_numBodies); // The empty document that a new f
rame starts with triggers this. |
| 4012 } | 4012 } |
| 4013 | 4013 |
| 4014 TEST_F(WebFrameTest, MoveCaretSelectionTowardsWindowPointWithNoSelection) | 4014 TEST_F(WebFrameTest, MoveCaretSelectionTowardsWindowPointWithNoSelection) |
| (...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4921 | 4921 |
| 4922 // Call javascript to make the layer scrollable, and verify it. | 4922 // Call javascript to make the layer scrollable, and verify it. |
| 4923 WebFrameImpl* frame = (WebFrameImpl*)webViewHelper.webView()->mainFrame(); | 4923 WebFrameImpl* frame = (WebFrameImpl*)webViewHelper.webView()->mainFrame(); |
| 4924 frame->executeScript(WebScriptSource("allowScroll();")); | 4924 frame->executeScript(WebScriptSource("allowScroll();")); |
| 4925 webViewHelper.webView()->layout(); | 4925 webViewHelper.webView()->layout(); |
| 4926 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal()); | 4926 ASSERT_TRUE(webScrollLayer->userScrollableHorizontal()); |
| 4927 ASSERT_TRUE(webScrollLayer->userScrollableVertical()); | 4927 ASSERT_TRUE(webScrollLayer->userScrollableVertical()); |
| 4928 } | 4928 } |
| 4929 | 4929 |
| 4930 } // namespace | 4930 } // namespace |
| OLD | NEW |