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

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

Issue 23742003: Use css-device-adapt constraining for legacy viewport tags. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased to recent master Created 7 years, 3 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
« no previous file with comments | « Source/web/WebViewImpl.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) 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 if (renderer->style()) { 364 if (renderer->style()) {
365 renderer->style()->setTextAutosizingMultiplier(2); 365 renderer->style()->setTextAutosizingMultiplier(2);
366 EXPECT_EQ(2, renderer->style()->textAutosizingMultiplier()); 366 EXPECT_EQ(2, renderer->style()->textAutosizingMultiplier());
367 multiplierSetAtLeastOnce = true; 367 multiplierSetAtLeastOnce = true;
368 } 368 }
369 renderer = renderer->nextInPreOrder(); 369 renderer = renderer->nextInPreOrder();
370 } 370 }
371 EXPECT_TRUE(multiplierSetAtLeastOnce); 371 EXPECT_TRUE(multiplierSetAtLeastOnce);
372 372
373 WebCore::ViewportArguments arguments = document->viewportArguments(); 373 WebCore::ViewportArguments arguments = document->viewportArguments();
374 arguments.width += 10; 374 // Choose a width that's not going match the viewport width of the loaded do cument.
375 arguments.minWidth = arguments.maxWidth = WebCore::Length(100, WebCore::Fixe d);
abarth-chromium 2013/09/05 05:53:22 Normally we would put each assignment on its own l
rune 2013/09/05 07:05:52 Done.
375 webViewImpl()->updatePageDefinedPageScaleConstraints(arguments); 376 webViewImpl()->updatePageDefinedPageScaleConstraints(arguments);
376 377
377 bool multiplierCheckedAtLeastOnce = false; 378 bool multiplierCheckedAtLeastOnce = false;
378 renderer = document->renderer(); 379 renderer = document->renderer();
379 while (renderer) { 380 while (renderer) {
380 if (renderer->style()) { 381 if (renderer->style()) {
381 EXPECT_EQ(1, renderer->style()->textAutosizingMultiplier()); 382 EXPECT_EQ(1, renderer->style()->textAutosizingMultiplier());
382 multiplierCheckedAtLeastOnce = true; 383 multiplierCheckedAtLeastOnce = true;
383 } 384 }
384 renderer = renderer->nextInPreOrder(); 385 renderer = renderer->nextInPreOrder();
(...skipping 3367 matching lines...) Expand 10 before | Expand all | Expand 10 after
3752 m_webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "push_state.h tml", true, 0, &client); 3753 m_webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "push_state.h tml", true, 0, &client);
3753 runPendingTasks(); 3754 runPendingTasks();
3754 3755
3755 EXPECT_EQ(client.startLoadingCount(), 2); 3756 EXPECT_EQ(client.startLoadingCount(), 2);
3756 EXPECT_EQ(client.stopLoadingCount(), 2); 3757 EXPECT_EQ(client.stopLoadingCount(), 2);
3757 m_webView->close(); 3758 m_webView->close();
3758 m_webView = 0; 3759 m_webView = 0;
3759 } 3760 }
3760 3761
3761 } // namespace 3762 } // namespace
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698