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

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

Issue 19782002: Make Blink stop scheduling its own Layout, and use the compositor's timer instead (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: With test changes Created 7 years, 4 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/testing/MockPagePopupDriver.cpp ('k') | no next file » | 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 { 295 {
296 AutoResizeWebViewClient client; 296 AutoResizeWebViewClient client;
297 std::string url = m_baseURL + "specify_size.html?" + pageWidth + ":" + pageH eight; 297 std::string url = m_baseURL + "specify_size.html?" + pageWidth + ":" + pageH eight;
298 URLTestHelpers::registerMockedURLLoad(toKURL(url), "specify_size.html"); 298 URLTestHelpers::registerMockedURLLoad(toKURL(url), "specify_size.html");
299 WebView* webView = FrameTestHelpers::createWebViewAndLoad(url, true, 0, &cli ent); 299 WebView* webView = FrameTestHelpers::createWebViewAndLoad(url, true, 0, &cli ent);
300 client.testData().setWebView(webView); 300 client.testData().setWebView(webView);
301 301
302 WebFrameImpl* frame = static_cast<WebFrameImpl*>(webView->mainFrame()); 302 WebFrameImpl* frame = static_cast<WebFrameImpl*>(webView->mainFrame());
303 WebCore::FrameView* frameView = frame->frame()->view(); 303 WebCore::FrameView* frameView = frame->frame()->view();
304 frameView->layout(); 304 frameView->layout();
305 EXPECT_FALSE(frameView->layoutPending()); 305 EXPECT_FALSE(frameView->layoutIsScheduledWithEmbedder());
306 EXPECT_FALSE(frameView->needsLayout()); 306 EXPECT_FALSE(frameView->needsLayout());
307 307
308 webView->enableAutoResizeMode(minAutoResize, maxAutoResize); 308 webView->enableAutoResizeMode(minAutoResize, maxAutoResize);
309 EXPECT_TRUE(frameView->layoutPending()); 309 EXPECT_TRUE(frameView->layoutIsScheduledWithEmbedder());
310 EXPECT_TRUE(frameView->needsLayout()); 310 EXPECT_TRUE(frameView->needsLayout());
311 frameView->layout(); 311 frameView->layout();
312 312
313 EXPECT_TRUE(frame->frame()->document()->isHTMLDocument()); 313 EXPECT_TRUE(frame->frame()->document()->isHTMLDocument());
314 314
315 EXPECT_EQ(expectedWidth, client.testData().width()); 315 EXPECT_EQ(expectedWidth, client.testData().width());
316 EXPECT_EQ(expectedHeight, client.testData().height()); 316 EXPECT_EQ(expectedHeight, client.testData().height());
317 EXPECT_EQ(expectedHorizontalState, client.testData().horizontalScrollbarStat e()); 317 EXPECT_EQ(expectedHorizontalState, client.testData().horizontalScrollbarStat e());
318 EXPECT_EQ(expectedVerticalState, client.testData().verticalScrollbarState()) ; 318 EXPECT_EQ(expectedVerticalState, client.testData().verticalScrollbarState()) ;
319 319
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 { 1022 {
1023 WebElement elementWithoutShadowRoot = document.getElementById("noshadowr oot"); 1023 WebElement elementWithoutShadowRoot = document.getElementById("noshadowr oot");
1024 EXPECT_FALSE(elementWithoutShadowRoot.isNull()); 1024 EXPECT_FALSE(elementWithoutShadowRoot.isNull());
1025 WebNode shadowRoot = elementWithoutShadowRoot.shadowRoot(); 1025 WebNode shadowRoot = elementWithoutShadowRoot.shadowRoot();
1026 EXPECT_TRUE(shadowRoot.isNull()); 1026 EXPECT_TRUE(shadowRoot.isNull());
1027 } 1027 }
1028 webViewImpl->close(); 1028 webViewImpl->close();
1029 } 1029 }
1030 1030
1031 } 1031 }
OLDNEW
« no previous file with comments | « Source/core/testing/MockPagePopupDriver.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698