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

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

Issue 68613003: Merges the two different page serializers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove newline after XML decl Created 7 years 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 | « Source/web/tests/PageSerializerTest.cpp ('k') | Source/web/tests/WebPageNewSerializerTest.cpp » ('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 3983 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « Source/web/tests/PageSerializerTest.cpp ('k') | Source/web/tests/WebPageNewSerializerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698